[FieldTrip] TF transform, data length + padding

Julian Keil julian.keil at gmail.com
Wed May 28 12:36:15 CEST 2014


Hi Ulrich,

one possible explanation for this could be the subtraction of the mean when
calling ft_freqanalysis. If you don't specify cfg.polyremoval explicitly,
the mean is removed. Of course, changing the time-dimension will change the
mean and therefore result in a different value used in the
ft_preproc_polyremoval - step.

I tried this with a dataset, setting cfg.polyremoval to -1, thereby
avoiding the demean results in virtually identical time-freq results for a
short (800ms) or long (1000ms) interval. However, setting cfg.polyremoval
to 0 (the default) will change the output.

Also, setting the padding to 5, as you did in your code, will increase the
frequency resolution which again might influence the way the low
frequencies contribute to your output.

If someone has a more in-depth explanation or if I got this completely
wrong, please correct me!

Best,

Julian

 ********************
*Dr. Julian Keil*

 AG Multisensorische Integration
Psychiatrische Universitätsklinik
der Charité im St. Hedwig-Krankenhaus
Große Hamburger Straße 5-11, Raum E 307
10115 Berlin

Telefon: +49-30-2311-1879
Fax:        +49-30-2311-2209
http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration<https://exchange.charite.de/OWA/redir.aspx?C=c7qQWF7DSUm3VN0O52uXjZ0zg9X3TdFIuwoAfgOmEHEAmcR8xO9dPqvep5v_-KMAyIi4PBRfWeo.&URL=http%3a%2f%2fpsy-ccm.charite.de%2fforschung%2fbildgebung%2fag_multisensorische_integration>



On Tue, May 27, 2014 at 3:18 PM, Pomper, Ulrich <Ulrich.Pomper at charite.de>wrote:

> Dear community,
> I have a question regarding  time-frequency transformation.
> The data I want to analyse last from -800 to -200 ms before stimulus
> onset, I'm using a 400 ms taper.
> Importantly, want to make sure that no stimulus-evoked activity leaks into
> my prestim analysis.
>
> I first tried to cut the segment down to  -1000 to 0 ms and used (zero)
> padding (see figure attached, top row). This would mean that the taper, at
> the last samplepoint of interest (-200ms), would include data up to 0ms
> Suprisingly, I get quite different looking results when using a longer
> data segment (-1200 to 0 ms) (fig. bottom row) without padding.
>
> Can someone explain to me what is going on here, and which approach would
> be more correct?
> Either, the padding in the first variant introduces artificial low
> frequency activity, or the taper in the second variant uses more than
> 400ms, at least for the low frequencies.
> Note that the difference between conditions (left coloumn) look almost
> identical, so whatever happens, it happens to both conditions very
> similarly.
>
> I hope someone can educate me on that matter.
> Cheers, Ulrich
>
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> %% TF transform %%
>
>             cfg = [];
>             cfg.continuous = 'no';
>             cfg.channel      = 'all';
>             cfg.output = 'pow';
>             cfg.method       = 'mtmconvol';
>             cfg.foi          =  2:0.5:35;
>             cfg.toi          =  -1:0.01:0;
>             cfg.taper   = 'hanning';
>             cfg.tapsmofrq = 2;
>             cfg.t_ftimwin    = 400
>             % cfg.pad        = 5;
> ...
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140528/22c7be97/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: poly_vs_nopoly.png
Type: image/png
Size: 32330 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140528/22c7be97/attachment-0001.png>


More information about the fieldtrip mailing list