[FieldTrip] ft_neighbourplot

"Jörn M. Horschig" jm.horschig at donders.ru.nl
Thu Nov 17 14:45:42 CET 2011


Dear Marco,

unfortunately, we are not using neuromag data in our centre, thus I 
cannot really recommend anything. However, the neuromag306_neighb 
template should contain correct neighbours, if the test data that we 
have here is correct. But, as I said, we cannot test this here. The 
easiest way to proceed for you would be to use 
cfg.method='triangulation' or cfg.method='distance' for now. If the plot 
from ft_neighbourplot looks incorrect, then also all clusters on 
sensor-level will suffer from this and be wrong. It should definitely 
look alright with one of the other methods.
For reasons of consistency, would you be willing to share your data.grad 
with me , so that I can check what (if) needs to be changed in the 
neighbour-template? E.g. if you just sent me a snippet of you data with 
one trial in it, I could check this.

Furthermore, I cannot comment on how you import the data to FieldTrip - 
it looks alright to me, but I never did this myself ;)

Best,
Jörn

On 11/16/2011 4:16 PM, Marco Buiatti wrote:
> Dear Jorn,
>
> thanks a lot for your feedback. Still I'm afraid the problem is not
> solved yet, and this is maybe due to the fact that Neuromag data are
> composed by three different types of sensors (two orthogonally
> oriented gradiometers and one magnetometer) for each location on the
> scalp.
> Therefore, though we have 306 sensors, we have 102 sensor locations only.
>
> In our lab, when we analyse the data in the sensor space, we perform
> statistical analysis either on each sensor separately or on
> magnetometers and on the norm of the two gradiometers (discussion on
> alternatives would be worth another thread...).
>
> This is the reason why I choose neuromag306mag_neighb.
>
> Concerning the two neighbours templates I have found the following:
> 1) As you also said, neuromag306mag_neighb contains a meaningful set
> of neighbours for each sensor.
> (a simple command to display them:
> for i=1:102 disp([neighbours(i).label 'neighbours:'
> neighbours(i).neighblabel']); end;)
> so I would use this for cluster-based statistical analysis in
> Fieldtrip (for any type of sensors).
> Neuromag users, do you agree?
>
> However, when plotting it with ft_neighbourplot, as you said the
> configuration is clearly uncorrect (though now neighbours are
> correctly listed on the command line as you said). It would be very
> useful to have a correct 3D representation of this.
>
> 2) The neighbours template neuromag306_neighb has the correct 3D form
> but what I get from my data is a mislabeling of all the sensors. Also,
> neighbours are clearly wrong (many sensors do not have any
> neighbours). Since as far as I understand sensors locations are in
> data.grad, I wonder whether sensor locations in my data are originally
> wrong... Below I have copied the commands I use to import my neuromag
> data in Fieldtrip, any help on this would be welcome, of course I can
> send you data if needed.
>
> Thanks again for you help,
>
> Marco
>
> cfg                     = [];
> cfg.continuous          = 'yes';
> cfg.headerformat        = 'neuromag_mne';
> cfg.dataformat          = 'neuromag_mne';
> cfg.trialfun =par.trialfun;
> cfg.trialdef.channel='STI101';
> cfg.trialdef.eventvalue=par.eventvalue;
> cfg.trialdef.prestim=-par.prestim;
> cfg.trialdef.poststim=par.poststim;
> cfg.delay = par.delay;
> cfg.channel    = {'MEG'};
> cfg.baselinewindow=[par.begt par.endt];
> cfg.dataset = ['test_sss.fif'];
> cfg_loc = ft_definetrial(cfg);
> data= ft_preprocessing(cfg_loc);
>
> On 10 November 2011 15:37, "Jörn M. Horschig"<jm.horschig at donders.ru.nl>  wrote:
>> 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!
>>
>> Best,
>> Jörn
>>
>> 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
>>
>> 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
>>
>
>
> --
>
> _______________________________________________
> 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

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




More information about the fieldtrip mailing list