sccn / clean_rawdata

Cleaning Raw EEG data
GNU General Public License v3.0
42 stars 17 forks source link

eegh writes a wrong channel criterion #23

Closed ArndMeiser closed 2 years ago

ArndMeiser commented 3 years ago

Dear developers,

I came across an issue when trying to retrieve the code for pop_clean_rawdata via eegh after calling it from the GUI. After using the default settings of the function on a dataset with channel locations, the code from eegh looks as follows:

EEG = pop_clean_rawdata(EEG, 'FlatlineCriterion',5,... 'ChannelCriterion',5,'LineNoiseCriterion',4,... 'Highpass','off','BurstCriterion',20,'WindowCriterion',0.25,... 'BurstRejection','on','Distance','Euclidian',... 'WindowCriterionTolerances',[-Inf 7] );

By default, the ChannelCriterion should be 0.8, but at some point this value is overwritten (most likely in clean_articafts that is calling the function clean_channels) and set to 5, leading the function to delete all channels and to the following warning:

'Your dataset appears to lack correct channel locations; using a location-free channel cleaning method.'

This is only a minor issue that only appears when trying to work with the command window rather than the GUI, but I hope it can be resolved at some point since it is not that easy to spot. I would appreciate it a lot if you could confirm this bug.

Kind Regards,

Arnd Meiser

arnodelorme commented 2 years ago

Thanks for the report and sorry for the late reply. I have checked the history is fine which means the bug has been fixed.