<html>
<head>
<!-- Template generated by Exclaimer Signature Manager Exchange Edition on 11:52:33 dinsdag, 1 augustus 2017 -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">P.ImprintUniqueID {
        MARGIN: 0cm 0cm 0pt
}
LI.ImprintUniqueID {
        MARGIN: 0cm 0cm 0pt
}
DIV.ImprintUniqueID {
        MARGIN: 0cm 0cm 0pt
}
TABLE.ImprintUniqueIDTable {
        MARGIN: 0cm 0cm 0pt
}
DIV.Section1 {
        page: Section1
}
</style><style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi Fieldtrip community,</p>
<p><br>
</p>
<p>I am trying to analyse time frequency representations of electrical evoked potentials, but I am not getting any reliable results at all.</p>
<p><br>
</p>
<p>Using hanning window (1-30 Hz) or (4-30 Hz), wavelet transform with absolute baselinetype and relative baselinetype gives me four totally different results (see link)</p>
<p><br>
</p>
<p><a href="http://tinyurl.com/y7nerh8v" id="LPlnk953677">http://tinyurl.com/y7nerh8v</a><br>
<br>
</p>
<p>The EEG data is defined 1000 ms pre stimulus and 1200 ms post stimulus, artifacts removed and preprocessed with baseline correction between 200 ms and 0 ms, bandpass filtered between 0.5 - 30 Hz and referenced to earlobes. The timelocked analysis is attached
 to the dropbox link as well.</p>
<p><br>
</p>
<p><b>The code I use for hanning window is</b></p>
<p>%%%%%%%%%%%%%%%%%%</p>
<p></p>
<div>cfg = [];<br>
cfg.output       = 'pow';<br>
cfg.channel      = 'Cz';<br>
cfg.method       = 'mtmconvol';   <br>
cfg.taper        = 'hanning';   <br>
cfg.foi          = 1:0.025:30;  % OR 4:0.025:30<br>
cfg.t_ftimwin    = 3./cfg.foi;  <br>
cfg.toi          = -0.5:0.01:0.7;              <br>
TFRwave = ft_freqanalysis(cfg, trialdata);<br>
<br>
</div>
<div>% Visualization<br>
cfg = [];<br>
cfg.baseline     = [-0.5 -0.1]; <br>
cfg.baselinetype = 'absolute'; <br>
cfg.maskstyle = 'saturation';<br>
cfg.zlim         = [0 1];<br>
cfg.showlabels   = 'yes';        <br>
figure<br>
ft_singleplotTFR(cfg, TFRwave)</div>
<div><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">%%%%%%%%%%%%%%%%%%</span><br>
</div>
<div><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;"><br>
</span></div>
<div><b>And for wavelet transform is</b></div>
<div><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">%%%%%%%%%%%%%%%%%%</span><br>
</div>
<div>
<div>cfg = [];</div>
<div>cfg.channel    = 'Cz';<span style="white-space:pre"> </span>  </div>
<div>cfg.method     = 'wavelet';                </div>
<div>cfg.width      = 7; </div>
<div>cfg.output     = 'pow';<span style="white-space:pre"> </span></div>
<div>cfg.foi        = 1:0.5:30;<span style="white-space:pre"> </span>               </div>
<div>cfg.toi        = -0.5:0.05:1;<span style="white-space:pre"> </span></div>
<div>TFRwave = ft_freqanalysis(cfg, trialdata);</div>
<div><br>
</div>
<div><span style="font-size: 12pt;">cfg              = [];</span><br>
</div>
<div>cfg.baseline     = [-0.5 -0.1]; </div>
<div>cfg.baselinetype = 'relative'; % OR absolute</div>
<div>cfg.maskstyle    = 'saturation';<span style="white-space:pre"> </span></div>
<div>cfg.zlim         = [0 1];<span style="white-space:pre"> </span></div>
<div>cfg.channel      = 'Cz';</div>
<div><span style="font-size: 12pt;">figure</span><br>
</div>
<div>ft_singleplotTFR(cfg, TFRwave);</div>
<span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">%%%%%%%%%%%%%%%%%%</span><br>
</div>
<div><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;"><br>
</span></div>
<div>I have tried the tutorials online, but this doesn't give me any better results...</div>
<div><br>
</div>
<div>Does anyone know what I am doing wrong?</div>
<div><br>
</div>
<div>Thanks many times!</div>
<div><br>
</div>
<div>Best regards,</div>
<div><br>
</div>
<div>Alex (Master student </div>
<br>
<p></p>
</div>
<br>
<br>
<table class="ImprintUniqueIDTable" style="HEIGHT: 254px; WIDTH: 68.2%; BORDER-COLLAPSE: collapse" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td style="WIDTH: 354px"><font face="Verdana"><br>
</font><font style="font-family:Verdana;font-size:12pt;font-weight:bold;">Alexander Mentink</font> <br>
<font face="Verdana">Centre for Human Drug Research<br>
Zernikedreef 8<br>
2333 CL Leiden<br>
The Netherlands</font><font style="font-family:Verdana;font-size:12pt;"><br>
T +31 (0) 71 7517166</font><br>
<font style="font-family:Verdana;font-size:12pt;">amentink@chdr.nl</font><br>
<font face="Verdana">http://www.chdr.nl<br>
<br>
Follow us: </font>
<table cellpadding="0" cellspacing="0" style="font-family:Verdana; font-size:12pt; text-align: left; vertical-align: top;" class="7567ec92-35cb-4269-b059-5b2b31db7757Table">
<tbody>
<tr style="text-align: left; vertical-align: top; ">
<td align="Center" style="padding-right: 5px; "><font style="font-family:Verdana;font-size:12pt;"><font style="font-family:Verdana;font-size:12pt;"><a href="http://www.twitter.com/chdr_nl" target=""><img style="border: 0px Solid ; " src="cid:imaged4db2c.PNG@2c41bb72.499acc90" title="Twitter" alt="Twitter"></a></font></font></td>
<td align="Center" style="padding-right: 5px; "><font style="font-family:Verdana;font-size:12pt;"><font style="font-family:Verdana;font-size:12pt;"><a href="http://www.linkedin.com/company/centre-for-human-drug-research" target=""><img style="border: 0px Solid ; " src="cid:imagecccaa4.PNG@b079db44.41ac4062" title="LinkedIn" alt="LinkedIn"></a></font></font></td>
</tr>
</tbody>
</table>
<br>
<br>
</td>
</tr>
</tbody>
</table>
<br>
<font face="Verdana"></font>
</body>
</html>