<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>Dear all,</div>
<div><br>
</div>
<div>I recently started working on time-frequency analyses, and my code is working.</div>
<div>However, it seems to me that something is going wrong;</div>
<div><br>
</div>
<div>Using the code below to calculate TFRs using wavelets, the output in .powerspectrum is in the range of hundreds and sometimes even up to a thousand (can also be seen from the plot).</div>
<div>Trying multitapers (also in the code below), the range seems to be more normal (maybe up to 20).</div>
<div><br>
</div>
<div>I cannot find out what I’m doing wrong (I guess such outcomes are impossible?).</div>
<div>I preprocessed the data in BVA and transferred it to FT structures, but that shouldn’t be a problem right?</div>
<div><br>
</div>
<div>A final question considers NaNs, is it true that ft_freqanalysis can not handle them, so that the output for elektrode 16 e.g. is set to NaN when it contained artefacts (i.e. NaNs in my case) in just one trial?</div>
<div><br>
</div>
<div>I would appreciate it a lot if anyone could help me out.</div>
<div>Best,</div>
<div>Esther</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Data from 1 participant (it was also the case with other participants), 1 condition can be found here:</div>
<div>https://www.dropbox.com/s/8vjcfid5p1i0o2t/FTav.mat</div>
<div><br>
</div>
<div>
<p style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(178, 69, 243);">
<span style="color: #000000">load(</span>'FTav.mat'<span style="color: #000000">)</span></p>
<p style="margin: 0px; font-size: 10px; font-family: Courier; min-height: 12px;">
 </p>
<p style="margin: 0px; font-size: 10px; font-family: Courier; min-height: 12px;">
 </p>
<p style="margin: 0px; font-size: 10px; font-family: Courier;">cfg = [];</p>
<p style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45);">
%% wavelet</p>
<p style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45);">
%cfg.keeptrials = 'yes'; %not when you want to use ft_freqgrandaverage and permutation testing thereafter</p>
<p style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45); min-height: 12px;">
 </p>
<p style="margin: 0px; font-size: 10px; font-family: Courier;">cfg.method     = <span style="color: #b245f3">
'wavelet'</span>;                </p>
<p style="margin: 0px; font-size: 10px; font-family: Courier;">cfg.width      = 7; </p>
<p style="margin: 0px; font-size: 10px; font-family: Courier;">cfg.output     = <span style="color: #b245f3">
'pow'</span>; </p>
<p style="margin: 0px; font-size: 10px; font-family: Courier;">cfg.foi        = 1:2:100;                   </p>
<p style="margin: 0px; font-size: 10px; font-family: Courier;">cfg.toi        = -0.5:0.05:2.0;                   </p>
<p style="margin: 0px; font-size: 10px; font-family: Courier; min-height: 12px;">
 </p>
<p style="margin: 0px; font-size: 10px; font-family: Courier; min-height: 12px;">
 </p>
<p style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45);">
%% OR multitapers</p>
<p style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45);">
%{</p>
<p style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45);">
cfg.output     = 'pow';</p>
<p style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45);">
cfg.method     = 'mtmconvol';</p>
<p style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45);">
cfg.foi        = 1:2:100;</p>
<p style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45);">
cfg.t_ftimwin  = 5./cfg.foi;</p>
<p style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45);">
cfg.tapsmofrq  = 0.4 *cfg.foi;</p>
<p style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45);">
cfg.toi        = -0.5:0.05:1.5;</p>
<p style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45);">
cfg.pad        = 'maxperlen'; </p>
<p style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45);">
%}</p>
<p style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45); min-height: 12px;">
 </p>
<p style="margin: 0px; font-size: 10px; font-family: Courier;">TFRav          = ft_freqanalysis(cfg, FTav);</p>
<p style="margin: 0px; font-size: 10px; font-family: Courier; min-height: 12px;">
 </p>
<p style="margin: 0px; font-size: 10px; font-family: Courier; min-height: 12px;">
 </p>
<p style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45);">
% plot the results</p>
<p style="margin: 0px; font-size: 10px; font-family: Courier;">cfg = [];</p>
<p style="margin: 0px; font-size: 10px; font-family: Courier;">cfg.baseline     = [-0.5 0]; </p>
<p style="margin: 0px; font-size: 10px; font-family: Courier;">cfg.baselinetype =
<span style="color: #b245f3">'absolute'</span>;          </p>
<p style="margin: 0px; font-size: 10px; font-family: Courier;">cfg.zlim         =
<span style="color: #b245f3">'maxabs'</span>;</p>
<p style="margin: 0px; font-size: 10px; font-family: Courier;">cfg.showlabels   =
<span style="color: #b245f3">'yes'</span>;           </p>
<p style="margin: 0px; font-size: 10px; font-family: Courier;">cfg.layout       =
<span style="color: #b245f3">'biosemi64.lay'</span>;</p>
<p style="margin: 0px; font-size: 10px; font-family: Courier;">cfg.interactive  =
<span style="color: #b245f3">'yes'</span>;</p>
<p style="margin: 0px; font-size: 10px; font-family: Courier;">cfg.colorbar     =
<span style="color: #b245f3">'yes'</span>;</p>
<p style="margin: 0px; font-size: 10px; font-family: Courier;">figure</p>
<p style="margin: 0px; font-size: 10px; font-family: Courier;">ft_multiplotTFR(cfg, TFRav);</p>
<p style="margin: 0px; font-size: 10px; font-family: Courier; min-height: 12px;">
 </p>
<p style="margin: 0px; font-size: 12px; font-family: Courier; min-height: 14px;">
<br>
</p>
</div>
<div class="moz-text-html" lang="x-western">
<div align="center"><font color="#005452" size="1"><br>
Disclaimer</font></div>
<hr size="2" width="100%">
<font color="#005452" size="1">De informatie verzonden in dit e-mail bericht is vertrouwelijk en is uitsluitend bestemd voor de geadresseerde van dit bericht. Lees verder:
<a href="http://www.eur.nl/email-disclaimer">www.eur.nl/email-disclaimer </a><br>
The information in this e-mail message is confidential and may be legally privileged. Read more:
<a href="http://www.eur.nl/english/email-disclaimer">www.eur.nl/english/email-disclaimer</a><br>
</font>
<hr size="2" width="100%">
<font color="#005452" size="1"><br>
</font></div>
</body>
</html>