<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi Trippers,<br>
<br>
I'm having some difficulty reinterpolating some missing channels in
my ctf275 data. These are 2 channels that were never recorded
because the sensors in question were switched off.<br>
<br>
Luckily, in the documentation for ft_channelrepair I find:<br>
<br>
"<b>For reconstructing channels that are absent in your data</b>,
please define your neighbours by setting cfg.method='template' and
call FT_PREPARE_NEIGHBOURS *without* the data argument: <br>
cfg.neighbours = ft_prepare_neighbours(cfg);<br>
This will include channels that are missing in your in the
neighbour-definition."<br>
<br>
I dutifully define such a neighbours structure:<br>
<br>
<i>cfg=[]</i><i><br>
</i><i>cfg.method='template';</i><i><br>
</i><i>cfg.template='CTF275_neighb.mat';</i><i><br>
</i><i>n=ft_prepare_neighbours(cfg);</i><br>
<br>
This structure of course contains all 275 MEG channels, including
the ones that are missing from my data.<br>
<br>
So I try to reinterpolate:<br>
<i><br>
</i><i>% get the 'full' list of channel names</i><i><br>
</i><i>for i=1:length(n)</i><i><br>
</i><i> allchans{i,:}=n(i).label;</i><i><br>
</i><i>end</i><i><br>
</i><i><br>
</i><i>% find the names of the channels that were not recorded</i><i><br>
</i><i>missingchans=setdiff(allchans,data.label);</i><i><br>
</i><i><br>
</i><i>% repair</i><i><br>
</i><i>cfg=[];</i><i><br>
</i><i>cfg.missingchannel=missingchans;</i><i><br>
</i><i>cfg.neighbours=n;</i><i><br>
</i><i>cfg.method='spline';</i><i><br>
</i><i>data_r=ft_channelrepair(cfg,data);</i><br>
<br>
this fails with:<br>
<br>
<i>??? Error using ==> minus</i><i><br>
</i><i>Matrix dimensions must agree.</i><i><br>
</i><i><br>
</i><i>Error in ==> ft_channelrepair at 279</i><i><br>
</i><i> d = sens.chanpos - repmat(c, numel(sensidx), 1);</i><br>
<br>
length(sensidx) is 301 and length(sens.chanpos) is 273, so the error
makes sense. However at this point I get a bit stuck as 'sens' is
created in line 104-108 by the function 'ft_fetch_sens' which I
can't find! 'help ft_fetch_sens', 'which ft_fetch_sens' and 'edit
ft_fetch_sens' all fail.<br>
<br>
I guess I have several questions all at once:<br>
1) Is it actually possible to reinterpolate MEG channels that were
never recorded - eg because the channels were deactivated when the
acquisition took place? <br>
2) What might be causing the error I'm seeing?<br>
3) Where is ft_fetch_sens?<br>
<br>
Thanks for help with any of the above!<br>
Best,<br>
Tom<br>
<pre class="moz-signature" cols="72">--
Tom Marshall, MSc.
Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging
tel: +31(0)243668487
email: <a class="moz-txt-link-abbreviated" href="mailto:t.marshall@fcdonders.ru.nl">t.marshall@fcdonders.ru.nl</a>
postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands
visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands</pre>
</body>
</html>