[FieldTrip] potential problem with ft_topoplotER

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


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=[];

            cfg.method='mtmfft';

            cfg.output='powandcsd';

            cfg.calcdof='yes';

            cfg.taper='hanning';

            cfg.channelcmb={'MEG***2',refchan;'MEG***3',refchan};

            cfg.foilim=[5 90];

            freq1=ft_freqanalysis(cfg,data1);

 

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.

 

 freq1.powspctrm=zeros(size(freq1.powspctrm));

ind=strmatch('MEG2222',freq1.label);

freq1.powspctrm(ind,:)=1;

 

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

 

cfg=[];

cfg.xparam='freq';

cfg.zparam='powspctrm';

cfg.cohrefchannel=refchan;

cfg.layout='/data/apps/fieldtrip/latest/template/neuromag306all.lay';

ft_topoplotER(cfg,freq1)

 

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

 

freq1=rmfield(freq1,'labelcmb'); 

 

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

 

 

 

 

 

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

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110304/81fb20b3/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: topo1.jpg
Type: image/jpeg
Size: 23667 bytes
Desc: topo1.jpg
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110304/81fb20b3/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: topo2.jpg
Type: image/jpeg
Size: 17309 bytes
Desc: topo2.jpg
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110304/81fb20b3/attachment-0003.jpg>


More information about the fieldtrip mailing list