[FieldTrip] ft_freqanalysis wavelet problem
stephen.whitmarsh at gmail.com
Thu Jul 26 11:32:36 CEST 2018
The warning seems reasonable to me, as the output times probably don't map
perfectly on the input times. (BTW, your cfg.toi is rather dense, given
that you use a width of 7, you can probably increase the time intervals a
lot without losing much information, speeding it up as well)
Why you get a 'blue output' is hard to say, but you can set the zlim e.g.
as 'absmax'. Take a look at the ft_freqanalysis function help in the
beginning of the code (or type 'help ft_freqanalysis' in the MATLAB command
window), to see your options there. You might want to play with a baseline
correction in ft_freqanalysis to help visualise data with is otherwise
affected with 1/f power. Also, check out FieldTrip visualisation tutorial,
which should help you explore the options.
On 26 July 2018 at 09:57, Silvia Formica <Silvia.Formica at ugent.be> wrote:
> Dear all,
> I am new to fieldtrip so I apologize in advance if my question is trivial.
> I am trying to run a time frequency analysis with Morlet wavelets.
> Here is the code I am using:
> cfg = ;
> cfg.channel = 1:64;
> cfg.method = 'wavelet';
> cfg.pad = 10;
> cfg.width = 7;
> cfg.output = 'pow';
> cfg.foi = 4:1:30;
> cfg.toi = 0:0.0039:2; % my sampling rate is 512 Hz
> TFRwave = ft_freqanalysis(cfg, data_clean);
> Where data_clean is the struct containing my trials. All my trials are
> the same length.
> When I run this code, I get the following warning:
> Warning: output time-bins are different from input time-bins
> trial 1, frequency 26 (29.00 Hz)
> Warning: output time-bins aretrial 2, frequency 25 (28.00 Hz)
> Warning: output time-bins aretrial 3, frequency 24 (27.00 Hz)
> Warning: output time-bins aretrial 4, frequency 25 (28.00 Hz)
> Warning: output time-bins aretrial 5, frequency 23 (26.00 Hz)
> I have no idea what this means. Any suggestion?
> Despite the warning, the TRFwave is computed, but when I try to plot it I
> get a completely blue output. Here is the code I am using for the plot:
> cfg = ;
> cfg.baseline = [-0.5 -0.1];
> cfg.baselinetype = 'absolute';
> cfg.zlim = [-3e-27 3e-27];
> cfg.showlabels = 'yes';
> cfg.layout = 'biosemi64.lay';
> ft_multiplotTFR(cfg, TFRwave)
> When I check the content of my TFRwave I can see it is not made of NaNs.
> Is the problem due to the setting cfg.zlim? It is not clear to me how to
> set it.
> Thanks in advance for any help!
> fieldtrip mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fieldtrip