[Eeglablist] interpolate previously deleted channels

Gorka FG gorkafraga at gmail.com
Fri Feb 10 02:43:20 PST 2017


dear Makoto,

Thanks for the link.

 I did a quick visual inspection of values of the interpolated electrodes
after applying my script (first adding new 'zeroes' channels) and after
applying the pop_interp( EEG, originalEEG.chanlocs, 'spherical'). There was
a relatively slight difference of around 0.200-0.400 mV (Such difference
was not present in the non interpolated) electrodes.

I will apply the simplest (and nore trustworthy) solution that is your
suggestion of preloading a dataset with all electrodes, but I am curious
about where this difference may come from.

Best,
Gorka



On Feb 10, 2017 4:08 AM, "Makoto Miyakoshi" <mmiyakoshi at ucsd.edu> wrote:

Dear Gorka,

Without testing your code on Matlab, it seems ok.
See also this page for your info.
https://sccn.ucsd.edu/wiki/Makoto's_preprocessing_
pipeline#Remove_bad_channels

Makoto

On Mon, Feb 6, 2017 at 4:24 PM, Gorka FG <gorkafraga at gmail.com> wrote:

> 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-)  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(EE
> G.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);
>
> _______________________________________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.uc
> sd.edu
> For digest mode, send an email with the subject "set digest mime" to
> eeglablist-request at sccn.ucsd.edu
>



-- 
Makoto Miyakoshi
Swartz Center for Computational Neuroscience
Institute for Neural Computation, University of California San Diego
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20170210/19540739/attachment.html>


More information about the eeglablist mailing list