<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Dear Henning<div><br></div><div>Your electrodes seem to be expressed in mm, see</div><div><br></div><div><div>>> load Desktop/elec_structure.mat</div><div>>> elec.pnt</div><div>ans =</div><div>   80.7840   26.1330   -4.0011</div><div>   84.9812         0   -1.7860</div><div>   80.7840  -26.1330   -4.0011</div><div>   76.1528   31.4828   20.8468</div><div>   76.1528  -31.4828   20.8468</div></div><div>...</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>hope this helps. </div><div>Robert</div><div><br></div><div> <br><div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>-----------------------------------------------------------<br>Robert Oostenveld, PhD<br>Senior Researcher<br>Donders Institute for Brain, Cognition and Behaviour<br>Centre for Cognitive Neuroimaging<br>Radboud University Nijmegen<br>tel.: +31 (0)24 3619695<br>e-mail: <a href="mailto:r.oostenveld@donders.ru.nl">r.oostenveld@donders.ru.nl</a><br>web: <a href="http://www.ru.nl/neuroimaging">http://www.ru.nl/neuroimaging</a><br>skype: r.oostenveld<br>-----------------------------------------------------------<br></div></div></div></span></div></span></div>
</div>
<br><div><div>On 2 Jul 2010, at 13:58, Henning Holle wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Dear list members,<br><br>we have a data set here with a bad data channel (F8, see attached screenshot from the <br>databrowser). <br><br><br>we are able to read in the dataset (which was created in EEGLAB) and the electrode <br>positions using the following code.<br><br>%% read in data<br><br>cfg = [];<br>cfg.dataset = 's29dr.set';<br>D = ft_preprocessing(cfg);<br>D.elec = D.hdr.elec;<br><br>however, when we want to interpolate the bad channel using the following code<br><br>%% interpolate bad channel F8<br><br>cfg = [];<br>cfg.badchannel     = 14;<br>E = ft_channelrepair(cfg,D);<br><br>we only have NaNs for channel 14<br><br><blockquote type="cite"><blockquote type="cite">E.trial{1,1}(14,1:10)<br></blockquote></blockquote><br>ans =<br><br>   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN   NaN<br><br>What are we doing wrong? One possibility that we have considered is that the electrode <br>positions (which were obtained in EEGLAB) might be in a slightly different format than <br>fieldtrip would expect them. We can't see anything wrong with, but we have attached a <br>copy of the elec field here, just to be sure.<br><br>Or is it maybe a problem for the interpolation algorithm that F8 is at the edge of covered <br>electrodes?<br><br>Any help would be greatly appreciated.<br><br>Kind regards,<br><br>Tiina Kalda and Henning Holle<br><br>----------------------------------<br>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 <a href="http://listserv.surfnet.nl/archives/fieldtrip.html">http://listserv.surfnet.nl/archives/fieldtrip.html</a> and <a href="http://www.ru.nl/neuroimaging/fieldtrip">http://www.ru.nl/neuroimaging/fieldtrip</a>.<br><span><bad_channel.png></span><span><elec_structure.mat></span></div></blockquote></div><br></div></body></html><p>----------------------------------</p>
<p>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.</p>
<p>  http://listserv.surfnet.nl/archives/fieldtrip.html</p>
<p>  http://www.ru.nl/fcdonders/fieldtrip/</p>