ChildDevLab/MADE-EEG-preprocessing-pipeline

MADE pipeline rejecting channels based on a small portion of noisy data

Closed this issue · 0 comments

Hello,

We noticed that sometimes a small portion of extremely noisy data (e.g., when the cap is removed from the participant) can lead to an error that looks like:

“Index in position 1 exceeds array bounds.
Error in eegthresh (line 101)
signal = reshape(signal(electrodes,:), size(electrodes(:),1), pnts, sweeps);
Error in pop_eegthresh (line 179)
[Itmp Irej NS Erejtmp] = eegthresh( EEG.data, EEG.pnts, elecrange, negthresh, posthresh, [EEG.xmin EEG.xmax], starttime, endtime);”

The error message is thrown during STEP 14 (Artifact rejection), but it is actually caused by the pop_rejspec() function in STEP 8 (Prepare data for ICA) which rejects most of the trials and channels based on a relatively small portion of noisy data. This problem can be solved by removing the noisy portion of the data (e.g., data after the last trial).