olafdimigen / eye-eeg

EYE-EEG toolbox for combining eye-tracking & EEG
https://www.eyetracking-eeg.org
37 stars 12 forks source link

Bug report: overweightevents.m does not work when removemean is set to true #16

Closed othelobe closed 4 years ago

othelobe commented 4 years ago

My eeglab is version v2019.1 My eye-eeg is 0.85 Matlab 2018b

Hello When running overweightevents with removemean setting set to true I get error message

**"Not enough input arguments.

Error in pop_rmbase (line 165) elseif ~isempty(pointrange)

Error in overweightevents (line 101) sac = pop_rmbase(sac,[]); % baseline subtracted across whole epoch

Error in pop_overweightevents (line 86) [EEG_overweighted] = overweightevents(EEG,event2overweight,timelim,ow_proportion,removemean);"**

From what I can tell this results from line 101 of the overweightevents.m where sac = pop_rmbase(sac,[]); is called.

I checked the pop_rmbase function of eeglab and at least for my version that function is set to receive 3 inputs instead of 2.

So, at least for me, following adjustment (adding another empty input) on line 101 of overweightevents.m sac = pop_rmbase(sac,[],[]); seems to fix the issue.

Best wishes Otto

othelobe commented 4 years ago

Ah, i just saw that this has already been noticed two months ago Then it seems that the eeglab built in plug-in loader delivers older version where this has not been corrected. Otto

olafdimigen commented 4 years ago

Yes, since one of the last EEGLAB updates, pop_rmbase suddently requires three instead of two mandadory inputs without downward compatibility, which will wreck a lot of old scripts. (I will create an issue on that on the EEGLAB Github repository). This was fixed here, but not yet in the version available via the EEGLAB server (which unfortunately cannot auto-update from Github). Will update there as well, thanks for the reminder!