[FieldTrip] ft_channelrepair with channel absent from data

Anne Urai anne.urai at gmail.com
Fri Apr 8 21:40:12 CEST 2016


Dear FieldTrippers,

I head a similar problem with interpolating missing channels from a CTF275 system. Since I couldn't find a final answer on the mailing list, I thought I'd share my solution. Specifically, giving both a cfg.layout and a cfg.neighbours input into ft_channelrepair avoids ft_fetch_sens getting the grad structure from the data (from which the channels that were not recorded are missing). With this setting, the sensors that are needed are defined based on the layout from the fieldtrip/templates directory, which is complete.

Happy interpolating! 

cfg = [];
 cfg.layout = 'CTF275';
 cfg.method = 'template';
 neighbours = ft_prepare_neighbours(cfg);
 
 cfg = [];
 cfg.neighbours = neighbours;
 cfg.method = 'spline'; % spline can handle missing grad struct
 cfg.layout = 'CTF275'; % use this rather than grad structure to find sens info
 
 % find missing channels in this dataset
 cfg.missingchannel = {neighbours((~ismember({neighbours(:).label}, data.label))).label};
 data = ft_channelrepair(cfg,data);
 assert(length(data.label) == 275, 'CTF275 not completely interpolated!');

— 
Anne E. Urai, MSc
PhD student | Institut für Neurophysiologie und Pathophysiologie 
Universitätsklinikum Hamburg-Eppendorf | Martinistrasse 52, 20246 | Hamburg, Germany 
www.anneurai.net / @AnneEUrai

From: Linsey Roijendijk <l.roijendijk at donders.ru.nl>
Reply: FieldTrip discussion list <fieldtrip at science.ru.nl>
Date: 20 December 2012 at 18:44:31
To: FieldTrip discussion list <fieldtrip at science.ru.nl>
Subject:  Re: [FieldTrip] ft_channelrepair with channel absent from data  

Correction: I made a mistake in my e-mail, I meant the spherical spline interpolation method, because that's the one Jorn said should work.

On Dec 20, 2012, at 6:31 PM, Linsey Roijendijk <l.roijendijk at donders.ru.nl> wrote:

Hi all,

I have also been trying to reinterpolate MEG channels that were never recorded with the nearest neighbour interpolation method, however when calling the method (in the same way Tom also used it) the function seems to do something, however it did not interpolate the missing sensors. 
There were still 273 sensors instead of 275.  Do I need to give along a special cfg.grad or do something else?

Thanks in advance,

Linsey


On Nov 26, 2012, at 10:45 AM, Jörn M. Horschig <jm.horschig at donders.ru.nl> wrote:q

Hey Tom,


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?

Should work, but only with the SSI (=spherical spline interpolation) method. For the nearest neighbour interpolation, the function constructs a list of neuighbouring and constructs a weighted average. The function, however, wants to weigh each sensor according to its distance from the sensor to be reconstructed. That information can only be found in the grad structure, but in the grad structure there are only sensors which were recorded, thus the distance from a missing sensor cannot be measured because its position is missing in the grad structure. SSI should work though, cause it relies on a different rationale.


2) What might be causing the error I'm seeing?

Since you have 301 channels rather than 275, my suspicion is that you include reference gradiometers. This should not fail in principle, though... maybe I can drop by your office to check it out? Got some time right now?

3) Where is ft_fetch_sens?

It's a private function, can be found in FieldTrip/private. You have to cd to that directory in order for Matlab to find it (the idea behind private function is that there are only visible for higher-level function and 'hidden' for all other functions).

Best,
Jörn



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


_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip


--  
Jörn M. Horschig
PhD Student
Donders Institute for Brain, Cognition and Behaviour  
Centre for Cognitive Neuroimaging
Radboud University Nijmegen  
Neuronal Oscillations Group
FieldTrip Development Team

P.O. Box 9101
NL-6500 HB Nijmegen
The Netherlands

Contact:
E-Mail: jm.horschig at donders.ru.nl
Tel:    +31-(0)24-36-68493
Web: http://www.ru.nl/donders

Visiting address:
Trigon, room 2.30
Kapittelweg 29
NL-6525 EN Nijmegen
The Netherlands
_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

--

Linsey Roijendijk MSc.
Donders Institute for Brain, Cognition and Behaviour
Centre for Neuroscience
dept. of Biophysics
Radboud University Nijmegen
Montessorilaan 3, Room B.02.34
P.O.Box 9104
6500 HE Nijmegen
The Netherlands
Tel: +31(0)24 3612616
L.Roijendijk at donders.ru.nl

_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

--

Linsey Roijendijk MSc.
Donders Institute for Brain, Cognition and Behaviour
Centre for Neuroscience
dept. of Biophysics
Radboud University Nijmegen
Montessorilaan 3, Room B.02.34
P.O.Box 9104
6500 HE Nijmegen
The Netherlands
Tel: +31(0)24 3612616
L.Roijendijk at donders.ru.nl

_______________________________________________  
fieldtrip mailing list  
fieldtrip at donders.ru.nl  
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160408/e1ac712b/attachment.html>


More information about the fieldtrip mailing list