<div dir="ltr"><div><div><div><div><div><div>Hi Ulrich,<br><br></div>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.<br>
<br></div>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.<br>
<br></div>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.<br><br></div>If someone has a more in-depth explanation or if I got this completely wrong, please correct me!<br>
<br></div>Best, <br><br></div>Julian<br><br><div><span class="" style><span class="" style>
<div style>
<div>
<div style>********************</div>
<div style><b>Dr. Julian Keil</b></div>
<div style><b><br>
</b></div>
AG Multisensorische Integration<br>
Psychiatrische Universitätsklinik<br>
der Charité im St. Hedwig-Krankenhaus<br>
Große Hamburger Straße 5-11, Raum E 307<br>
10115 Berlin</div>
<div><br>
Telefon: +49-30-2311-1879<br>
Fax:        +49-30-2311-2209 </div>
<div><a href="https://exchange.charite.de/OWA/redir.aspx?C=c7qQWF7DSUm3VN0O52uXjZ0zg9X3TdFIuwoAfgOmEHEAmcR8xO9dPqvep5v_-KMAyIi4PBRfWeo.&URL=http%3a%2f%2fpsy-ccm.charite.de%2fforschung%2fbildgebung%2fag_multisensorische_integration" target="_blank">http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration</a></div>

</div>
</span></span></div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, May 27, 2014 at 3:18 PM, Pomper, Ulrich <span dir="ltr"><<a href="mailto:Ulrich.Pomper@charite.de" target="_blank">Ulrich.Pomper@charite.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear community,<br>
I have a question regarding  time-frequency transformation.<br>
The data I want to analyse last from -800 to -200 ms before stimulus onset, I'm using a 400 ms taper.<br>
Importantly, want to make sure that no stimulus-evoked activity leaks into my prestim analysis.<br>
<br>
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<br>

Suprisingly, I get quite different looking results when using a longer data segment (-1200 to 0 ms) (fig. bottom row) without padding.<br>
<br>
Can someone explain to me what is going on here, and which approach would be more correct?<br>
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.<br>
Note that the difference between conditions (left coloumn) look almost identical, so whatever happens, it happens to both conditions very similarly.<br>
<br>
I hope someone can educate me on that matter.<br>
Cheers, Ulrich<br>
<br>
<br>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br>
%% TF transform %%<br>
<br>
            cfg = [];<br>
            cfg.continuous = 'no';<br>
            cfg.channel      = 'all';<br>
            cfg.output = 'pow';<br>
            cfg.method       = 'mtmconvol';<br>
            cfg.foi          =  2:0.5:35;<br>
            cfg.toi          =  -1:0.01:0;<br>
            cfg.taper   = 'hanning';<br>
            cfg.tapsmofrq = 2;<br>
            cfg.t_ftimwin    = 400<br>
            % cfg.pad        = 5;<br>
...<br>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div><br></div>