<div dir="ltr"><div>Dear all,</div><div><br></div><div>I recently encountered a problem using the function ft_selectdata to select a subset of channels from my EEG dataset.</div><div> </div><div>I found out that in the output of the function ft_selectdata, channels are sorted alphabetically. For me, that represents a problem since I would like to plot the results from a cluster based permutation test using the information stored in stat.mask (in which the order of channels is in line with the original order of channels, i.e. not alphabetically) on the ERP grandaverage of specific electrodes selected with ft_selectdata, to see which time points are significantly different between my experimental conditions. Due to the different orders of the channels, the mask is plotted over the wrong channels.</div>

<div> </div><div>Is there a way to avoid that the function automatically sorts the labels of the channels alphabetically?</div><div> </div><div>I have already tried the different versions of ft_selectdata (ft_selectdata, ft_selectdata_old, ft_selectdata_new) and updated my Fieldtrip version to the last one available. Nothing changed.</div>

<div><br></div><div>This is the code I use:<br></div><div><br></div><div><div>[stat] = ft_timelockstatistics(cfg, ERP_pain_bp_GA, ERP_buttonpress_GA);</div></div><div><br></div><div> %plotting</div><div><br></div><div>cfgp = [];</div>

<div>cfgp.channel = {'Cz'; 'CPz', 'Pz', 'CP1'. 'CP3', 'CP2', 'CP4'};</div><div>cfgp.avgoverchan = 'no';</div><div>cfgp.latency = [-1 1];</div><div>ERP_pain_bp_GA_red = ft_selectdata_new(cfgp, ERP_pain_bp_GA);</div>

<div>ERP_buttonpress_GA_red = ft_selectdata_new(cfgp, ERP_buttonpress_GA);</div><div> </div><div>% average data across subjects</div><div><br></div><div>cfgp = [];</div><div>cfgp.keepindividual = 'no';</div><div>
ERP_pain_bp_GA_avg = ft_timelockanalysis (cfgp, ERP_pain_bp_GA_red);<br>
</div><div>ERP_buttonpress_GA_avg = ft_timelockanalysis (cfgp, ERP_buttonpress_GA_red);</div><div>% ERP_pain_GA_avg = ft_timelockanalysis (cfg, ERP_pain_GA_red);</div><div><br></div><div>ERP_pain_bp_GA_avg.mask = stat.mask;<br>

</div><div>ERP_buttonpress_GA_avg.mask = stat.mask;</div><div>% ERP_pain_GA_avg.mask = stat.mask;</div><div><br></div><div>% do the plotting</div><div><br></div><div>cfgp = [];</div><div>cfgp.maskparameter = 'mask';</div>

<div>cfgp.maskstyle = 'box';</div><div>cfgp.layout = layout_easycap_painlabmunich;<br></div><div><br></div><div>ft_multiplotER(cfgp,ERP_pain_bp_GA_avg, ERP_buttonpress_GA_avg); <br></div><div><br></div><div>Thanks in advance!</div>

<div><div dir="ltr"><div><br></div><div><font color="#999999">___________________________________________</font></div><div><br></div><font color="#999999">Martina Postorino, M.Sc</font><div><font color="#999999">Phd program in Medical Life Science and Technology</font></div>

<div><font color="#999999"><br></font></div><div><div><font color="#999999">Neuroimaging Center (TUM-NIC)<br></font></div><div><font color="#999999">Technische Universität München, Klinikum Rechts der Isar</font></div><div>

<br></div></div></div></div>
</div>