[FieldTrip] potential problem with ft_topoplotER

Jan.Hirschmann at med.uni-duesseldorf.de Jan.Hirschmann at med.uni-duesseldorf.de
Fri Mar 4 17:15:45 CET 2011

Hi JM,


I am using yesterday's release. I am specifying cfg.cohrefchannel because I get an error otherwise:


Error using ==> ft_topoplotER at 454

no reference channel is specified


Indeed, calling freqdescriptives solves the problem.






Von: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] Im Auftrag von jan-mathijs schoffelen
Gesendet: Freitag, 4. März 2011 16:04
An: Email discussion list for the FieldTrip project
Betreff: Re: [FieldTrip] potential problem with ft_topoplotER


Hi Jan,


Which FT-version are you using? There have been quite some changes to the code recently, so let's be sure that you are working from the most recent version.

Then, why do you specify a cohrefchannel in your configuration if you want to plot power? That probably does not have to do with it, but I'm just curious.


If you are interested in plotting power at this stage, I would first call ft_freqdescriptives on your variable freq1. That should solve your problem, right?






On Mar 4, 2011, at 3:27 PM, <Jan.Hirschmann at med.uni-duesseldorf.de> <Jan.Hirschmann at med.uni-duesseldorf.de> wrote:

Dear fieldtrip developers,


I don't know whether it is a bug or due to badly chosen settings, but I have experienced a problem with ft_topoplotER.  I suspect that the function does not plot power values appropriately in the presence of labelcmb field. I do frequency analysis with the output powandcsd with the newest fieldtrip release:








            cfg.foilim=[5 90];



What I get is a power spectrum matrix with all the channels of the original data and a cross spectrum matrix according to my labelcmb.


freq1 =


       label: {320x1 cell}

       dimord: 'chan_freq'

       freq: [1x88 double]

       powspctrm: [320x88 double]

       labelcmb: {204x2 cell}

       crsspctrm: [204x88 double]

       dof: [240x88 double]

       cumtapcnt: [240x1 double]

       grad: [1x1 struct]

       cfg: [1x1 struct]


After having some doubts about the power topoplots I set all but one channel in the .powspctrm field to 0.






When plotting I don't see the one channel that has power but everything is 0 (see topo1.jpg)









Yet, when I remove the labelcmb field from freq1 it works alright (topo2.jpg)




Likewise, I may get the index ind from freq1.labelcmb(:,1), set it to 1, and it works. So it seems that topoplotER plots 204 channel values (number of rows in .labelcmb and .crsspctrm) although there are 306 MEG channels in the frequency data.  I guess in such a situation channel data is neglected in the topoplots without the user being aware and the values may not be plotted at the correct place. I hope this helps in the development and is not simply a user error from my side.


Best to you,







Jan Hirschmann

MSc. Neuroscience

Insititute of Clinical Neuroscience and Medical Psychology

Heinrich Heine University Duesseldorf

Universitaetsstr.  1
40225  Duesseldorf

Tel: 0049 - (0)211 - 81 - 18415



fieldtrip mailing list
fieldtrip at donders.ru.nl


Dr. J.M. (Jan-Mathijs) Schoffelen 

Donders Institute for Brain, Cognition and Behaviour, 
Centre for Cognitive Neuroimaging,
Radboud University Nijmegen, The Netherlands

J.Schoffelen at donders.ru.nl

Telephone: 0031-24-3614793


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110304/9cf35e73/attachment-0002.html>

More information about the fieldtrip mailing list