<div dir="ltr">Dear Tzvetan<div><br></div><div>Are you sure about that in the tutorial <a href="http://www.fieldtriptoolbox.org/tutorial/natmeg/preprocessing">http://www.fieldtriptoolbox.org/tutorial/natmeg/preprocessing</a> neuromag data is used and ft_combineplanar is used to combine the gradiometers. This is a paragraph from this tutorial:</div><div><br></div><div><p style="padding:0px;margin:0px 0px 1em;font-size:15px;line-height:22.5px;color:rgb(0,0,0);font-family:Calibri,Geneva,Arial,Verdana,sans-serif;text-align:justify">In fact, we are now plotting the two different gradiometers together. You can see the channel locations being in pairs, one above the other. They are in reality, however, at the same location but oriented differently - radially and axially <em style="padding:0px;margin:0px">with respect to the surface of the helmet</em>. They can thereby pick up both radial orientations of the magnetic fields. To use them properly for the purpose of plotting, we should therefor combine them first, adding their fields.</p><pre class="" style="padding:0.5em;margin-top:0px;margin-bottom:1em;font-size:12px;border:1px dashed rgb(204,204,204);color:rgb(0,0,0);overflow:hidden;font-family:Consolas,'Andale Mono',Menlo,Monaco,monospace;white-space:pre-wrap;width:640px;text-align:justify;background-color:rgb(247,249,250)">TFR_left_MEG_comb  = ft_combineplanar<span class="" style="padding:0px;margin:0px;color:rgb(102,204,102)">(</span><span class="" style="padding:0px;margin:0px;color:rgb(102,204,102)">[</span><span class="" style="padding:0px;margin:0px;color:rgb(102,204,102)">]</span>,TFR_left_MEG<span class="" style="padding:0px;margin:0px;color:rgb(102,204,102)">)</span>;
TFR_right_MEG_comb = ft_combineplanar<span class="" style="padding:0px;margin:0px;color:rgb(102,204,102)">(</span><span class="" style="padding:0px;margin:0px;color:rgb(102,204,102)">[</span><span class="" style="padding:0px;margin:0px;color:rgb(102,204,102)">]</span>,TFR_right_MEG<span class="" style="padding:0px;margin:0px;color:rgb(102,204,102)">)</span>;
 
cfg = <span class="" style="padding:0px;margin:0px;color:rgb(102,204,102)">[</span><span class="" style="padding:0px;margin:0px;color:rgb(102,204,102)">]</span>;
cfg.<span class="" style="padding:0px;margin:0px;color:rgb(0,102,0)">baseline</span>     = <span class="" style="padding:0px;margin:0px;color:rgb(102,204,102)">[</span>-<span class="" style="padding:0px;margin:0px;color:rgb(204,102,204)">0.5</span> -<span class="" style="padding:0px;margin:0px;color:rgb(204,102,204)">0.1</span><span class="" style="padding:0px;margin:0px;color:rgb(102,204,102)">]</span>; 
cfg.<span class="" style="padding:0px;margin:0px;color:rgb(0,102,0)">baselinetype</span> = <span class="" style="padding:0px;margin:0px;color:rgb(128,128,128);font-style:italic">'absolute'</span>;
cfg.<a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/xlim.html" title="" style="padding:0px;margin:0px;color:rgb(0,136,204);text-decoration:none"><span class="" style="padding:0px;margin:0px;color:rgb(0,0,0);font-weight:bold">xlim</span></a>         = <span class="" style="padding:0px;margin:0px;color:rgb(102,204,102)">[</span><span class="" style="padding:0px;margin:0px;color:rgb(204,102,204)">0.4</span> <span class="" style="padding:0px;margin:0px;color:rgb(204,102,204)">0.8</span><span class="" style="padding:0px;margin:0px;color:rgb(102,204,102)">]</span>;   
cfg.<a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/ylim.html" title="" style="padding:0px;margin:0px;color:rgb(0,136,204);text-decoration:none"><span class="" style="padding:0px;margin:0px;color:rgb(0,0,0);font-weight:bold">ylim</span></a>         = <span class="" style="padding:0px;margin:0px;color:rgb(102,204,102)">[</span><span class="" style="padding:0px;margin:0px;color:rgb(204,102,204)">15</span> <span class="" style="padding:0px;margin:0px;color:rgb(204,102,204)">25</span><span class="" style="padding:0px;margin:0px;color:rgb(102,204,102)">]</span>;
cfg.<a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/zlim.html" title="" style="padding:0px;margin:0px;color:rgb(0,136,204);text-decoration:none"><span class="" style="padding:0px;margin:0px;color:rgb(0,0,0);font-weight:bold">zlim</span></a>         = <span class="" style="padding:0px;margin:0px;color:rgb(102,204,102)">[</span>-4e-24 4e-24<span class="" style="padding:0px;margin:0px;color:rgb(102,204,102)">]</span>;         
cfg.<span class="" style="padding:0px;margin:0px;color:rgb(0,102,0)">marker</span>       = <span class="" style="padding:0px;margin:0px;color:rgb(128,128,128);font-style:italic">'on'</span>;
cfg.<span class="" style="padding:0px;margin:0px;color:rgb(0,102,0)">layout</span>       = <span class="" style="padding:0px;margin:0px;color:rgb(128,128,128);font-style:italic">'neuromag306cmb.lay'</span>;
 
<a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure.html" title="" style="padding:0px;margin:0px;color:rgb(0,136,204);text-decoration:none"><span class="" style="padding:0px;margin:0px;color:rgb(0,0,0);font-weight:bold">figure</span></a>;
ft_topoplotTFR<span class="" style="padding:0px;margin:0px;color:rgb(102,204,102)">(</span>cfg, TFR_left_MEG_comb<span class="" style="padding:0px;margin:0px;color:rgb(102,204,102)">)</span>;
<a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/print.html" title="" style="padding:0px;margin:0px;color:rgb(0,136,204);text-decoration:none"><span class="" style="padding:0px;margin:0px;color:rgb(0,0,0);font-weight:bold">print</span></a> -dpng natmeg_freq13.<span class="" style="padding:0px;margin:0px;color:rgb(0,102,0)">png</span></pre></div><div>Thus, it should be possible to use ft_combineplanar for neuromag data.</div><div>What do you think?</div><div><br></div><div>Cheers</div><div>Victoria</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-01-16 18:00 GMT+00:00 Tzvetan Popov <span dir="ltr"><<a href="mailto:tzvetan.popov@uni-konstanz.de" target="_blank">tzvetan.popov@uni-konstanz.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Dear Victoria,</div><div>you should remove the ft_combineplanar step from your analysis pipeline. This function takes input from ft_megplanar. The latter is applied only to magnetometers or axial gradiometers. </div><div><br></div><div>best</div><div>tzvetan</div><div> <br><br><blockquote type="cite"><div><div class="h5"><div dir="ltr"><div>Hi !</div><div><br></div><div>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><i><br></i></div><div><div><i>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><i>Selected channel MEG0742+0743, which has 7 neighbours: MEG0432+0433, MEG0712+0713, MEG0722+0723, MEG0732+0733, MEG1822+1823, MEG1832+1833, MEG2242+2243<br></i></div></div><div><br></div><div>however what i see is:</div><div><br></div><div><div><i>Selected channel MEG0741, which has 0 neighbours: </i></div><div><i>Selected channel MEG0731, which has 0 neighbours: </i></div><div><i>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><i>Selected channel MEG0711, which has 0 neighbours: </i></div><div><i>Selected channel MEG0741, which has 0 neighbours: </i></div></div><div><br></div><div>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><br></div><div><div><i>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><br></div><div>or</div><div><br></div><div><i>Selected channel MEG1031, which has 0 neighbours: </i></div></div><div><br></div><div>Do you have any suggestions why this happen? Are the channels not grouped correctly?</div><div><br></div><div>Below is the code starting from the time-frequency analysis of the data.</div><div><br></div><div>Thank you very much</div><div>Victoria</div><div><br></div><div>cfg = [];</div><div>cfg.output = 'pow';</div><div>cfg.channel = 'MEGGRAD';</div><div>cfg.method = 'mtmconvol';</div><div>cfg.taper = 'hanning';</div><div>cfg.foi = [2:2:30];</div><div>%cfg.keeptrials = 'yes';   for stats keep trials</div><div>cfg.t_ftimwin    = ones(length(cfg.foi),1).*0.5;   % length of time window = 0.5 sec</div><div>cfg.toi          = [-1.3:0.05:1];   </div><div>cfg.keeptrials   = 'yes';</div><div>FreqCon = ft_freqanalysis(cfg, Con_clean);</div><div>FreqIncon = ft_freqanalysis(cfg, Incon_clean);</div><div><br></div><div>%combine planar</div><div>cfg = [];</div><div>cfg.method ='sum';</div><div>ComCon = ft_combineplanar(cfg,FreqCon);</div><div>ComIncon = ft_combineplanar(cfg, FreqIncon);</div><div><br></div><div><div>% plot neighbours</div><div>cfg=[];</div><div>cfg.method        = 'triangulation';</div><div>cfg.layout           = 'neuromag306cmb.lay';</div><div>ft_neighbourplot(cfg,ComCon)</div></div></div></div></div>
_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></blockquote></div><br></div><br>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div><br></div>