[Eeglablist] rejecting/interpolating bad channels?
Christopher Retzler
lpxcr1 at nottingham.ac.uk
Tue May 10 01:56:46 PDT 2011
Hi Andrew
I use the following (although there may be a better way):
% reject channels and interpolate
EEG = pop_rejchan(EEG, 'elec',[1:112] ,'threshold',5,'norm','on','measure','kurt');
[ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG, EEG, 1, 'gui','off');
EEG = pop_interp(EEG, ALLEEG(1).chanlocs, 'spherical');
This creates a new dataset in which the bad channels have been removed and then uses the original datasets channel locations to identify the channels to interpolate.
Chris
Chris Retzler
PhD Student
Room C74
School of Psychology
University Park
The University of Nottingham
NG7 2RD
lpxcr1 at nottingham.ac.uk
________________________________________
From: Andrew Hill [andrewhill at ucla.edu]
Sent: 08 May 2011 03:06
To: EEGLAB
Subject: [Eeglablist] rejecting/interpolating bad channels?
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
This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.
This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.
More information about the eeglablist
mailing list