<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px"><div id="yiv1058388329"><div id="yui_3_16_0_1_1431171950434_76584"><div id="yui_3_16_0_1_1431171950434_76583" style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"><div class="yiv1058388329" id="yiv1058388329yui_3_16_0_1_1431171950434_68356" style=""><font id="yui_3_16_0_1_1431171950434_76748" size="2"><span class="yiv1058388329" id="yiv1058388329yui_3_16_0_1_1431171950434_68879" style="">Dear All,</span></font></div><div class="yiv1058388329" id="yiv1058388329yui_3_16_0_1_1431171950434_68787" style=""><font size="2"><span class="yiv1058388329" id="yiv1058388329yui_3_16_0_1_1431171950434_71168" style=""><br class="yiv1058388329" style="" clear="none"></span></font></div><div class="yiv1058388329" id="yiv1058388329yui_3_16_0_1_1431171950434_68472" style=""><font id="yiv1058388329yui_3_16_0_1_1431171950434_71354" size="2"><span class="yiv1058388329" id="yiv1058388329yui_3_16_0_1_1431171950434_68579" style="">Thanks for the useful discussion.</span></font></div><div class="yiv1058388329" id="yiv1058388329yui_3_16_0_1_1431171950434_68428" style=""><font size="2"><br class="yiv1058388329" style="" clear="none"><span class="yiv1058388329" style=""></span></font></div><div class="yiv1058388329" dir="ltr" id="yiv1058388329yui_3_16_0_1_1431171950434_68422" style=""><div id="yui_3_16_0_1_1431171950434_76835" dir="ltr"><font id="yiv1058388329yui_3_16_0_1_1431171950434_71312" size="2"><span class="yiv1058388329" id="yiv1058388329yui_3_16_0_1_1431171950434_68427" style="">In the same regard, I have tried to run spectopo on single dataset but, I'm blurred with the result. Why the power is negative? what does it mean?</span></font></div></div><div class="yiv1058388329" dir="ltr" id="yiv1058388329yui_3_16_0_1_1431171950434_71314" style=""><br clear="none"><font id="yiv1058388329yui_3_16_0_1_1431171950434_71312" size="2"><span class="yiv1058388329" id="yiv1058388329yui_3_16_0_1_1431171950434_68427" style=""></span></font></div><div class="yiv1058388329" dir="ltr" id="yiv1058388329yui_3_16_0_1_1431171950434_71315" style=""><font class="yiv1058388329" id="yiv1058388329yui_3_16_0_1_1431171950434_71312" style="" size="2"><span class="yiv1058388329" id="yiv1058388329yui_3_16_0_1_1431171950434_68427" style="">The </span></font><font class="yiv1058388329" id="yiv1058388329yui_3_16_0_1_1431171950434_71312" style="" size="2"><span class="yiv1058388329" id="yiv1058388329yui_3_16_0_1_1431171950434_68427" style="">spectopo is  <a rel="nofollow" shape="rect" id="yiv1058388329yui_3_16_0_1_1431171950434_71360" target="_blank" href="https://www.dropbox.com/s/q4v0nappwhvk1p5/spectopo%20topography.png?dl=0">spectopo topography.png</a><br clear="none"></span></font></div><div class="yiv1058388329link-enhancr-attachment yiv1058388329link-enhancr-element" id="yiv1058388329enhancrCard_0" style="width:450px;font-family:'Georgia', 'Times', 'Times New Roman', 'serif';margin-top:5px;margin-bottom:5px;background-color:#ffffff;"><table class="yiv1058388329link-enhancr-element" id="yiv1058388329yui_3_16_0_1_1431171950434_71380" style="width:450px;height:170px;display:block;" border="0" cellpadding="0" cellspacing="0"><tbody id="yiv1058388329yui_3_16_0_1_1431171950434_71379"><tr class="yiv1058388329link-enhancr-element" id="yiv1058388329yui_3_16_0_1_1431171950434_71389"><td colspan="8" rowspan="1" class="yiv1058388329link-enhancr-element" id="yiv1058388329yui_3_16_0_1_1431171950434_71388" style="height:1px;background-color:#e5e5e5;font-size:1px;border-collapse:collapse;"><div class="yiv1058388329link-enhancr-element" id="yiv1058388329yui_3_16_0_1_1431171950434_71387" style="height:1px;background-color:#e5e5e5;font-size:1px;line-height:0px;"> </div></td></tr><tr class="yiv1058388329link-enhancr-element" id="yiv1058388329yui_3_16_0_1_1431171950434_71378"><td colspan="1" rowspan="5" class="yiv1058388329link-enhancr-element" style="width:1px;background-color:#e5e5e5;font-size:1pt;border-collapse:collapse;"><div class="yiv1058388329link-enhancr-element" style="width:1px;background-color:#e5e5e5;font-size:1pt;"> </div></td><td colspan="1" rowspan="5" class="yiv1058388329link-enhancr-element" id="yiv1058388329yui_3_16_0_1_1431171950434_71377" style="vertical-align:middle;width:168px;height:168px;background-color:#000000;border-collapse:collapse;"><div class="yiv1058388329link-enhancr-element" id="yiv1058388329yui_3_16_0_1_1431171950434_71383" style="width:168px;" align="center"><a rel="nofollow" shape="rect" class="yiv1058388329link-enhancr-card-urlWrapper yiv1058388329link-enhancr-element" id="yiv1058388329yui_3_16_0_1_1431171950434_71382" target="_blank" href="https://www.dropbox.com/s/q4v0nappwhvk1p5/spectopo%20topography.png?dl=0" style="text-decoration:none;color:#000000;"><img data-id="26a40c16-81f7-1988-7a5b-6963e33f092f" class="yiv1058388329link-enhancr-thumbnail-image yiv1058388329link-enhancr-element" id="yiv1058388329yui_3_16_0_1_1431171950434_71381" alt="image" src="https://photos-4.dropbox.com/t/2/AABVwp9BoT-yd6S2QcVcNN1BDKb6MCJveKA99zFFEnWxsg/12/158636242/png/1024x1024/2/_/0/4/spectopo%20topography.png/CNKx0ksgASACIAMgBCAFKAEoAg/q4v0nappwhvk1p5/AADJ0skpv2c4ipVRELajY7pja/spectopo%20topography.png" style="display:block;margin:auto;" height="140" width="168"></a></div></td><td colspan="1" rowspan="5" class="yiv1058388329link-enhancr-element" style="width:1px;background-color:#e5e5e5;font-size:0pt;border-collapse:collapse;"><div class="yiv1058388329link-enhancr-element" style="width:1px;background-color:#e5e5e5;font-size:1pt;"> </div></td><td colspan="1" rowspan="5" class="yiv1058388329link-enhancr-element" id="yiv1058388329yui_3_16_0_1_1431171950434_71384" style="width:14px;background-color:#ffffff;font-size:0pt;border-collapse:collapse;"><div class="yiv1058388329link-enhancr-element" style="width:14px;background-color:#ffffff;font-size:14pt;"> </div></td><td colspan="2" rowspan="1" class="yiv1058388329link-enhancr-element" id="yiv1058388329yui_3_16_0_1_1431171950434_71386" style="height:6px;background-color:#ffffff;font-size:0pt;border-collapse:collapse;"><div class="yiv1058388329link-enhancr-element" id="yiv1058388329yui_3_16_0_1_1431171950434_71385" style="height:6px;background-color:#ffffff;font-size:6pt;"> </div></td><td colspan="1" rowspan="5" class="yiv1058388329link-enhancr-element" style="width:20px;background-color:#ffffff;font-size:0pt;border-collapse:collapse;"><div class="yiv1058388329link-enhancr-element" style="width:20px;background-color:#ffffff;font-size:20pt;"> </div></td><td colspan="1" rowspan="5" class="yiv1058388329link-enhancr-element" style="width:1px;background-color:#e5e5e5;font-size:1pt;border-collapse:collapse;" width="1"><div class="yiv1058388329link-enhancr-element" style="width:1px;background-color:#e5e5e5;font-size:1pt;"> </div></td></tr><tr id="yiv1058388329yui_3_16_0_1_1431171950434_71394"><td colspan="2" rowspan="1" class="yiv1058388329link-enhancr-element" id="yiv1058388329yui_3_16_0_1_1431171950434_71393" style="width:100%;vertical-align:middle;font-family:'Georgia', 'Times', 'Times New Roman', 'serif';"><div class="yiv1058388329link-enhancr-text-part yiv1058388329link-enhancr-element" id="yiv1058388329yui_3_16_0_1_1431171950434_71392" style="line-height:16.5px;background-color:#ffffff;height:135px;width:245px;"><div class="yiv1058388329link-enhancr-element" id="yiv1058388329yui_3_16_0_1_1431171950434_71396" style="word-wrap:break-word;"><span class="yiv1058388329link-enhancr-element yiv1058388329icon yiv1058388329icon-shrink yiv1058388329link-enhancr-toggle"></span><span class="yiv1058388329link-enhancr-element yiv1058388329icon yiv1058388329icon-close yiv1058388329link-enhancr-delete"></span><a rel="nofollow" shape="rect" class="yiv1058388329link-enhancr-card-urlWrapper yiv1058388329link-enhancr-element" id="yiv1058388329yui_3_16_0_1_1431171950434_71397" target="_blank" href="https://www.dropbox.com/s/q4v0nappwhvk1p5/spectopo%20topography.png?dl=0" style="text-decoration:none;color:#000000;line-height:100%;font-size:18px;display:block;"><span class="yiv1058388329link-enhancr-element yiv1058388329link-enhancr-card-title" id="yiv1058388329yui_3_16_0_1_1431171950434_71398" style="margin:0;font-weight:normal;margin-bottom:3px;font-size:18px;line-height:21px;max-height:43px;color:#000000;overflow:hidden;display:inline-block;">spectopo topography.png</span></a><div class="yiv1058388329link-enhancr-card-description yiv1058388329link-enhancr-element" id="yiv1058388329yui_3_16_0_1_1431171950434_71395" style="font-size:13px;line-height:20px;color:#999999;max-height:81px;font-family:'Georgia', 'Times', 'Times New Roman', 'serif';overflow:hidden;">Shared with Dropbox</div></div></div></td></tr><tr><td colspan="2" rowspan="1" class="yiv1058388329link-enhancr-element" style="height:4px;background-color:#ffffff;font-size:0pt;border-collapse:collapse;"><div class="yiv1058388329link-enhancr-element" style="height:4px;background-color:#ffffff;font-size:4pt;"></div></td></tr><tr id="yui_3_16_0_1_1431171950434_77064"><td id="yui_3_16_0_1_1431171950434_77063" colspan="1" rowspan="1" class="yiv1058388329link-enhancr-element" style="vertical-align:middle;font-family:'Arial', 'Helvetica Neue', 'Helvetica', 'sans-serif';"><div id="yui_3_16_0_1_1431171950434_77062" class="yiv1058388329link-enhancr-element" style="font-size:0pt;"><a id="yui_3_16_0_1_1431171950434_77061" rel="nofollow" shape="rect" class="yiv1058388329link-enhancr-card-url yiv1058388329link-enhancr-element" target="_blank" href="https://www.dropbox.com/s/q4v0nappwhvk1p5/spectopo%20topography.png?dl=0" style="color:black;text-decoration:none;cursor:pointer;"><span class="yiv1058388329link-enhancr-element yiv1058388329link-enhancr-view-on" id="yiv1058388329yui_3_16_0_1_1431171950434_71374" style="display:inline-block;line-height:11px;max-width:145px;min-width:85px;overflow:hidden;max-height:13px;"><span id="yui_3_16_0_1_1431171950434_77060" class="yiv1058388329link-enhancr-element yiv1058388329link-enhancr-mobile-no-resize" style="vertical-align:middle;font-size:9px;line-height:11px;color:#999999;">View on <span id="yui_3_16_0_1_1431171950434_77059" class="yiv1058388329link-enhancr-view-on-domain" style="font-weight:bold;">www.dropbox.com</span></span></span></a></div></td><td colspan="1" rowspan="1" class="yiv1058388329link-enhancr-element" style="vertical-align:middle;width:100px;font-family:'Arial', 'Helvetica Neue', 'Helvetica', 'sans-serif';"><div class="yiv1058388329link-enhancr-element yiv1058388329link-enhancr-preview-wrapper" style="max-width:100px;min-width:80px;overflow:hidden;text-align:right;line-height:11px;max-height:13px;font-size:0pt;"><span class="yiv1058388329link-enhancr-element yiv1058388329link-enhancr-preview-by yiv1058388329link-enhancr-mobile-no-resize" style="vertical-align:middle;font-size:9px;line-height:11px;color:#999999;">Preview by Yahoo</span></div></td></tr><tr id="yui_3_16_0_1_1431171950434_77067"><td id="yui_3_16_0_1_1431171950434_77066" colspan="2" rowspan="1" class="yiv1058388329link-enhancr-element" style="height:9px;background-color:#ffffff;font-size:0pt;border-collapse:collapse;"><div id="yui_3_16_0_1_1431171950434_77065" class="yiv1058388329link-enhancr-element" style="height:9px;background-color:#ffffff;font-size:9pt;"></div></td></tr><tr class="yiv1058388329link-enhancr-element"><td colspan="8" rowspan="1" class="yiv1058388329link-enhancr-element" style="height:1px;background-color:#e5e5e5;font-size:1px;border-collapse:collapse;"><div class="yiv1058388329link-enhancr-element" style="height:1px;background-color:#e5e5e5;font-size:1px;line-height:0px;"> </div></td></tr></tbody></table></div><div class="yiv1058388329" dir="ltr" id="yiv1058388329yui_3_16_0_1_1431171950434_68545" style=""><font size="2"><br class="yiv1058388329" style="" clear="none"><span class="yiv1058388329" id="yiv1058388329yui_3_16_0_1_1431171950434_68427" style=""></span></font></div><font id="yui_3_16_0_1_1431171950434_77125" size="2">                 <br class="yiv1058388329" style="" clear="none"></font><div id="yui_3_16_0_1_1431171950434_77128" dir="ltr">AHMED</div><div id="yiv1058388329yui_3_16_0_1_1431171950434_71030"> </div><div class="yiv1058388329signature" id="yiv1058388329yui_3_16_0_1_1431171950434_71031">                 <br clear="none"></div><br clear="none">  <div id="yiv1058388329yui_3_16_0_1_1431171950434_71172" style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"> <div id="yiv1058388329yui_3_16_0_1_1431171950434_71171" style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"> <div class="qtdSeparateBR"><br><br></div><div class="yiv1058388329yqt7648186536" id="yiv1058388329yqt28792"><div dir="ltr" id="yiv1058388329yui_3_16_0_1_1431171950434_71170"> <hr id="yui_3_16_0_1_1431171950434_77147" size="1">  <font id="yiv1058388329yui_3_16_0_1_1431171950434_71173" face="Arial" size="2"> <b><span style="font-weight:bold;">From:</span></b> Makoto Miyakoshi <mmiyakoshi@ucsd.edu><br clear="none"> <b><span style="font-weight:bold;">To:</span></b> #SHAN XIN# <SHAN0055@e.ntu.edu.sg> <br clear="none"><b><span style="font-weight:bold;">Cc:</span></b> "eeglablist@sccn.ucsd.edu" <eeglablist@sccn.ucsd.edu> <br clear="none"> <b><span style="font-weight:bold;">Sent:</span></b> Friday, May 8, 2015 2:40 AM<br clear="none"> <b><span style="font-weight:bold;">Subject:</span></b> Re: [Eeglablist] How can I get the power of each frequency band?<br clear="none"> </font> </div> <div class="yiv1058388329y_msg_container"><br clear="none"><div id="yiv1058388329"><div><div dir="ltr">Dear Shan,<div><br clear="none"></div><div>Correct me if I'm wrong--I guess you are concerned with the number of sampling points in frequency. For example, if there are 4, 5, 6, 7 Hz in theta, and 8, 9, 10, 11, 12, 13 Hz in alpha, the former has 4 points while the latter has 6 points, therefore they should be normalized by the number of the frequency sampling points (i.e. to use the mean value within each frequency range 'bin'). If that's the case, yes I agree with you.</div><div><br clear="none"></div><div>Makoto</div><div class="yiv1058388329gmail_extra"><br clear="none"><div class="yiv1058388329qtdSeparateBR"><br clear="none"><br clear="none"></div><div class="yiv1058388329yqt3474663509" id="yiv1058388329yqt22514"><div class="yiv1058388329gmail_quote">On Tue, May 5, 2015 at 11:23 PM, #SHAN XIN# <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:SHAN0055@e.ntu.edu.sg" target="_blank" href="mailto:SHAN0055@e.ntu.edu.sg">SHAN0055@e.ntu.edu.sg</a>></span> wrote:<br clear="none"><blockquote class="yiv1058388329gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex;">




<div dir="ltr">
<div style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri, Arial, Helvetica, sans-serif;background-color:rgb(255,255,255);">
<div>Dear Makoto,<br clear="none">
</div>
<div><br clear="none">
</div>
<div>Thank you for your explanation!!<br clear="none">
</div>
<div><br clear="none">
</div>
<div>For the "length of each discrete frequency", I mean the length of each frequency bin. 
<span style="color:rgb(33,33,33);font-family:Calibri, Arial, Helvetica, sans-serif;font-size:16px;background-color:rgb(255,255,255);">
Let's say the density is "5uV^2/Hz" for one particular alphaIdx (one frequency bin), and assume the length of this frequency bin is ​0.5 Hz.  If we can directly sum all values, then actually you mean 5uV^2 is already the power in this frequency bin.  Or the
 power is actually 2.5uV^2, such that the density is 2.5uV^2/0.5Hz=5uV^2/Hz ? I</span>f it is the second case, then before summation we should first multiply the density by the length, right?  I don't know which one is correct...<br clear="none">
</div>
<div><span style="color:rgb(33,33,33);font-family:Calibri, Arial, Helvetica, sans-serif;font-size:16px;background-color:rgb(255,255,255);"><br clear="none">
</span></div>
<div><span style="color:rgb(33,33,33);font-family:Calibri, Arial, Helvetica, sans-serif;font-size:16px;background-color:rgb(255,255,255);">Best wishes,</span></div>
<div><span style="color:rgb(33,33,33);font-family:Calibri, Arial, Helvetica, sans-serif;font-size:16px;background-color:rgb(255,255,255);">SHAN Xin</span></div>
<div><br clear="none">
</div>
<div style="color:rgb(0,0,0);">
<hr style="display:inline-block;width:98%;">
<div dir="ltr"><font style="font-size:11pt;" color="#000000" face="Calibri, sans-serif"><b>From:</b> Makoto Miyakoshi <<a rel="nofollow" shape="rect" ymailto="mailto:mmiyakoshi@ucsd.edu" target="_blank" href="mailto:mmiyakoshi@ucsd.edu">mmiyakoshi@ucsd.edu</a>><br clear="none">
<b>Sent:</b> Tuesday, 5 May 2015 11:04 PM</font><div><div class="yiv1058388329h5"><br clear="none">
<b>To:</b> #SHAN XIN#<br clear="none">
<b>Cc:</b> <a rel="nofollow" shape="rect" ymailto="mailto:eeglablist@sccn.ucsd.edu" target="_blank" href="mailto:eeglablist@sccn.ucsd.edu">eeglablist@sccn.ucsd.edu</a><br clear="none">
<b>Subject:</b> Re: [Eeglablist] How can I get the power of each frequency band?</div></div>
<div> </div>
</div><div><div class="yiv1058388329h5">
<div>
<div dir="ltr">Dear Shan,
<div><br clear="none">
</div>
<div><span style="color:rgb(0,0,0);font-family:Calibri, Arial, Helvetica, sans-serif;font-size:16px;">> (1) Since dB is the log ratio of two same quantities, so in the spectopo plot </span><span style="color:rgb(0,0,0);font-family:Calibri, Arial, Helvetica, sans-serif;font-size:16px;">10log</span><sub style="color:rgb(0,0,0);font-family:Calibri, Arial, Helvetica, sans-serif;">10</sub><span style="color:rgb(0,0,0);font-family:Calibri, Arial, Helvetica, sans-serif;font-size:16px;">(</span><span style="font-family:Calibri, Arial, Helvetica, sans-serif;font-size:16px;color:rgb(33,33,33);">uV^2/Hz) </span><span style="color:rgb(0,0,0);font-family:Calibri, Arial, Helvetica, sans-serif;font-size:16px;">, does
 EEGlab implicitly assume that the reference level is 1uV</span><span style="font-family:Calibri, Arial, Helvetica, sans-serif;font-size:16px;color:rgb(33,33,33);">^2</span><span style="color:rgb(0,0,0);font-family:Calibri, Arial, Helvetica, sans-serif;font-size:16px;"> ?</span><br clear="none">
</div>
<div><br clear="none">
</div>
<div>I once tested it myself.</div>
<div>I generated a long sine wave with amplitude of 1 and 10 Hz and ran spectopo. The peak at 10 Hz was at 0. When I change the amplitude to 10, the peak level was at 20 (if I remember correctly).</div>
<div><br clear="none">
</div>
<div><span style="font-size:12pt;">> (2) The script line "</span><span style="color:rgb(255,0,0);font-family:Calibri, Arial, Helvetica, sans-serif;font-size:12.6666669845581px;">deltaPower = mean(10.^(spectra(deltaIdx)/10)); </span><span style="font-size:12pt;">"
 gives </span><span style="color:rgb(33,33,33);font-family:Calibri, Arial, Helvetica, sans-serif;font-size:16px;">uV^2/Hz, which is the mean value of densities</span><span style="font-size:12pt;">.  If I hope to get the total power within alpha band, what script
 should I write?  </span>Intuitively it seems something like: total power=sum(10.^(spectra(<span style="font-size:12pt;">alphaIdx)/10)</span><span style="font-size:12pt;">*(</span><span style="font-size:12pt;">length of each discrete frequency</span><span style="font-size:12pt;">)</span><span style="font-size:12pt;">).</span><span style="font-size:12pt;"> </span><span style="font-size:12pt;"> </span><span style="font-size:12pt;">I</span><span style="font-size:12pt;">s
 this concept</span><span style="font-size:12pt;"> correc</span><span style="font-size:12pt;">t? If it is correct, then what should be the value for "</span><span style="font-size:12pt;">length of each discrete frequency" (say for 128Hz sampling rate)? If not,
 then is there actually any method to get the total power?</span><br clear="none">
</div>
<div><span style="font-size:12pt;"><br clear="none">
</span></div>
<div><span style="font-size:12pt;">I have never wished to have the total power so I'm not completely sure, but</span></div>
<div><span style="font-size:12pt;"><br clear="none">
</span></div>
<div>> total power=sum(10.^(spectra(<span style="font-size:12pt;">alphaIdx)/10)</span><span style="font-size:12pt;">*(</span><span style="font-size:12pt;">length of each discrete frequency</span><span style="font-size:12pt;">)</span><span style="font-size:12pt;">)</span><span style="font-size:12pt;"><br clear="none">
</span></div>
<div><span style="font-size:12pt;"><br clear="none">
</span></div>
<div><span style="font-size:16px;">What is the 'length of each discrete frequency' here? What 'length' is it referring to? Isn't it simply </span>sum(10.^(spectra(<span style="font-size:12pt;">alphaIdx)/10)?</span></div>
<div><span style="font-size:16px;"><br clear="none">
</span></div>
<div><span style="font-size:16px;">Makoto</span></div>
<div><span style="font-size:12pt;"><br clear="none">
</span></div>
<div class="yiv1058388329gmail_extra"><br clear="none">
<div class="yiv1058388329gmail_quote">On Thu, Apr 23, 2015 at 9:17 AM, #SHAN XIN# <span dir="ltr">
<<a rel="nofollow" shape="rect" ymailto="mailto:SHAN0055@e.ntu.edu.sg" target="_blank" href="mailto:SHAN0055@e.ntu.edu.sg">SHAN0055@e.ntu.edu.sg</a>></span> wrote:<br clear="none">
<blockquote class="yiv1058388329gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex;">
<div dir="ltr">
<div style="background-color:rgb(255,255,255);">
<div style="color:rgb(0,0,0);font-family:Calibri, Arial, Helvetica, sans-serif;font-size:12pt;">
Dear Makoto,<br clear="none">
</div>
<div style="color:rgb(0,0,0);font-family:Calibri, Arial, Helvetica, sans-serif;font-size:12pt;">
<br clear="none">
</div>
<div style="color:rgb(0,0,0);font-family:Calibri, Arial, Helvetica, sans-serif;font-size:12pt;">
Thank you so much for the link!!  I still have two questions:<br clear="none">
</div>
<div style="color:rgb(0,0,0);font-family:Calibri, Arial, Helvetica, sans-serif;font-size:12pt;">
<br clear="none">
</div>
<div style="color:rgb(0,0,0);font-family:Calibri, Arial, Helvetica, sans-serif;font-size:12pt;">
(1) Since dB is the log ratio of two same quantities, so in the spectopo plot <span style="font-family:Calibri, Arial, Helvetica, sans-serif;font-size:16px;background-color:rgb(255,255,255);">10log</span><sub style="font-family:Calibri, Arial, Helvetica, sans-serif;background-color:rgb(255,255,255);">10</sub><span style="font-family:Calibri, Arial, Helvetica, sans-serif;font-size:16px;background-color:rgb(255,255,255);">(</span><span style="font-family:Calibri, Arial, Helvetica, sans-serif;font-size:16px;color:rgb(33,33,33);background-color:rgb(255,255,255);">uV^2/Hz) </span>, does
 EEGlab implicitly assume that the reference level is 1uV<span style="color:rgb(33,33,33);font-family:Calibri, Arial, Helvetica, sans-serif;font-size:16px;background-color:rgb(255,255,255);">^2</span> ?<br clear="none">
</div>
<div style="color:rgb(0,0,0);font-family:Calibri, Arial, Helvetica, sans-serif;font-size:12pt;">
<br clear="none">
</div>
<div><span style="font-size:12pt;">(2) The script line "</span><span style="color:rgb(255,0,0);font-family:Calibri, Arial, Helvetica, sans-serif;font-size:12.6666669845581px;">deltaPower = mean(10.^(spectra(deltaIdx)/10)); </span><span style="font-size:12pt;">" gives </span><span style="color:rgb(33,33,33);font-family:Calibri, Arial, Helvetica, sans-serif;font-size:16px;background-color:rgb(255,255,255);">uV^2/Hz,
 which is the mean value of densities</span><span style="font-size:12pt;">.  If I hope to get the total power within alpha band, what script should I write?  </span>Intuitively it seems something like: total power=sum(10.^(spectra(<span style="font-size:12pt;">alphaIdx)/10)</span><span style="font-size:12pt;">*(</span><span style="font-size:12pt;">length
 of each discrete frequency</span><span style="font-size:12pt;">)</span><span style="font-size:12pt;">).</span><span style="font-size:12pt;"> </span><span style="font-size:12pt;"> </span><span style="font-size:12pt;">I</span><span style="font-size:12pt;">s this concept</span><span style="font-size:12pt;"> correc</span><span style="font-size:12pt;">t?
 If it is correct, then what should be the value for "</span><span style="font-size:12pt;">length of each discrete frequency" (say for 128Hz sampling rate)? If not, then is there actually any method to get the total power?</span></div>
<div><span style="font-family:Calibri, Arial, Helvetica, sans-serif;font-size:16px;background-color:rgb(255,255,255);"><br clear="none">
</span></div>
<div>Best wishes,<br clear="none">
</div>
<div style="color:rgb(0,0,0);font-family:Calibri, Arial, Helvetica, sans-serif;font-size:12pt;">
SHAN Xin<br clear="none">
</div>
<div style="color:rgb(0,0,0);font-family:Calibri, Arial, Helvetica, sans-serif;font-size:12pt;">
<br clear="none">
</div>
<div style="color:rgb(33,33,33);font-family:Calibri, Arial, Helvetica, sans-serif;font-size:12pt;">
<hr style="display:inline-block;width:98%;">
<div dir="ltr"><font style="font-size:11pt;" color="#000000" face="Calibri, sans-serif"><b>From:</b> Makoto Miyakoshi <<a rel="nofollow" shape="rect" ymailto="mailto:mmiyakoshi@ucsd.edu" target="_blank" href="mailto:mmiyakoshi@ucsd.edu">mmiyakoshi@ucsd.edu</a>><br clear="none">
<b>Sent:</b> Wednesday, 22 April 2015 2:07 AM
</font><div>
<div><br clear="none">
<b>To:</b> #SHAN XIN#<br clear="none">
<b>Cc:</b> <a rel="nofollow" shape="rect" ymailto="mailto:eeglablist@sccn.ucsd.edu" target="_blank" href="mailto:eeglablist@sccn.ucsd.edu">eeglablist@sccn.ucsd.edu</a><br clear="none">
<b>Subject:</b> Re: [Eeglablist] How can I get the power of each frequency band?</div>
</div>

<div> </div>
</div>
<div>
<div>
<div>
<div dir="ltr">Dear Shan,
<div><br clear="none">
</div>
<div>> Why divided by  Hz?<br clear="none">
</div>
<div><br clear="none">
</div>
<div>Here is (esoteric) discussion about the related topic. </div>
<div><a rel="nofollow" shape="rect" target="_blank" href="http://sccn.ucsd.edu/pipermail/eeglablist/2014/008224.html">http://sccn.ucsd.edu/pipermail/eeglablist/2014/008224.html</a><br clear="none">
</div>
<div><br clear="none">
</div>
<div>Makoto</div>
<div class="yiv1058388329gmail_extra"><br clear="none">
<div class="yiv1058388329gmail_quote">On Mon, Apr 20, 2015 at 3:58 AM, #SHAN XIN# <span dir="ltr">
<<a rel="nofollow" shape="rect" ymailto="mailto:SHAN0055@e.ntu.edu.sg" target="_blank" href="mailto:SHAN0055@e.ntu.edu.sg">SHAN0055@e.ntu.edu.sg</a>></span> wrote:<br clear="none">
<blockquote class="yiv1058388329gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex;">
<div>
<div>Hi Makoto,</div>
<div><br clear="none">
</div>
<div>Oh I didn't realize the scale on the figure might already in dB...is it?  I know dB is defined as log ratio, but uV^2/Hz does not seem to be a ratio since the units (volt square and hz) do not match...  Also, do you therefore mean that the definition of
 absolute power is <span>uV^2/Hz?</span></div>
<div><br clear="none">
</div>
<div>I've gone through the related topics in archives and still don't understand these... I also search on Google but still cannot find a clear explanation. Why divided by  Hz?</div>
<span>
</span><div><br clear="none">
</div>
<div>Thank you so much!!</div>
<div><br clear="none">
</div>
<div>Shan Xin</div>

<div>
<div>
<div><br clear="none">
#SHAN XIN# <<a rel="nofollow" shape="rect" ymailto="mailto:SHAN0055@e.ntu.edu.sg" target="_blank" href="mailto:SHAN0055@e.ntu.edu.sg">SHAN0055@e.ntu.edu.sg</a>> 於 Apr 20, 2015 17:29 寫道:<br clear="none">
<br clear="none">
</div>
<blockquote type="cite">
<div>
<div style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri, Arial, Helvetica, sans-serif;background-color:rgb(255,255,255);">
<div>Dear Makoto,<br clear="none">
</div>
<div><br clear="none">
</div>
<div>I have a doubt for the power unit. I read the "help spectopo" in Matlab, for the variable "spectra":<br clear="none">
</div>
<div><br clear="none">
</div>
<div>Outputs:</div>
<div>         spectra  = (nchans,nfreqs) power spectra (mean power over epochs), in dB</div>
<div>         freqs    = frequencies of spectra (Hz)<br clear="none">
</div>
<div><br clear="none">
</div>
<div>If the unit of variable "spectra" is in dB unit already, then when computing the absolute power, do we still need to do the transformation as you suggested (i.e.
<span style="color:rgb(255,0,0);font-family:Calibri, Arial, Helvetica, sans-serif;font-size:12.6666669845581px;background-color:rgb(255,255,255);">
10.^(spectra(deltaIdx)/10)</span>)? <br clear="none">
</div>
<div><br clear="none">
</div>
<div>I know when plotting the figure, the spectrum is plotted in log scale. But if the unit of spectra is in dB, then there's no need to transform, right? <br clear="none">
</div>
<div><br clear="none">
</div>
<div>I don't know if this is correct... Could you look more into it? Thank you so much!!<br clear="none">
</div>
<div><br clear="none">
</div>
<div>Shan Xin<br clear="none">
</div>
<div><br clear="none">
</div>
<div style="color:rgb(33,33,33);">
<hr style="display:inline-block;width:98%;">
<div dir="ltr"><font style="font-size:11pt;" color="#000000" face="Calibri, sans-serif"><b>From:</b> Makoto Miyakoshi <<a rel="nofollow" shape="rect" ymailto="mailto:mmiyakoshi@ucsd.edu" target="_blank" href="mailto:mmiyakoshi@ucsd.edu">mmiyakoshi@ucsd.edu</a>><br clear="none">
<b>Sent:</b> Thursday, 16 April 2015 11:11 AM<br clear="none">
<b>To:</b> #SHAN XIN#<br clear="none">
<b>Cc:</b> <a rel="nofollow" shape="rect" ymailto="mailto:eeglablist@sccn.ucsd.edu" target="_blank" href="mailto:eeglablist@sccn.ucsd.edu">eeglablist@sccn.ucsd.edu</a><br clear="none">
<b>Subject:</b> Re: [Eeglablist] How can I get the power of each frequency band?</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div><span style="color:rgb(0,0,0);font-family:Calibri, Arial, Helvetica, sans-serif;font-size:16px;">Dear Shan,</span></div>
<span style="color:rgb(0,0,0);font-family:Calibri, Arial, Helvetica, sans-serif;font-size:16px;">
</span><div><span style="color:rgb(0,0,0);font-family:Calibri, Arial, Helvetica, sans-serif;font-size:16px;"><br clear="none">
</span></div>
> I'm not very proficient in Matlab programming...<br clear="none">
<div class="yiv1058388329gmail_extra"><br clear="none">
</div>
<div class="yiv1058388329gmail_extra">This could be a concern but you can try!</div>
<div class="yiv1058388329gmail_extra"><br clear="none">
</div>
<div class="yiv1058388329gmail_extra">
<div style="font-size:12.6666669845581px;">%%%%%%%%%%%%%%%%%%%</div>
<div style="font-size:12.6666669845581px;">
<div>
<div>% for your epoched data, channel 2</div>
<div>[spectra,freqs] = spectopo(EEG.data(2,:,:), 0, EEG.srate);</div>
<div><br clear="none">
</div>
<div>% delta=1-4, theta=4-8, alpha=8-13, beta=13-30, gamma=30-80</div>
<div>deltaIdx = find(freqs>1 & freqs<4);</div>
<div>thetaIdx = find(freqs>4 & freqs<8);</div>
<div>alphaIdx = find(freqs>8 & freqs<13);</div>
<div>betaIdx  = find(freqs>13 & freqs<30);</div>
<div>gammaIdx = find(freqs>30 & freqs<80);</div>
<div><br clear="none">
</div>
<div><font color="#ff0000">% compute absolute power</font></div>
<div><font color="#ff0000">deltaPower = mean(10.^(spectra(deltaIdx)/10));</font></div>
<div><font color="#ff0000">thetaPower = mean(10.^(spectra(thetaIdx)/10));</font></div>
<div><font color="#ff0000">alphaPower = mean(10.^(spectra(alphaIdx)/10));</font></div>
<div><font color="#ff0000">betaPower  = mean(10.^(spectra(betaIdx)/10));</font></div>
<div><font color="#ff0000">gammaPower = mean(10.^(spectra(gammaIdx)/10));</font></div>
</div>
<div>%%%%%%%%%%%%%%%%%</div>
<div><br clear="none">
</div>
<div>Makoto</div>
</div>
</div>
<div class="yiv1058388329gmail_extra"><br clear="none">
</div>
<div class="yiv1058388329gmail_extra"><br clear="none">
<div class="yiv1058388329gmail_quote">On Tue, Apr 14, 2015 at 6:23 AM, #SHAN XIN# <span dir="ltr">
<<a rel="nofollow" shape="rect" ymailto="mailto:SHAN0055@e.ntu.edu.sg" target="_blank" href="mailto:SHAN0055@e.ntu.edu.sg">SHAN0055@e.ntu.edu.sg</a>></span> wrote:<br clear="none">
<blockquote class="yiv1058388329gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex;">
<div dir="ltr">
<div style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri, Arial, Helvetica, sans-serif;background-color:rgb(255,255,255);">
<div><span style="font-size:12pt;">Hi EEGLab team,</span></div>
<div dir="ltr" style="color:rgb(33,33,33);">
<div>
<div style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri, Arial, Helvetica, sans-serif;background-color:rgb(255,255,255);">
<div><br clear="none">
Does EEGlab has plugin or script so that I can get the power of individual band (e.g. power of alpha band or beta band) from your computation, instead of just a continuous line in the power spectrum figure?  I'm not very proficient in Matlab programming...t<span style="font-size:12pt;">hank
 you so much!!</span></div>
<div><br clear="none">
</div>
<div>Best wishes,<br clear="none">
</div>
<div>SHAN Xin<br clear="none">
</div>
<div><br clear="none">
</div>
<div><br clear="none">
</div>
</div>
</div>
</div>
</div>
</div>
<br clear="none">
_______________________________________________<br clear="none">
Eeglablist page: <a rel="nofollow" shape="rect" target="_blank" href="http://sccn.ucsd.edu/eeglab/eeglabmail.html">
http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br clear="none">
To unsubscribe, send an empty email to <a rel="nofollow" shape="rect" ymailto="mailto:eeglablist-unsubscribe@sccn.ucsd.edu" target="_blank" href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu">
eeglablist-unsubscribe@sccn.ucsd.edu</a><br clear="none">
For digest mode, send an email with the subject "set digest mime" to <a rel="nofollow" shape="rect" ymailto="mailto:eeglablist-request@sccn.ucsd.edu" target="_blank" href="mailto:eeglablist-request@sccn.ucsd.edu">
eeglablist-request@sccn.ucsd.edu</a><br clear="none">
</blockquote>
</div>
<br clear="none">
<br clear="all">
<div><br clear="none">
</div>
-- <br clear="none">
<div>
<div dir="ltr">Makoto Miyakoshi<br clear="none">
Swartz Center for Computational Neuroscience<br clear="none">
Institute for Neural Computation, University of California San Diego<br clear="none">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
<br clear="none">
<br clear="all">
<div><br clear="none">
</div>
-- <br clear="none">
<div>
<div dir="ltr">Makoto Miyakoshi<br clear="none">
Swartz Center for Computational Neuroscience<br clear="none">
Institute for Neural Computation, University of California San Diego<br clear="none">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br clear="none">
<br clear="all">
<div><br clear="none">
</div>
-- <br clear="none">
<div>
<div dir="ltr">Makoto Miyakoshi<br clear="none">
Swartz Center for Computational Neuroscience<br clear="none">
Institute for Neural Computation, University of California San Diego<br clear="none">
</div>
</div>
</div>
</div>
</div>
</div></div></div>
</div>
</div>

</blockquote></div></div><br clear="none"><br clear="all"><div><br clear="none"></div>-- <br clear="none"><div class="yiv1058388329gmail_signature"><div dir="ltr">Makoto Miyakoshi<br clear="none">Swartz Center for Computational Neuroscience<br clear="none">Institute for Neural Computation, University of California San Diego<br clear="none"></div></div>
</div></div></div></div><br clear="none"><div class="yiv1058388329yqt3474663509" id="yiv1058388329yqt36664">_______________________________________________<br clear="none">Eeglablist page: <a rel="nofollow" shape="rect" target="_blank" href="http://sccn.ucsd.edu/eeglab/eeglabmail.html">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br clear="none">To unsubscribe, send an empty email to <a rel="nofollow" shape="rect" ymailto="mailto:eeglablist-unsubscribe@sccn.ucsd.edu" target="_blank" href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu">eeglablist-unsubscribe@sccn.ucsd.edu</a><br clear="none">For digest mode, send an email with the subject "set digest mime" to <a rel="nofollow" shape="rect" ymailto="mailto:eeglablist-request@sccn.ucsd.edu" target="_blank" href="mailto:eeglablist-request@sccn.ucsd.edu">eeglablist-request@sccn.ucsd.edu</a></div><br clear="none"><br clear="none"></div></div> </div> </div>  </div></div></div></div></body></html>