[FieldTrip] problem with ft_freqanalysis
"Jörn M. Horschig"
jm.horschig at donders.ru.nl
Fri Oct 19 12:13:32 CEST 2012
Hey Nenad,
the problem is simply that in the beginning of your TFR there are nans
and you are using that part as a baseline.
You cannot have a 0.5s timewindow at t=-0.5s up until t=0s when your
preprocessed data starts at t=-0.5s, you would need preprocessed
starting at -1s. When plotting, you chose to use a baseline which starts
within the nan area, so all your data will be substracted with nans
resulting in nans itself.
Three solution possible:
1) Use a baseline outside the nan area (for you t>=0)
2) Re-do your processing starting at t=-1s or
3) Use shorter time windows for your freq analysis of only 300ms
(because then your baseline starting at 200ms would work, since 500-300
= 200)
I'd recommend the second one - always use data padding when doing analysis.
Best regards,
Jörn
On 10/19/2012 11:46 AM, Nenad Polomac wrote:
> Dear all,
>
> I have one problem with the ft_freqanalysis. When I calculate
> time-frequency analysis with the Hanning taper everything works ok,
> but when I try to plot data with ft_multiplotTFR or ft_topoplotTFR I
> get empty plots. You can check that in the attached image. However,
> when I calculate time-frequency with the multitapers plot looks fine.
> Here is my problematic code:
>
>
> %Hanning taper
> cfg = [];
> cfg.output = 'pow';
> cfg.channel = 'MEG';
> cfg.method = 'mtmconvol';
> cfg.taper = 'hanning';
> cfg.foi = 2:2:30;
> cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; % length of time
> window = 0.5 sec
> cfg.toi = -0.5:0.05:1.5; % time window
> "slides" from -0.5 to 1.5 sec in steps of 0.05 sec
> cfg.polyremoval = -1;
> wr11_freq = ft_freqanalysis(cfg, data_clean);
>
>
> cfg = [];
> cfg.baseline = [-0.2 -0.1];
> cfg.baselinetype = 'absolute';
> cfg.zlim = [-4e-29 1e-28];
> cfg.showlabels = 'yes';
> cfg.layout = 'CTF275.lay';
> cfg.colorbar= 'yes';
> cfg.interactive= 'yes';
> cfg.hotkeys = 'yes';
> figure
> ft_multiplotTFR(cfg, wr11_freq);
>
> Please help!
> Thank you in advance!
>
> Nenad
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
--
Jörn M. Horschig
PhD Student
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognitive Neuroimaging
Radboud University Nijmegen
Neuronal Oscillations Group
FieldTrip Development Team
P.O. Box 9101
NL-6500 HB Nijmegen
The Netherlands
Contact:
E-Mail: jm.horschig at donders.ru.nl
Tel: +31-(0)24-36-68493
Web: http://www.ru.nl/donders
Visiting address:
Trigon, room 2.30
Kapittelweg 29
NL-6525 EN Nijmegen
The Netherlands
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20121019/e2b5899d/attachment-0002.html>
More information about the fieldtrip
mailing list