<html>
<head>
<!-- Template generated by Exclaimer Signature Manager Exchange Edition on 01:28:01 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>Thanks Jim,</p>
<p><br>
</p>
<p>The graphs look a bit better, however I still get many NaN artifacts when I want to show the frequency range of 1-30 Hz, which disappears completely when I shift it to 4-30 Hz. </p>
<p><br>
</p>
<p>Does anyone know what the underlying problem is here?</p>
<p><br>
</p>
<p>KR,</p>
<p><br>
</p>
<p>Alex</p>
<br>
<br>
<div style="color: rgb(0, 0, 0);"></div>
</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="70dd78ac-8c8f-43ce-b915-4a6d3405d55fTable">
<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:image514dfb.PNG@c7193820.4b9e6ff8" 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:image819e4b.PNG@3b854999.428cd895" title="LinkedIn" alt="LinkedIn"></a></font></font></td>
</tr>
</tbody>
</table>
<br>
<br>
</td>
</tr>
</tbody>
</table>
<br>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<div style="color: rgb(0, 0, 0);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> fieldtrip-bounces@science.ru.nl <fieldtrip-bounces@science.ru.nl> on behalf of Herring, J.D. (Jim) <J.Herring@donders.ru.nl><br>
<b>Sent:</b> 01 August 2017 13:05<br>
<b>To:</b> FieldTrip discussion list<br>
<b>Subject:</b> Re: [FieldTrip] Time frequency analysis using evoked potentials</font>
<div> </div>
</div>
<div>Dear Alex,
<div class=""><br class="">
</div>
<div class="">Change your scaling to ‘maxabs’ (cfg.zlim = ‘maxabs’;) to get a better feel of the scaling of your data. Now you have a scaling from 0 to 1, which, given your data, gives you very saturated images. </div>
<div class=""><br class="">
</div>
<div class="">Also, I would argue using a relative baseline on a TFR of an ERP (or ERF) is risky as in theory, your baseline should be zero (you even explicitly try to impose that by performing a baseline correction when calculating the ERP). This means that
 you are dividing your activation period by values close to zero. This will give you arbitrarily large values. An absolute baseline is preferred. </div>
<div class=""><br class="">
</div>
<div class="">Best,</div>
<div class=""><br class="">
</div>
<div class="">Jim</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">
<div>
<blockquote type="cite" class="">
<div class="">On 1 Aug 2017, at 11:52, Alexander Mentink <<a href="mailto:amentink@chdr.nl" class="">amentink@chdr.nl</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div id="divtagdefaultwrapper" class="" style="font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; font-size:12pt; background-color:rgb(255,255,255); font-family:Calibri,Arial,Helvetica,sans-serif">
<div class="" style="margin-top:0px; margin-bottom:0px">Hi Fieldtrip community,</div>
<div class="" style="margin-top:0px; margin-bottom:0px"><br class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0px">I am trying to analyse time frequency representations of electrical evoked potentials, but I am not getting any reliable results at all.</div>
<div class="" style="margin-top:0px; margin-bottom:0px"><br class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0px">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)</div>
<div class="" style="margin-top:0px; margin-bottom:0px"><br class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0px"><a href="http://tinyurl.com/y7nerh8v" id="LPlnk953677" class="">http://tinyurl.com/y7nerh8v</a><br class="">
<br class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0px">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.</div>
<div class="" style="margin-top:0px; margin-bottom:0px"><br class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0px"><b class="">The code I use for hanning window is</b></div>
<div class="" style="margin-top:0px; margin-bottom:0px">%%%%%%%%%%%%%%%%%%</div>
<p class="" style="margin-top:0px; margin-bottom:0px"></p>
<div class="">cfg = [];<br class="">
cfg.output       = 'pow';<br class="">
cfg.channel      = 'Cz';<br class="">
cfg.method       = 'mtmconvol';   <br class="">
cfg.taper        = 'hanning';   <br class="">
cfg.foi          = 1:0.025:30;  % OR 4:0.025:30<br class="">
cfg.t_ftimwin    = 3./cfg.foi;  <br class="">
cfg.toi          = -0.5:0.01:0.7;              <br class="">
TFRwave = ft_freqanalysis(cfg, trialdata);<br class="">
<br class="">
</div>
<div class="">% Visualization<br class="">
cfg = [];<br class="">
cfg.baseline     = [-0.5 -0.1]; <br class="">
cfg.baselinetype = 'absolute'; <br class="">
cfg.maskstyle = 'saturation';<br class="">
cfg.zlim         = [0 1];<br class="">
cfg.showlabels   = 'yes';        <br class="">
figure<br class="">
ft_singleplotTFR(cfg, TFRwave)</div>
<div class=""><span class="" 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 class="">
</div>
<div class=""><span class="" 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 class="">
</span></div>
<div class=""><b class="">And for wavelet transform is</b></div>
<div class=""><span class="" 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 class="">
</div>
<div class="">
<div class="">cfg = [];</div>
<div class="">cfg.channel    = 'Cz';<span class="" style="white-space:pre"> </span>
  </div>
<div class="">cfg.method     = 'wavelet';                </div>
<div class="">cfg.width      = 7; </div>
<div class="">cfg.output     = 'pow';<span class="" style="white-space:pre"> </span>
</div>
<div class="">cfg.foi        = 1:0.5:30;<span class="" style="white-space:pre"> </span>
               </div>
<div class="">cfg.toi        = -0.5:0.05:1;<span class="" style="white-space:pre">
</span></div>
<div class="">TFRwave = ft_freqanalysis(cfg, trialdata);</div>
<div class=""><br class="">
</div>
<div class=""><span class="" style="font-size:12pt">cfg              = [];</span><br class="">
</div>
<div class="">cfg.baseline     = [-0.5 -0.1]; </div>
<div class="">cfg.baselinetype = 'relative'; % OR absolute</div>
<div class="">cfg.maskstyle    = 'saturation';<span class="" style="white-space:pre">
</span></div>
<div class="">cfg.zlim         = [0 1];<span class="" style="white-space:pre"> </span>
</div>
<div class="">cfg.channel      = 'Cz';</div>
<div class=""><span class="" style="font-size:12pt">figure</span><br class="">
</div>
<div class="">ft_singleplotTFR(cfg, TFRwave);</div>
<span class="" 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 class="">
</div>
<div class=""><span class="" 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 class="">
</span></div>
<div class="">I have tried the tutorials online, but this doesn't give me any better results...</div>
<div class=""><br class="">
</div>
<div class="">Does anyone know what I am doing wrong?</div>
<div class=""><br class="">
</div>
<div class="">Thanks many times!</div>
<div class=""><br class="">
</div>
<div class="">Best regards,</div>
<div class=""><br class="">
</div>
<div class="">Alex (Master student </div>
<br class="">
<p class="" style="margin-top:0px; margin-bottom:0px"></p>
</div>
<br class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px">
<br class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px">
<table class="ImprintUniqueIDTable" cellspacing="0" cellpadding="0" border="0" style="margin:0cm 0cm 0pt; font-family:Helvetica; letter-spacing:normal; orphans:auto; text-indent:0px; text-transform:none; widows:auto; word-spacing:0px; height:254px; width:432.375px; border-collapse:collapse">
<tbody class="">
<tr class="">
<td class="" style="width:354px"><font face="Verdana" class=""><br class="">
</font><font class="" style="font-family:Verdana; font-size:12pt; font-weight:bold">Alexander Mentink</font> <br class="">
<font face="Verdana" class="">Centre for Human Drug Research<br class="">
Zernikedreef 8<br class="">
2333 CL Leiden<br class="">
The Netherlands</font><font class="" style="font-family:Verdana; font-size:12pt"><br class="">
T +31 (0) 71 7517166</font><br class="">
<font class="" style="font-family:Verdana; font-size:12pt"><a href="mailto:amentink@chdr.nl" class="">amentink@chdr.nl</a></font><br class="">
<font face="Verdana" class=""><a href="http://www.chdr.nl/" class="">http://www.chdr.nl</a><br class="">
<br class="">
Follow us:<span class="Apple-converted-space"> </span></font>
<table cellpadding="0" cellspacing="0" class="7567ec92-35cb-4269-b059-5b2b31db7757Table" style="font-family:Verdana; font-size:12pt; text-align:left; vertical-align:top">
<tbody class="">
<tr class="" style="text-align:left; vertical-align:top">
<td align="Center" class="" style="padding-right:5px"><font class="" style="font-family:Verdana; font-size:12pt"><font class="" style="font-family:Verdana; font-size:12pt"><a href="http://www.twitter.com/chdr_nl" target="" class=""><span id="cid:imaged4db2c.PNG@2c41bb72.499acc90"><imaged4db2c.PNG></span></a></font></font></td>
<td align="Center" class="" style="padding-right:5px"><font class="" style="font-family:Verdana; font-size:12pt"><font class="" style="font-family:Verdana; font-size:12pt"><a href="http://www.linkedin.com/company/centre-for-human-drug-research" target="" class=""><span id="cid:imagecccaa4.PNG@b079db44.41ac4062"><imagecccaa4.PNG></span></a></font></font></td>
</tr>
</tbody>
</table>
<br class="">
<br class="">
</td>
</tr>
</tbody>
</table>
<br class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px">
<font face="Verdana" class="" style="font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px"></font><span class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; float:none; display:inline!important">_______________________________________________</span><br class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px">
<span class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; float:none; display:inline!important">fieldtrip
 mailing list</span><br class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px">
<a href="mailto:fieldtrip@donders.ru.nl" class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px">fieldtrip@donders.ru.nl</a><br class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</div>
<font face="Verdana"></font>
</body>
</html>