[Eeglablist] Rejecting/Interpolating bad channels, take 2

Andrew Hill andrewhill at ucla.edu
Tue Nov 15 11:07:42 PST 2011


Hi Stephanie,

After failing to find a workable way to do this (although Arno had a great suggestion, pasted in below) I have simply defaulted to visually inspecting each record, creating a list of bad channels for each recording, and then using eeg_interp to replace them in a script, e.g. something like this:

%%%
inputfilepath = '/home/andrew/data/SETS/';
ouputfilepath = '/home/andrew/data/SETSinterpolated/';
inputfilename = [int2str(SNUM) '_1020LinkedEar'];

for SNUM = [101:140]

if SNUM == 101 BADCHANNELS = [14 17]; 
elseif SNUM == 103 BADCHANNELS = [12 15];
else BADCHANNELS = [];
end

EEG = pop_loadset('filename', [inputfilename '.set'],  'filepath', inputfilepath );
pop_eegplot( EEG, 1, 1, 1); %plot with bad channels

EEG = eeg_interp(EEG,BADCHANNELS)
pop_eegplot( EEG, 1, 1, 1); % plot after interpolation - bad channel gone?

EEG = pop_saveset( EEG, 'filename', inputfilename '_Interpolated.set'],'filepath', outputfilepath );
end
%%%


Hope that helps!
andrew



---
> Dear all,
> 
> these days, I personally prefer to use the pop_rejchanspec function (from the command line only) that is based on spectrum in given frequency bands (several bands may be used). I would call for instance.
> 
> [EEG indelec] = pop_rejchanspec( EEG, 'freqlims', [0 10; 35 128], 'stdthresh', [-15 15; -10 10]);
> 
> This will remove data channels which have a spectral power between 0 and 10 Hz that is more than 15 standard deviation compared to other channels and channels which have a spectral power between 35 and 128 Hz that is more than 10 standard deviation compared to other channels.
> 
> Arno

---
On Nov 14, 2011, at 12:00 PM, Stephanie Echols wrote:

> Dear EEGLAB users,
> 
> I have a few questions regarding the rejection and interpolation of bad EEG channels. I'm having a similar issue to that of Andrew Hill posted on May 9th, 2011, in that I have a few extremely bad channels that survive the automatic channel rejection function, regardless of the threshold/method applied. 
> 
> Please see this image for an illustration: http://ccp.uchicago.edu/~sechols/BadChannel_ERP.bmp 
> The rejected channels are highlighted in red, but channel 55, which is almost comically bad, is not rejected. 
> 
> I have tried to use the methods recommended in the thread of Andrew Hill et al.,, and none of them seem to "catch" this bad channel.
> 
> It also doesn't appear to matter whether the data is epoched or not. 
> 
> Does anyone have any recommendations?
> 
> Further, does anyone know if there is a way to reject these channels using code (as opposed to the Edit - Select Data function in the GUI), and interpolate them? Is there a way to do this in concert with the automatic channel rejection function, and save the bad channels rejected using both methods in one function?
> 
> Thank you all for your time, I am new at this and would appreciate any advice you can offer!
> 
> Best,
> Stephanie
> 
> _______________________________________________
> 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/20111115/319559bb/attachment.html>


More information about the eeglablist mailing list