sccn / clean_rawdata

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

Enhancement of vis_artifacts #30

Closed crisglav closed 2 years ago

crisglav commented 2 years ago

Dear Christian Kothe,

I would like to suggest adding an option of no scaling the channel data with respect to the old or new standard deviation of the channels. The rationale can be gather from the following personal example. After cleaning the line noise and performing ICA on my data I wanted to check the difference between the raw and the preprocessed data. Therefore I run something like vis_artifacts(EEGClean,EEGraw); and obtained this image: Scroll_after_ICA_crd_default_sub-01_allnew To my surprise C4 didn't look bad at all, when I knew beforehand that it had a high standard deviation in amplitude (I plotted it with pop_eegplot). That was due to the scaling of C4 was the same in the clean and raw data. Therefore I just introduced an option to 'ScaleBy' where no scaling was applied (see code). After running opts.ScaleBy = 'noscale'; opts.yscaling = 50; vis_artifacts(EEGClean,EEGraw,opts); I get an image like this one Scroll_after_ICA_nobadchans_sub-01

I believe this option would be useful to explore your data cleaning when some obviously bad channels have not been eliminated. I therefore hope you consider this PR. I look forward to your feedback!

PS: I have also included the suggestion by Arno Delorme in issue #2 to include the channel labels, which I also found very useful.