<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Dear Victoria,<div class="">I think there might be something odd with the channel selection in your data (or maybe also something that happens in ft_neighborplot)</div><div class=""><br class=""></div><div class="">as I see it you have two options</div><div class="">1)</div><div class="">I would instead suggest to use ft_prepare neighbors with your data as input</div><div class="">cfg = []</div><div class="">cfg.method = ‘triangulation’</div><div class="">cfg.feedback = ‘yes’ % with this you get the feedback plot</div><div class="">neigh = ft_prepare_neighbours(cfg, your_data)</div><div class=""><br class=""></div><div class="">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</div><div class="">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 </div><div class="">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 </div><div class="">[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]</div><div class="">and as Tzvetan said, one magnetometer and two gradiometers are in the same position, so I would expect an alternating output between, say, <i class="">MEG1031 and </i><i class="">MEG1032+1033</i></div><div class=""><br class=""></div><div class="">the easiest thing you can try is use ft_selectdata again before you create the neighbors</div><div class="">cfg = [];</div><div class="">cfg.channel = ‘MEGGRAD’;</div><div class="">data = ft_selectdata(cfg, data)</div><div class=""><br class=""></div><div class="">just as a check, if your problem vanishes, the mags were still in there somewhere.</div><div class=""><br class=""></div><div class="">2) just load the default/use the layout field with the function above without the data input. </div><div class="">then for me the plotting works and the output is like you predicted</div><div class=""><div class="">cfg = []</div><div class="">cfg.method = ‘triangulation’</div><div class="">cfg.feedback = ‘yes’ % with this you get the feedback plot</div><div class="">cfg.layout = ‘neuromag306cmb.lay'</div><div class="">neigh = ft_prepare_neighbours(cfg)</div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">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.</div><div class="">of course you can plot them each of course. </div><div class="">I don’t think you need to specify the combination method there though, as ‘sum’ is default for power. </div><div class="">cheers</div><div class="">philipp</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 16 Jan 2016, at 18:26, victoria schroeder <<a href="mailto:vic.schroeder2@gmail.com" class="">vic.schroeder2@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Hi !</div><div class=""><br class=""></div><div class="">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 :</div><div class=""><i class=""><br class=""></i></div><div class=""><div class=""><i class="">Selected channel MEG1032+1033, which has 7 neighbours: MEG0622+0623, MEG1012+1013, MEG1022+1023, MEG1042+1043, MEG1112+1113, MEG1122+1123, MEG1242+1243</i></div><div class=""><i class="">Selected channel MEG0742+0743, which has 7 neighbours: MEG0432+0433, MEG0712+0713, MEG0722+0723, MEG0732+0733, MEG1822+1823, MEG1832+1833, MEG2242+2243<br class=""></i></div></div><div class=""><br class=""></div><div class="">however what i see is:</div><div class=""><br class=""></div><div class=""><div class=""><i class="">Selected channel MEG0741, which has 0 neighbours: </i></div><div class=""><i class="">Selected channel MEG0731, which has 0 neighbours: </i></div><div class=""><i class="">Selected channel MEG0742+0743, which has 7 neighbours: MEG0432+0433, MEG0712+0713, MEG0722+0723, MEG0732+0733, MEG1822+1823, MEG1832+1833, MEG2242+2243</i></div><div class=""><i class="">Selected channel MEG0711, which has 0 neighbours: </i></div><div class=""><i class="">Selected channel MEG0741, which has 0 neighbours: </i></div></div><div class=""><br class=""></div><div class="">It is absolutely random when the correct output occurs. When clicking on a particular channel it would randomly show me the following results:</div><div class=""><br class=""></div><div class=""><div class=""><i class="">Selected channel MEG1032+1033, which has 7 neighbours: MEG0622+0623, MEG1012+1013, MEG1022+1023, MEG1042+1043, MEG1112+1113, MEG1122+1123, MEG1242+1243</i></div><div class=""><br class=""></div><div class="">or</div><div class=""><br class=""></div><div class=""><i class="">Selected channel MEG1031, which has 0 neighbours: </i></div></div><div class=""><br class=""></div><div class="">Do you have any suggestions why this happen? Are the channels not grouped correctly?</div><div class=""><br class=""></div><div class="">Below is the code starting from the time-frequency analysis of the data.</div><div class=""><br class=""></div><div class="">Thank you very much</div><div class="">Victoria</div><div class=""><br class=""></div><div class="">cfg = [];</div><div class="">cfg.output = 'pow';</div><div class="">cfg.channel = 'MEGGRAD';</div><div class="">cfg.method = 'mtmconvol';</div><div class="">cfg.taper = 'hanning';</div><div class="">cfg.foi = [2:2:30];</div><div class="">%cfg.keeptrials = 'yes';   for stats keep trials</div><div class="">cfg.t_ftimwin    = ones(length(cfg.foi),1).*0.5;   % length of time window = 0.5 sec</div><div class="">cfg.toi          = [-1.3:0.05:1];   </div><div class="">cfg.keeptrials   = 'yes';</div><div class="">FreqCon = ft_freqanalysis(cfg, Con_clean);</div><div class="">FreqIncon = ft_freqanalysis(cfg, Incon_clean);</div><div class=""><br class=""></div><div class="">%combine planar</div><div class="">cfg = [];</div><div class="">cfg.method ='sum';</div><div class="">ComCon = ft_combineplanar(cfg,FreqCon);</div><div class="">ComIncon = ft_combineplanar(cfg, FreqIncon);</div><div class=""><br class=""></div><div class=""><div class="">% plot neighbours</div><div class="">cfg=[];</div><div class="">cfg.method        = 'triangulation';</div><div class="">cfg.layout           = 'neuromag306cmb.lay';</div><div class="">ft_neighbourplot(cfg,ComCon)</div></div></div>
_______________________________________________<br class="">fieldtrip mailing list<br class=""><a href="mailto:fieldtrip@donders.ru.nl" class="">fieldtrip@donders.ru.nl</a><br class="">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</div></blockquote></div><br class=""></div></body></html>