[Eeglablist] rejecting/interpolating bad channels?

Andrew Hill andrewhill at ucla.edu
Mon May 9 16:34:34 PDT 2011


Thanks James - Exactly what I needed.  

Another question for the list about automagic channel rejection.
This picture shows some EEG and the channels that are marked as bad with kurtosis / probability thresholds of 5:
http://salamander.net/stage/pastebin/autorejects.jpg

You will notice it doesn't remove channels that are wildly out of range - even dropping the thresholds on the methods to 2 or under, those extremely bad channels aren't "caught"... 

Anyone have an idea why?

Best,
Andrew

On May 9, 2011, at 6:10 AM, James Desjardins wrote:

> Hi Andrew,
> 
> The outputs listed in the pop_rejchan help text can be added following  
> the EEG output at the command line as follows:
> 
> [EEG,indelec] = pop_rejchan(EEG,'elec',1:64], ...
> 'threshold',5,'norm','on','measure','kurt');
> 
> Then used in eeg_interp as follows:
> EEG = eeg_interp(EEG,indelec)
> 
> 
> Also, it may be good practice to store that vector in the EEG  
> structure so you can keep the information when you subsequently save  
> the dataset. Other rejection variables are stored in the EEG.reject  
> field.
> 
> The following should work nicely and the marked channels will be  
> stored when you save the dataset:
> 
> [EEG,EEG.reject.indelec] = pop_rejchan(EEG,'elec',1:64], ...
> 'threshold',5,'norm','on','measure','kurt');
> 
> EEG = eeg_interp(EEG,EEG.reject.indelec)
> 
> 
> I have been using a procedure similar to this in my data processing  
> stream where I interpolate bad channels then include them in my  
> average reference (the interpolation allows for a consistent and  
> spatially balanced average reference channel across participants  
> regardless of what channels are marked bad). I keep track of which  
> channels have been interpolated (in the case above using the  
> EEG.reject.indelect field) and then I do not include them in  
> procedures where interpolation is inappropriate (eg. ICA).
> 
> I hope that this is helpful.
> 
> ps. I am going to use the term "automagically" regularly from now on.
> 
> James Desjardins
> Technician, MA Student
> Department of Psychology, Behavioural Neuroscience
> Cognitive and Affective Neuroscience Lab
> Brock University
> 500 Glenridge Ave.
> St. Catharines, ON, Canada
> L2S 3A1
> 905-688-5550 x4676
> 
> 
> Quoting Andrew Hill <andrewhill at ucla.edu>:
> 
>> 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
>> 
>> 
>> _______________________________________________
>> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
>> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.ucsd.edu
>> For digest mode, send an email with the subject "set digest mime" to  
>> eeglablist-request at sccn.ucsd.edu
>> 
> 
> 
> 
> 
> _______________________________________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.ucsd.edu
> For digest mode, send an email with the subject "set digest mime" to eeglablist-request at sccn.ucsd.edu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20110509/c6f3bd48/attachment.html>


More information about the eeglablist mailing list