<div dir="ltr">Hi Eelke,<div><br></div><div>thank you very much for ur advice! </div><div><br></div><div>Due to ur help I solved the problem using multiple trials and different frequencies.</div><div><br></div><div>Thanks a lot! </div><div><br></div><div>Best regards</div><div><br></div><div>Nico</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-01-28 12:24 GMT+01:00 Eelke Spaak <span dir="ltr"><<a href="mailto:eelke.spaak@donders.ru.nl" target="_blank">eelke.spaak@donders.ru.nl</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Nico,<br>
<br>
As for question (2), you probably first need to think about what<br>
constitutes a "better" result. Using more tapers with dpss will always<br>
result in more frequency smoothing. If your source signal is primarily<br>
composed of pure sinusoids, and you interpret a spectrum as "better"<br>
if it shows clearer peaks, then you will always get the "best" result<br>
for the single-taper case.<br>
<br>
Multitapering allows optimal control over the amount of smoothing you<br>
obtain in the frequency domain, which is more or less independent of<br>
the amount of smoothing you obtain in the time domain (as opposed to<br>
e.g. wavelets, where these are fundamentally linked). When dealing<br>
with brain signals, you will often find that a certain stimulus might<br>
induce e.g. a gamma response at 40-50 Hz in one subject and one trial,<br>
while in another subject or another trial the same stimulus might<br>
induce a 50-60 Hz response or so. Of course, in the average over<br>
trials (and subjects), this heterogeneity (i.e., noise) will wash out,<br>
but it will severely damage your statistical sensitivity. Therefore,<br>
using multitapers to add smoothing can produce a much more consistent<br>
result and therefore be "better" in the sense of actually<br>
understanding the brain.<br>
<br>
As for your simulation, perhaps using filtered noise would be better<br>
than sinusoids. Also, since multitapering benefits you most strongly<br>
when taking variation over observations into account, you could<br>
consider simulating different observations, each consisting of noise<br>
filtered in a slightly different randomly chosen bandwidth, and<br>
inspecting the resulting variation over observations in the spectra.<br>
<br>
Best,<br>
Eelke<br>
<br>
On 27 January 2015 at 18:36, Max Cantor <<a href="mailto:mcantor@umich.edu">mcantor@umich.edu</a>> wrote:<br>
> Hi Nico,<br>
><br>
> I'm not sure about the second question, but as for the first question, you<br>
> can manually set the scales for ft_singleplotTFR using cfg.zlim.<br>
><br>
> Hope that helps,<br>
><br>
> Max<br>
<div><div class="h5">><br>
> On Tue, Jan 27, 2015 at 11:50 AM, Nico Weeger <<a href="mailto:nico.weeger@googlemail.com">nico.weeger@googlemail.com</a>><br>
> wrote:<br>
>><br>
>> Hello FieldTrip community,<br>
>><br>
>><br>
>><br>
>> I am new to FieldTrip and I try to simulate data to compare the<br>
>> ft_frequanalysis methods Hanning, Multitaper and Wavelet.<br>
>><br>
>> Therefore I simulate Data manually using different latency, amplitude and<br>
>> frequency combinations using the following equation:<br>
>><br>
>> sig1 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f1*t);<br>
>><br>
>> sig2 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f2*t);<br>
>><br>
>> sig3 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f2*t);<br>
>><br>
>> sig4 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f1*t);<br>
>><br>
>> sig = sig1+sig2+sig3+sig4;<br>
>><br>
>> where amp1=20; amp2 = 5; lat1= 1.7; lat2 = 2.3; f1 = 12; f2 = 60;<br>
>><br>
>><br>
>> After using ft_frequanalysis (see the following cfgs)<br>
>><br>
>><br>
>> Cfg Wavelet:<br>
>><br>
>> cfg = [];<br>
>><br>
>> cfg.output = 'pow';<br>
>><br>
>> cfg.channel = labels;<br>
>><br>
>> cfg.method = 'wavelet';<br>
>><br>
>> cfg.width = 7;<br>
>><br>
>> cfg.gwidth = 3;<br>
>><br>
>> cfg.foilim = [1 70];<br>
>><br>
>> cfg.toi = 0:0.05:2;<br>
>><br>
>> TFRwave = ft_freqanalysis(cfg, data_preproc);<br>
>><br>
>><br>
>><br>
>> Cfg Hanning / Multitaper:<br>
>><br>
>> cfg = [];<br>
>><br>
>> cfg.output = 'pow';<br>
>><br>
>> cfg.channel = labels;<br>
>><br>
>> cfg.method = 'mtmconvol'<br>
>><br>
>> cfg.foi = 1:1:70<br>
>><br>
>> cfg.tapsmofrq = 0.2*cfg.foi;<br>
>><br>
>> cfg.taper = 'dpss' / ‘hanning’;<br>
>><br>
>> cfg.t_ftimwin = 4./cfg.foi;<br>
>><br>
>> cfg.toi = 0:0.05:2;<br>
>><br>
>> TFRmult1 = ft_freqanalysis(cfg, data_preproc);<br>
>><br>
>><br>
>><br>
>><br>
>> the data is plotted with ft_singleplotTFR (see cfg below)<br>
>><br>
>><br>
>> cfg singleplot:<br>
>><br>
>> cfg = [];<br>
>><br>
>> cfg.maskstyle = 'saturation';<br>
>><br>
>> cfg.colorbar = 'yes';<br>
>><br>
>> cfg.layout = 'AC_Osc.lay';<br>
>><br>
>> ft_singleplotTFR(cfg, TFRwave);<br>
>><br>
>><br>
>> Two problems occur. First, the power scale of wavelet and<br>
>> Multitaper/Hanning differs extremely (Multi 0-~100 and Wavelet 0-~15*10^4).<br>
>><br>
>> 1. How can I get the scale of all methods equal, or do I have to<br>
>> change the Wavelet settings to get the right scale of the values?<br>
>><br>
>> Second, the best result of Multitaper analysis is performed using only one<br>
>> Taper. The goal was to get a result, where the advantages and disadvantages<br>
>> of Multitaper analysis compared to the other methods can be seen.<br>
>><br>
>> 2. How can I change the simulation so that more tapers show better<br>
>> results than a single taper does?<br>
>><br>
>><br>
>> Thank you for your time and help.<br>
>><br>
>><br>
>> Regards,<br>
>><br>
>><br>
>><br>
>> Nicolas Weeger<br>
>><br>
>> Student of Master-Program Appied Research,<br>
>><br>
>> University Ansbach,<br>
>><br>
>> Germany<br>
>><br>
>><br>
</div></div>>> _______________________________________________<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>
><br>
><br>
><br>
><br>
> --<br>
> Max Cantor<br>
> Lab Manager<br>
> Computational Neurolinguistics Lab<br>
> University of Michigan<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></blockquote></div><br></div>