[FieldTrip] time frequency data looks blocky and stripy rather than smooth and swirly
popwatson at hotmail.com
Thu Jan 10 09:10:57 CET 2019
Thanks Stephen (and Julian who replied at the same time).
I suspected it was something along these lines as indeed when I subtract one condition from the other, the figures look much more like traditional swirly depictions. The paper I am replicating does not mention anything re. baseline correction of results but I guess that's what they must have done.
Just glad to know that all makes sense! Many thanks
From: fieldtrip <fieldtrip-bounces at science.ru.nl> on behalf of Stephen Whitmarsh <stephen.whitmarsh at gmail.com>
Sent: 10 January 2019 5:35 PM
To: FieldTrip discussion list
Subject: Re: [FieldTrip] time frequency data looks blocky and stripy rather than smooth and swirly
I suspect this is because:
1) you are using half a second for your sliding time-window, which is reasonable, but only have 1.5 seconds of data, of which you plot only one. This doesn't give much room for 'fuzzyness' in the sense of changes over time.
2) because you are not baseline correcting the results, you will mosly see 1/f power, i.e. more power in the lower frequency bands, which will be relatively stronger than any changes over time.
To solve this:
1) calculate the TFR over a longer time-window, both before and after stimulation onset.
2) use a relative baseline correction
That should hopefully give you the fuzzyness you want.
On Thu, 10 Jan 2019 at 06:14, Poppy Watson <popwatson at hotmail.com<mailto:popwatson at hotmail.com>> wrote:
I’m replicating a study that used fieldtrip for TF analysis (and has some lovely single electrode TF plots for each experimental condition). I’ve been running ft_freqanalysis using the following settings.
cfg = ;
cfg.trials = trialsToUse; % this is a vector of trial numbers
cfg.method = 'mtmconvol';
cfg.output = 'pow';
cfg.channel = 'eeg';
cfg.taper = 'hanning';
cfg.foi = 2:2:30;
%cfg.t_ftimwin = 4 ./ cfg.foi;
cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5;
cfg.toi = -1.25:0.10:0.25; % 100 ms sliding time window
The output and stats etc seem to all make sense but my concern is that when I plot the data e.g. from one electrode (collapsed across the whole pp group)– I don’t get beautiful fuzzy TF graphs – instead I get very blocky/stripy figures like the attached where there doesn’t seem to be any smoothing/bleeding across different frequencies. I’ve tried playing around with the cfg.foi as well as the length of the time window and sliding window (cfg.t_ftimwin and cfg.toi) but the results always look very blocky rather than all warm and fuzzy (i.e. as seen in raw-TFdata-of-single-electrode images in various publications). Am I missing some smoothing parameters??
This is my singleplot_TFR code:
cfg = [ ] ;
cfg.channel = 'FCz';
cfg.xlim = [-1 0]; %before stimulus appears
cfg.ylim = [2 20]; % [8 12] only alpha
cfg.zlim = [0 15];
cfg.maskstyle = 'saturation';
cfg.masknans = 'yes';
fieldtrip mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fieldtrip