[Eeglablist] rejecting/interpolating bad channels?
Andrew Hill
andrewhill at ucla.edu
Sat May 7 19:06:38 PDT 2011
Hi folks,
I'm trying to figure out how to first automagically detect bad channels and then interpolate them on the fly, before saving my EEG data set.
Using pop_rejchan seems to do what it should:
...
>>EEG = pop_rejchan(EEG ,'threshold',5,'norm','on','measure','kurt');
Computing kurtosis for channels...
4 electrodes labeled for rejection
Removing 4 channel(s)...
...
But these are of course not removed - just marked as red in the plot and I'm assuming labeled in the EEG object somewhere.
I see an output parameter "indelec" in the pop_rejchan help, but after running pop_rejchan I don't see an "indelec" variable created, nor a EEG.indelec one.
Ideally I'd like to take the indices of any marked-bad channels and then immediately interpolate, maybe something like this?
EEG = pop_rejchan(EEG, 'elec',[1:64] ,'threshold',5,'norm','on','measure','kurt');
EEG = eeg_interp(EEG, EEG.indelec)
But that of course isn't syntatically correct - how/where is this information stored?
Is anyone else doing something like this?
Also, does the pop_reref function know enough to exclude channels that have been marked bad?
I couldn't see anything relevant in the function help.
Thanks,
Andrew
More information about the eeglablist
mailing list