[FieldTrip] ft_neighbourplot

"Jörn M. Horschig" jm.horschig at donders.ru.nl
Thu Nov 10 15:37:28 CET 2011

Hi Marco,

I analyzed your problem, here's the result ;)

1) You are choosing neuromag306mag_neighb as the template for your 
neighbours. This template is based on the neuromag306mag two-dimensional 
layout, *not* on the three dimensional data that you pur it. In general, 
2D layouts should only be used for neighbour selection when no 3D 
gradiometer information is available, because these two do not coincide, 
and quite honestly, I do not know what the precise relationship between 
these two is (it's some projection on a 2D plane). This explains why the 
neighbours you defined look good when you use the 2D layout, but look 
ugly for the 3D gradiometer data.

2) When you are using neuromag306 data, you should use 
neuromag306_neighb as the template. This template is based on the 3D 
gradiometer information of our neuromag306 test data. This way, the 
neighbours are defined based on 3D information, the same space that your 
gradiometer information is in.
Note however, that not all templates are optimized, yet, and also it 
might be a bit confusing that there are so many templates for the 
neuromag system. We might reconsider this.

3) An alternative would be, if you have gradiometer information at hand, 
to call prepare_neighbours with cfg.method='distance' or 
'triangulation'. This ensures that your neighbours chosen are based on 
the same space than your sensors are in. Anyway, it is good that you 
checked with ft_neighbourplot, otherwise you might have received crappy 
results - so note to all of you, always check your neighbourselection ;)

4) There was indeed a bug in ft_neighbourplot causing always the same 
sensor names to show up in the command window. This is resolved in the 
newest version now (downloadable from tomorrow on). I changed some other 
things as well, hope I did not break anything crucial ;)

I hope this helps! Should you have any other questions, feel free to ask!


On 11/10/2011 12:31 PM, Marco Buiatti wrote:
> Dear Fieldtrippers,
> I have a problem with ft_neighbourplot.
> Data from Neuromag 306 channels. Running on Linux 64 bits, Matlab version 7.12.0
> Neighbours in the Fieldtrip layout seem ok to me.
> However, when plotting them with ft_neighbourplot, the layout is
> clearly incorrect, it includes only about one third of the channels
> and when clicking on single channels, the output is incorrect (it
> always displays the same channel labels).
> I think this is a very useful command, so I would like to be able to use it!
> Below I have copied the corresponding commands.
> Am I doing anything wrong? Any help?
> Thanks
> Marco
>>> data
> data =
>            hdr: [1x1 struct]
>          label: {306x1 cell}
>           time: {1x300 cell}
>          trial: {1x300 cell}
>        fsample: 1000
>     sampleinfo: [300x2 double]
>      trialinfo: [300x1 double]
>           grad: [1x1 struct]
>            cfg: [1x1 struct]
>>> cfg=[]; cfg.method='template'; cfg.template='/neurospin/local/fieldtrip/template/neighbours/neuromag306mag_neighb.mat';
>>> neighbours = ft_prepare_neighbours(cfg, data)
> Trying to load sensor neighbours from a template
> Successfully loaded neighbour structure from
> /neurospin/local/fieldtrip/template/neighbours/neuromag306mag_neighb.mat
> there are on average 6.9 neighbours per channel
> the call to "ft_prepare_neighbours" took 0 seconds and an estimated 0 MB
> neighbours =
> 1x104 struct array with fields:
>     label
>     neighblabel
>>> cfg=[];cfg.neighbours=neighbours;
>>> ft_neighbourplot(cfg,data)
> Using the gradiometer configuration from the dataset.
> the call to "ft_neighbourplot" took 1 seconds and an estimated 0 MB
> Selected channel MEG1941, which has 10 neighbours: MEG0121, MEG0131,
> MEG0141, MEG0341
> Selected channel MEG2411, which has 9 neighbours: MEG0121, MEG0131,
> MEG0141, MEG0341
> Selected channel MEG2411, which has 9 neighbours: MEG0121, MEG0131,
> MEG0141, MEG0341
> Selected channel MEG2131, which has 6 neighbours: MEG0121, MEG0131,
> MEG0141, MEG0341
> Selected channel MEG2211, which has 6 neighbours: MEG0121, MEG0131,
> MEG0141, MEG0341

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

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

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

More information about the fieldtrip mailing list