[Eeglablist] interpolate previously deleted channels
Ahmad, Jumana
jumana.ahmad at kcl.ac.uk
Wed Feb 8 14:33:24 PST 2017
Hi Gorka,
You can load an old eeg dataset with the channels present and interpolate that way. See Makoto's preprocessing pipeline for an example.
I try not to delete until I interpolate to avoid the issue.
Best wishes,
Jumana
------------------------------------------
Jumana Ahmad
Post-Doctoral Research Worker in Cognitive Neuroscience
EU-AIMS Longitudinal European Autism Project (LEAP) & SynaG Study
Room M1.26.Department of Forensic and Neurodevelopmental Sciences (PO 23) | Institute of Psychiatry, Psychology & Neuroscience | King’s College London | 16 De Crespigny Park | London SE5 8AF
Phone: 0207 848 5359| Email: jumana.ahmad at kcl.ac.uk | Website: www.eu-aims.eu | Facebook: www.facebook.com/euaims
________________________________
From: eeglablist-bounces at sccn.ucsd.edu <eeglablist-bounces at sccn.ucsd.edu> on behalf of Gorka FG <gorkafraga at gmail.com>
Sent: 07 February 2017 02:24:28
To: eeglablist at sccn.ucsd.edu
Subject: [Eeglablist] interpolate previously deleted channels
Dear all,
I have a dataset in which bad channels were manually removed using EEG = pop_select (EEG, 'channel', chans2keep). In later steps, I was unable to interpolate those removed channels so I did a workaround inserting blank channels and then interpolating (see below).
Would this approach be correct? am I missing a more simple way of doing this using pop_interp?
Thanks in advance for the help!
Gorka
--
%insert blank channels using insertrows ( http://nl.mathworks.com/matlabcentral/fileexchange/9984-insertrows-a-b-ind-<https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fnl.mathworks.com%2Fmatlabcentral%2Ffileexchange%2F9984-insertrows-a-b-ind-&data=01%7C01%7Cjumana.ahmad%40kcl.ac.uk%7Cf0ecdf1896304cae3e3408d450510fcd%7C8370cf1416f34c16b83c724071654356%7C0&sdata=%2FpE5QPm5UvY2r3dGdaxgYnXkZecjg%2FJTi3igN43%2BzZc%3D&reserved=0>) in each trial:
for trial = 1:size(EEG.data,3); % loop thru trials
tmp= EEG.data(:,:,trial);
for c = 1:length(chans2interpNum); % loop thru indexes of channels to interpolate
tmp= insertrows(tmp,zeros(1,size(EEG.data,2))],chans2interpNum(c)-1); %insert a row of zeros at chan index position
end
newEEG(:,:,trial) = tmp;
clear tmp
end
EEG.data = newEEG;
%interpolate:
EEG = eeg_checkset(EEG);
EEG = pop_chanedit(EEG,'load',chanlocsfile,'besa');
for c = 1:length(chans2interp);
EEG =pop_interp(EEG,chans2interpNum(c), 'spherical');
end
EEG = eeg_checkset(EEG);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20170208/dea5e304/attachment.html>
More information about the eeglablist
mailing list