[FieldTrip] ft_channelrepair with channel absent from data
Tom Marshall
t.marshall at fcdonders.ru.nl
Sun Nov 25 16:04:09 CET 2012
Hi Trippers,
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.
Luckily, in the documentation for ft_channelrepair I find:
"*For reconstructing channels that are absent in your data*, please
define your neighbours by setting cfg.method='template' and call
FT_PREPARE_NEIGHBOURS *without* the data argument:
cfg.neighbours = ft_prepare_neighbours(cfg);
This will include channels that are missing in your in the
neighbour-definition."
I dutifully define such a neighbours structure:
/cfg=[]//
//cfg.method='template';//
//cfg.template='CTF275_neighb.mat';//
//n=ft_prepare_neighbours(cfg);/
This structure of course contains all 275 MEG channels, including the
ones that are missing from my data.
So I try to reinterpolate:
/
//% get the 'full' list of channel names//
//for i=1:length(n)//
// allchans{i,:}=n(i).label;//
//end//
//
//% find the names of the channels that were not recorded//
//missingchans=setdiff(allchans,data.label);//
//
//% repair//
//cfg=[];//
//cfg.missingchannel=missingchans;//
//cfg.neighbours=n;//
//cfg.method='spline';//
//data_r=ft_channelrepair(cfg,data);/
this fails with:
/??? Error using ==> minus//
//Matrix dimensions must agree.//
//
//Error in ==> ft_channelrepair at 279//
// d = sens.chanpos - repmat(c, numel(sensidx), 1);/
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.
I guess I have several questions all at once:
1) Is it actually possible to reinterpolate MEG channels that were never
recorded - eg because the channels were deactivated when the acquisition
took place?
2) What might be causing the error I'm seeing?
3) Where is ft_fetch_sens?
Thanks for help with any of the above!
Best,
Tom
--
Tom Marshall, MSc.
Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging
tel: +31(0)243668487
email: t.marshall at fcdonders.ru.nl
postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands
visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20121125/3641cc69/attachment-0001.html>
More information about the fieldtrip
mailing list