ft_channelrepair produces only NaNs
Robert Oostenveld
r.oostenveld at FCDONDERS.RU.NL
Fri Jul 2 16:39:31 CEST 2010
Dear Henning
Your electrodes seem to be expressed in mm, see
>> load Desktop/elec_structure.mat
>> elec.pnt
ans =
80.7840 26.1330 -4.0011
84.9812 0 -1.7860
80.7840 -26.1330 -4.0011
76.1528 31.4828 20.8468
76.1528 -31.4828 20.8468
...
The default cfg.neighbourdist is 4, which is appropriate for 4 cm but not 4 mm. So that means that none of the channels is considered a neighbour. The "repair" is done by computing a weighted average over the neighbours that ly withing the specified cfg.neighbourdist, and where the weight is schaled with the inverse distance.
If you specify cfg.neighbourdist correctly (40 would probably work fine), you''ll also see in the feedback on screen which electrodes are used for the repairing.
hope this helps.
Robert
-----------------------------------------------------------
Robert Oostenveld, PhD
Senior Researcher
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognitive Neuroimaging
Radboud University Nijmegen
tel.: +31 (0)24 3619695
e-mail: r.oostenveld at donders.ru.nl
web: http://www.ru.nl/neuroimaging
skype: r.oostenveld
-----------------------------------------------------------
On 2 Jul 2010, at 13:58, Henning Holle wrote:
> Dear list members,
>
> we have a data set here with a bad data channel (F8, see attached screenshot from the
> databrowser).
>
>
> we are able to read in the dataset (which was created in EEGLAB) and the electrode
> positions using the following code.
>
> %% read in data
>
> cfg = [];
> cfg.dataset = 's29dr.set';
> D = ft_preprocessing(cfg);
> D.elec = D.hdr.elec;
>
> however, when we want to interpolate the bad channel using the following code
>
> %% interpolate bad channel F8
>
> cfg = [];
> cfg.badchannel = 14;
> E = ft_channelrepair(cfg,D);
>
> we only have NaNs for channel 14
>
>>> E.trial{1,1}(14,1:10)
>
> ans =
>
> NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
>
> What are we doing wrong? One possibility that we have considered is that the electrode
> positions (which were obtained in EEGLAB) might be in a slightly different format than
> fieldtrip would expect them. We can't see anything wrong with, but we have attached a
> copy of the elec field here, just to be sure.
>
> Or is it maybe a problem for the interpolation algorithm that F8 is at the edge of covered
> electrodes?
>
> Any help would be greatly appreciated.
>
> Kind regards,
>
> Tiina Kalda and Henning Holle
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
> <bad_channel.png><elec_structure.mat>
----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20100702/b0640a51/attachment-0001.html>
More information about the fieldtrip
mailing list