<div dir="ltr">Dear P.,<div><br></div><div>I suspect this is because:</div><div>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.</div><div>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.</div><div><br></div><div>To solve this:</div><div>1) calculate the TFR over a longer time-window, both before and after stimulation onset.</div><div>2) use a relative baseline correction</div><div><br></div><div>That should hopefully give you the fuzzyness you want.</div><div><br></div><div>Cheers,</div><div>Stephen</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, 10 Jan 2019 at 06:14, Poppy Watson <<a href="mailto:popwatson@hotmail.com">popwatson@hotmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="EN-AU">
<div class="gmail-m_-3917479869236669112WordSection1">
<p class="MsoNormal"><span lang="NL">Dear fieldtrippers,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="NL"><u></u> <u></u></span></p>
<p class="MsoNormal">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.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span style="font-size:13pt;font-family:"Courier New";color:black">cfg = [];</span><span style="font-size:12pt;font-family:"Courier New""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:13pt;font-family:"Courier New";color:black">cfg.trials  = trialsToUse;
</span><span style="font-size:13pt;font-family:"Courier New";color:forestgreen">% this is a vector of trial numbers</span><span style="font-size:12pt;font-family:"Courier New""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:13pt;font-family:"Courier New";color:black">cfg.method =
</span><span style="font-size:13pt;font-family:"Courier New";color:rgb(160,32,240)">'mtmconvol'</span><span style="font-size:13pt;font-family:"Courier New";color:black">;</span><span style="font-size:12pt;font-family:"Courier New""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:13pt;font-family:"Courier New";color:black">cfg.output =
</span><span style="font-size:13pt;font-family:"Courier New";color:rgb(160,32,240)">'pow'</span><span style="font-size:13pt;font-family:"Courier New";color:black">;</span><span style="font-size:12pt;font-family:"Courier New""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:13pt;font-family:"Courier New";color:black">cfg.channel =
</span><span style="font-size:13pt;font-family:"Courier New";color:rgb(160,32,240)">'eeg'</span><span style="font-size:13pt;font-family:"Courier New";color:black">;</span><span style="font-size:12pt;font-family:"Courier New""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:13pt;font-family:"Courier New";color:black">cfg.taper =
</span><span style="font-size:13pt;font-family:"Courier New";color:rgb(160,32,240)">'hanning'</span><span style="font-size:13pt;font-family:"Courier New";color:black">;</span><span style="font-size:12pt;font-family:"Courier New""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:13pt;font-family:"Courier New";color:black">cfg.foi = 2:2:30;</span><span style="font-size:12pt;font-family:"Courier New""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:13pt;font-family:"Courier New";color:forestgreen">%cfg.t_ftimwin    = 4 ./ cfg.foi;</span><span style="font-size:12pt;font-family:"Courier New""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:13pt;font-family:"Courier New";color:black">cfg.t_ftimwin    = ones(length(cfg.foi),1).*0.5;</span><span style="font-size:12pt;font-family:"Courier New""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:13pt;font-family:"Courier New";color:black">cfg.toi = -1.25:0.10:0.25;  
</span><span style="font-size:13pt;font-family:"Courier New";color:forestgreen">% 100 ms sliding time window
</span><span style="font-size:12pt;font-family:"Courier New""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:13pt;font-family:"Courier New";color:black">            </span><span style="font-size:12pt;font-family:"Courier New""><u></u><u></u></span></p>
<p class="MsoNormal">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??<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">This is my singleplot_TFR code:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span style="font-size:13pt;font-family:"Courier New";color:black">cfg = [ ] ;</span><span style="font-size:12pt;font-family:"Courier New""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:13pt;font-family:"Courier New";color:black">cfg.channel      =
</span><span style="font-size:13pt;font-family:"Courier New";color:rgb(160,32,240)">'FCz'</span><span style="font-size:13pt;font-family:"Courier New";color:black">;</span><span style="font-size:12pt;font-family:"Courier New""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:13pt;font-family:"Courier New";color:black">cfg.xlim         = [-1 0];
</span><span style="font-size:13pt;font-family:"Courier New";color:forestgreen">%before stimulus appears</span><span style="font-size:12pt;font-family:"Courier New""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:13pt;font-family:"Courier New";color:black">cfg.ylim         = [2 20];
</span><span style="font-size:13pt;font-family:"Courier New";color:forestgreen">% [8 12] only alpha</span><span style="font-size:12pt;font-family:"Courier New""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:13pt;font-family:"Courier New";color:black">cfg.zlim = [0 15];</span><span style="font-size:12pt;font-family:"Courier New""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:13pt;font-family:"Courier New";color:black">cfg.maskstyle    =
</span><span style="font-size:13pt;font-family:"Courier New";color:rgb(160,32,240)">'saturation'</span><span style="font-size:13pt;font-family:"Courier New";color:black">;</span><span style="font-size:12pt;font-family:"Courier New""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:13pt;font-family:"Courier New";color:black">cfg.masknans =
</span><span style="font-size:13pt;font-family:"Courier New";color:rgb(160,32,240)">'yes'</span><span style="font-size:13pt;font-family:"Courier New";color:black">;</span><span style="font-size:12pt;font-family:"Courier New""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:13pt;font-family:"Courier New";color:black">ft_singleplotTFR(cfg, allPPdata_suc_collapsed_high);</span><span style="font-size:12pt;font-family:"Courier New""><u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Many Thanks<u></u><u></u></p>
<p class="MsoNormal">P. Watson<span style="font-size:12pt;color:black"><u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>

_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" rel="noreferrer" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</blockquote></div>