<div dir="ltr">Hi Nico,<div><br></div><div>I'm not sure about the second question, but as for the first question, you can manually set the scales for ft_singleplotTFR using cfg.zlim.</div><div><br></div><div>Hope that helps,</div><div><br></div><div>Max</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 27, 2015 at 11:50 AM, Nico Weeger <span dir="ltr"><<a href="mailto:nico.weeger@googlemail.com" target="_blank">nico.weeger@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span style="font-size:12.8000001907349px">Hello FieldTrip community,</span><div style="font-size:12.8000001907349px"><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span lang="EN-US">I am new to FieldTrip and I try to simulate data to compare the ft_frequanalysis methods Hanning, Multitaper and Wavelet.</span></p><p class="MsoNormal"><span lang="EN-US">Therefore I simulate Data manually using different latency, amplitude and frequency combinations using the following equation: </span></p><p class="MsoNormal">sig1 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f1*t);</p><p class="MsoNormal">sig2 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f2*t);</p><p class="MsoNormal">sig3 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f2*t);</p><p class="MsoNormal">sig4 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f1*t);</p><p class="MsoNormal">sig = sig1+sig2+sig3+sig4;</p><p class="MsoNormal"><span lang="EN-US">where amp1=20; amp2 = 5; lat1= 1.7; lat2 = 2.3; f1 = 12; f2 = 60;</span></p><p class="MsoNormal"><span lang="EN-US"><br></span></p><p class="MsoNormal"><span lang="EN-US">After using ft_frequanalysis (see the following cfgs)</span></p></div><p class="MsoNormal" style="font-size:12.8000001907349px"><span lang="EN-US" style="font-size:11pt;line-height:16.8666667938232px;font-family:Calibri,sans-serif"><br clear="all"></span></p><div style="font-size:12.8000001907349px"><p class="MsoNormal"><b><span lang="EN-US">Cfg Wavelet:</span></b></p><p class="MsoNormal"><span lang="EN-US">cfg = [];</span></p><p class="MsoNormal"><span lang="EN-US">cfg.output = 'pow'; </span></p><p class="MsoNormal"><span lang="EN-US">cfg.channel = labels; </span></p><p class="MsoNormal"><span lang="EN-US">cfg.method = 'wavelet'; </span></p><p class="MsoNormal"><span lang="EN-US">cfg.width = 7; </span></p><p class="MsoNormal"><span lang="EN-US">cfg.gwidth = 3; </span></p><p class="MsoNormal"><span lang="EN-US">cfg.foilim = [1 70]; </span></p><p class="MsoNormal"><span lang="EN-US">cfg.toi = 0:0.05:2; </span></p><p class="MsoNormal"><span lang="EN-US">TFRwave = ft_freqanalysis(cfg, data_preproc);</span></p><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><b><span lang="EN-US">Cfg Hanning / Multitaper:</span></b></p><p class="MsoNormal"><span lang="EN-US">cfg = [];</span></p><p class="MsoNormal"><span lang="EN-US">cfg.output = 'pow'; </span></p><p class="MsoNormal"><span lang="EN-US">cfg.channel = labels; </span></p><p class="MsoNormal"><span lang="EN-US">cfg.method = 'mtmconvol'</span></p><p class="MsoNormal"><span lang="EN-US">cfg.foi = 1:1:70</span></p><p class="MsoNormal"><span lang="EN-US">cfg.tapsmofrq = 0.2*cfg.foi; </span></p><p class="MsoNormal"><span lang="EN-US">cfg.taper = 'dpss' / ‘hanning’; </span></p><p class="MsoNormal"><span lang="EN-US">cfg.t_ftimwin = 4./cfg.foi; </span></p><p class="MsoNormal"><span lang="EN-US">cfg.toi = 0:0.05:2;</span></p><p class="MsoNormal"><span lang="EN-US">TFRmult1 = ft_freqanalysis(cfg, data_preproc);</span></p></div><p class="MsoNormal" style="font-size:12.8000001907349px"><span lang="EN-US" style="font-size:11pt;line-height:16.8666667938232px;font-family:Calibri,sans-serif"><br clear="all"></span></p><div style="font-size:12.8000001907349px"><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span lang="EN-US">the data is plotted with ft_singleplotTFR (see cfg below)</span></p></div><p class="MsoNormal" style="font-size:12.8000001907349px"><b><span lang="EN-US" style="font-size:11pt;line-height:16.8666667938232px;font-family:Calibri,sans-serif"><br clear="all"></span></b></p><div style="font-size:12.8000001907349px"><p class="MsoNormal"><b><span lang="EN-US">cfg singleplot:</span></b></p><p class="MsoNormal"><span lang="EN-US">cfg = [];</span></p><p class="MsoNormal"><span lang="EN-US">cfg.maskstyle = 'saturation'; </span></p><p class="MsoNormal"><span lang="EN-US">cfg.colorbar = 'yes';</span></p><p class="MsoNormal"><span lang="EN-US">cfg.layout = 'AC_Osc.lay';</span></p><p class="MsoNormal"><span lang="EN-US">ft_singleplotTFR(cfg, TFRwave);</span></p></div><p class="MsoNormal" style="font-size:12.8000001907349px"><span lang="EN-US" style="font-size:11pt;line-height:16.8666667938232px;font-family:Calibri,sans-serif"><br clear="all"></span></p><p class="MsoNormal" style="font-size:12.8000001907349px"><span lang="EN-US">Two problems occur. First, the power scale of wavelet and Multitaper/Hanning differs extremely (Multi 0-~100 and Wavelet 0-~15*10^4).</span></p><p style="font-size:12.8000001907349px"><span lang="EN-US">1.<span style="font-stretch:normal;font-size:7pt;font-family:'Times New Roman'"> </span></span><span lang="EN-US">How can I get the scale of all methods equal, or do I have to change the Wavelet settings to get the right scale of the values?</span></p><p class="MsoNormal" style="font-size:12.8000001907349px"><span lang="EN-US">Second, the best result of Multitaper analysis is performed using only one Taper. The goal was to get a result, where the advantages and disadvantages of Multitaper analysis compared to the other methods can be seen.</span></p><p style="font-size:12.8000001907349px"><span lang="EN-US">2.<span style="font-stretch:normal;font-size:7pt;font-family:'Times New Roman'"> </span></span><span lang="EN-US">How can I change the simulation so that more tapers show better results than a single taper does?</span></p><p style="font-size:12.8000001907349px"><br></p><p class="MsoNormal" style="font-size:12.8000001907349px"><span lang="EN-US">Thank you for your time and help.</span></p><p class="MsoNormal" style="font-size:12.8000001907349px"><span lang="EN-US"><br></span></p><p class="MsoNormal" style="font-size:12.8000001907349px"><span lang="EN-US">Regards,</span></p><p class="MsoNormal" style="font-size:12.8000001907349px"><span lang="EN-US"> </span></p><p class="MsoNormal" style="font-size:12.8000001907349px"><span lang="EN-US">Nicolas Weeger</span></p><p class="MsoNormal" style="font-size:12.8000001907349px"><span lang="EN-US">Student of Master-Program Appied Research,</span></p><p class="MsoNormal" style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">University Ansbach,</span></p><p class="MsoNormal" style="font-size:12.8000001907349px"><span lang="EN-US">Germany</span></p></div>
<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><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Max Cantor<div>Lab Manager</div><div>Computational Neurolinguistics Lab</div><div>University of Michigan</div></div></div>
</div>