[FieldTrip] plotting neighbours

Philipp Ruhnau mail at philipp-ruhnau.de
Mon Jan 18 18:00:59 CET 2016


Dear Victoria,
I think there might be something odd with the channel selection in your data (or maybe also something that happens in ft_neighborplot)

as I see it you have two options
1)
I would instead suggest to use ft_prepare neighbors with your data as input
cfg = []
cfg.method = ‘triangulation’
cfg.feedback = ‘yes’ % with this you get the feedback plot
neigh = ft_prepare_neighbours(cfg, your_data)

I am not entirely sure which layout the function uses if you feed in the default layout (which should be fine though), but I think it still uses the data’s
for me clicking in the function didn’t work properly, but I think that is a different (gui?) issue, more importantly however the graphical layout and the labels that are grouped make sense 
that’s also true for what you posted. the only thing odd there is that your neighbor-structure still has magnetometers (MEG***1) that should have been removed, thus my hunch that they are somehow still in the data you feed in to ft_neighbourplot 
[i just quickly try and I can to a certain extend replicate your problem, but not fully as clicking doesn’t work…but also all the magnetometers with 0 neighbours]
and as Tzvetan said, one magnetometer and two gradiometers are in the same position, so I would expect an alternating output between, say, MEG1031 and MEG1032+1033

the easiest thing you can try is use ft_selectdata again before you create the neighbors
cfg = [];
cfg.channel = ‘MEGGRAD’;
data = ft_selectdata(cfg, data)

just as a check, if your problem vanishes, the mags were still in there somewhere.

2) just load the default/use the layout field with the function above without the data input. 
then for me the plotting works and the output is like you predicted
cfg = []
cfg.method = ‘triangulation’
cfg.feedback = ‘yes’ % with this you get the feedback plot
cfg.layout = ‘neuromag306cmb.lay'
neigh = ft_prepare_neighbours(cfg)


as for the whether you should use ft_combineplanar. as a neuromag user myself I always use it for plotting but also for statistics, similar to what the wiki says, so I’m a little confused there too.
of course you can plot them each of course. 
I don’t think you need to specify the combination method there though, as ‘sum’ is default for power. 
cheers
philipp

> On 16 Jan 2016, at 18:26, victoria schroeder <vic.schroeder2 at gmail.com> wrote:
> 
> Hi !
> 
> I am working with a neuromag system and want to do cluster based permutation tests with time frequency data. However, before running the stats i would like to check the clusters which are formed by ft_prepare_neighbours. Thus i use ft_neighbourplot. When looking at the plot and clicking on the channels i would expect to see something like :
> 
> Selected channel MEG1032+1033, which has 7 neighbours: MEG0622+0623, MEG1012+1013, MEG1022+1023, MEG1042+1043, MEG1112+1113, MEG1122+1123, MEG1242+1243
> Selected channel MEG0742+0743, which has 7 neighbours: MEG0432+0433, MEG0712+0713, MEG0722+0723, MEG0732+0733, MEG1822+1823, MEG1832+1833, MEG2242+2243
> 
> however what i see is:
> 
> Selected channel MEG0741, which has 0 neighbours: 
> Selected channel MEG0731, which has 0 neighbours: 
> Selected channel MEG0742+0743, which has 7 neighbours: MEG0432+0433, MEG0712+0713, MEG0722+0723, MEG0732+0733, MEG1822+1823, MEG1832+1833, MEG2242+2243
> Selected channel MEG0711, which has 0 neighbours: 
> Selected channel MEG0741, which has 0 neighbours: 
> 
> It is absolutely random when the correct output occurs. When clicking on a particular channel it would randomly show me the following results:
> 
> Selected channel MEG1032+1033, which has 7 neighbours: MEG0622+0623, MEG1012+1013, MEG1022+1023, MEG1042+1043, MEG1112+1113, MEG1122+1123, MEG1242+1243
> 
> or
> 
> Selected channel MEG1031, which has 0 neighbours: 
> 
> Do you have any suggestions why this happen? Are the channels not grouped correctly?
> 
> Below is the code starting from the time-frequency analysis of the data.
> 
> Thank you very much
> Victoria
> 
> cfg = [];
> cfg.output = 'pow';
> cfg.channel = 'MEGGRAD';
> cfg.method = 'mtmconvol';
> cfg.taper = 'hanning';
> cfg.foi = [2:2:30];
> %cfg.keeptrials = 'yes';   for stats keep trials
> cfg.t_ftimwin    = ones(length(cfg.foi),1).*0.5;   % length of time window = 0.5 sec
> cfg.toi          = [-1.3:0.05:1];   
> cfg.keeptrials   = 'yes';
> FreqCon = ft_freqanalysis(cfg, Con_clean);
> FreqIncon = ft_freqanalysis(cfg, Incon_clean);
> 
> %combine planar
> cfg = [];
> cfg.method ='sum';
> ComCon = ft_combineplanar(cfg,FreqCon);
> ComIncon = ft_combineplanar(cfg, FreqIncon);
> 
> % plot neighbours
> cfg=[];
> cfg.method        = 'triangulation';
> cfg.layout           = 'neuromag306cmb.lay';
> ft_neighbourplot(cfg,ComCon)
> _______________________________________________
> 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/20160118/43bc1fa2/attachment.html>


More information about the fieldtrip mailing list