[FieldTrip] singleplotTFR error

Roemer van der Meij r.vandermeij at donders.ru.nl
Tue Jan 25 17:53:53 CET 2011


Hi Karl,

Sorry for my late reply. We are looking for a proper fix for this issue, 
it occurs in several situations. Any axes that are not monotonously 
increasing causes a crash in uimagesc, because it cannot determine how 
to plot the data (if I recall correctly, uimagesc plots multiple copies 
of the same data when axes are not evenly spaced). For the moment, you 
can try to hack the frequency axis to conform to the monotonously 
increasing part/(in most cases a simple round() would do it)/. Or, you 
can hack it by changing it to a linear index, and then add the 
axis-labels by hand afterwards /(by using set(gca,'ytick', [index 
vector], 'yticklabel', string-array of num2str(freq-axis))/.

Best,
Roemer



On 17-01-11 2:51, Karl Doron wrote:
> Hello Roemer,
>
> Here's the cfg's and output from calls to ft_freqanalysis with 
> method='wavelet' and the subsequent call to ft_singleplotTFR and the 
> resulting error. The imagesc command will however plot the data at 
> that 
> channel imagesc(squeeze(wvpow.powspctrm(strmatch('A177',label),:,:))) 
>  Thanks for any help!
>
> cfg              = [];
>
> cfg.output       = 'pow';
>
> cfg.channel      = 'MEG';
>
> cfg.method       = 'wavelet';
>
> cfg.foi          = 10:2:30;
>
> cfg.toi          = 0.0:0.05:2.75;
>
> wvpow = ft_freqanalysis(cfg, data_spctrm);
>
> wvpow =
>
>         label: {246x1 cell}
>
>        dimord: 'chan_freq_time'
>
>          freq: [1x11 double]
>
>          time: [1x56 double]
>
>     powspctrm: [246x11x56 double]
>
>          grad: [1x1 struct]
>
>           cfg: [1x1 struct]
>
> %Singleplot results
>
> cfg              = [];
>
> cfg.channel      = 'A177';
>
> cfg.grad         =  grad;
>
> cfg.xlim         = [0.6 2.5];
>
> cfg.ylim         = [10 20];
>
> figure;
>
> ft_singleplotTFR(cfg, wvpow)
>
> Warning: (one of the) axis are not evenly spaced -> nans cannot
>
> be maskedout->cfg.masknansissetto'no';
>
> > In ft_singleplotTFR at 296
>
> ??? Attempted toaccessc(6,1); index outofboundsbecause
>
> size(c)=[5,37].
>
> Error in==>uimageat124
>
>             ce(j,i) = c(indi(end), indj(end));
>
> Error in==>uimagescat46
>
>     hh = uimage(varargin{:},'CDataMapping','scaled');
>
> Error in==>ft_plot_matrixat192
>
>   h = uimagesc(hdat, vdat, cdat, clim);
>
> Error in==>ft_singleplotTFRat327
>
>   ft_plot_matrix(data.(cfg.xparam)(xidc),data.(cfg.yparam)(yidc),
>
>   TFR, 'clim',[zmin,zmax],'tag','cip')
>
>
>
> On Sun, Jan 16, 2011 at 2:20 AM, Roemer van der Meij 
> <r.vandermeij at donders.ru.nl <mailto:r.vandermeij at donders.ru.nl>> wrote:
>
>     Hi Karl,
>
>     Could you give some more information on the errors? Could you also
>     post your cfg's? That will help in finding and fixing the bug.
>     What FieldTrip version are you using?
>
>     Best,
>     Roemer
>
>
>
>     On 15-1-2011 18:05, Karl Doron wrote:
>>     Hello,
>>
>>     Has anyone else reported a problem with ft_singleplotTFR and
>>     output of the new specest module?
>>
>>     multiplotTFR works, but 'interactive' method fails.
>>
>>     It looks like the error occurs when trying to mask NaNs
>>
>>     % masking only possible for evenly spaced axis
>>
>>     if strcmp(cfg.masknans, 'yes') && (~evenx || ~eveny)
>>
>>       warning('(one of the) axis are not evenly spaced -> nans cannot
>>     be masked out ->  cfg.masknans is set to ''no'';')
>>
>>       cfg.masknans = 'no';
>>
>>     end
>>
>>
>>
>>     Thank you,
>>     karl doron
>>     UCSB
>>
>>
>>     _______________________________________________
>>     fieldtrip mailing list
>>     fieldtrip at donders.ru.nl  <mailto:fieldtrip at donders.ru.nl>
>>     http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
>     -- 
>     Roemer van der Meij M.Sc.
>     PhD student
>     Donders Institute for Brain, Cognition and Behaviour
>     Centre for Cognition
>     P.O. Box 9104
>     6500 HE Nijmegen
>     The Netherlands
>     Tel: +31(0)24 3655932
>     E-mail: r.vandermeij at donders.ru.nl <mailto:r.vandermeij at donders.ru.nl>
>
>     _______________________________________________
>     fieldtrip mailing list
>     fieldtrip at donders.ru.nl <mailto:fieldtrip at donders.ru.nl>
>     http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

-- 
Roemer van der Meij M.Sc.
PhD student
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognition
P.O. Box 9104
6500 HE Nijmegen
The Netherlands
Tel: +31(0)24 3655932
E-mail: r.vandermeij at donders.ru.nl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110125/72f00d1f/attachment-0002.html>


More information about the fieldtrip mailing list