<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><style>body { line-height: 1.5; }blockquote { margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em; }div.FoxDiv20221004095529468839 { overflow-wrap: break-word; }body { font-size: 14px; font-family: "Segoe UI"; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
<div><span></span><div>Thank you, Jan-Mathijs!</div><div><br></div><div>I still have two questions:</div><div>1. about average bandpower.</div><div>Is your method for calculating average bandpower different from that by integral of PSD?</div><div><br></div><div>2. about total band power.</div><div>How to calculate total band power instead of average band power in fieldtrip?</div><div><br></div><div>Best,</div><div>Zhiwei</div></div><hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span><div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt"><div>fewaster@gmail.com</div></div></span></div>
<blockquote style="margin-Top: 0px; margin-Bottom: 0px; margin-Left: 0.5em; margin-Right: inherit"><div> </div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><div style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-SIZE: 12px;FONT-FAMILY:tahoma;COLOR:#000000; BACKGROUND: #efefef; PADDING-BOTTOM: 8px; PADDING-TOP: 8px"><div><b>From:</b> <a href="mailto:fieldtrip@science.ru.nl">Schoffelen, J.M. \(Jan Mathijs\) via fieldtrip</a></div><div><b>Date:</b> 2022-09-06 22:03</div><div><b>To:</b> <a href="mailto:fieldtrip@science.ru.nl">FieldTrip discussion list</a></div><div><b>CC:</b> <a href="mailto:janmathijs.schoffelen@donders.ru.nl">Schoffelen, J.M. \(Jan Mathijs\)</a></div><div><b>Subject:</b> Re: [FieldTrip] Calculating band power or power spectral density with ft_freqanalysis</div></div></div><div><div class="FoxDiv20221004095529468839">
Hi Zhiwei Fan,
<div class=""><br class="">
</div>
<div class="">Averaging across a spectral band these days is done with the ft_selectdata function:</div>
<div class=""><br class="">
</div>
<div class="">cfg = [];</div>
<div class="">cfg.frequency = [low high]</div>
<div class="">cfg.avgoverfreq = ‘yes’;</div>
<div class="">dataout = ft_freqanalysis(cfg, datain);</div>
<div class=""><br class="">
</div>
<div class="">Good luck,</div>
<div class="">Jan-Mathijs</div>
<div class=""><br class="">
</div>
<div class="">
<div><br class="">
<blockquote type="cite" class="" style="margin-top: 0px;">
<div class="">On 2 Sep 2022, at 05:21, Francis (Zhiwei Fan) via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl" class="">fieldtrip@science.ru.nl</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">
<div class="">
<pre style="margin: 0mm 0mm 0.0001pt; font-size: 12pt; font-family: "MS Gothic";" class=""><span lang="EN-US" class="">Dear All,<o:p class=""></o:p></span></pre>
<pre style="margin: 0mm 0mm 0.0001pt; font-size: 12pt; font-family: "MS Gothic";" class=""><span lang="EN-US" class=""><o:p class=""> </o:p></span></pre>
<pre style="margin: 0mm 0mm 0.0001pt; font-size: 12pt; font-family: "MS Gothic";" class=""><span lang="EN-US" class="">I am attempting to calculate band power or power spectral density (then I can use bandpower() in Matlab to calculate band power) with<o:p class=""></o:p></span></pre>
<pre style="margin: 0mm 0mm 0.0001pt; font-size: 12pt; font-family: "MS Gothic";" class=""><span lang="EN-US" class="">ft_freqanalysis but it seems does provide this function. I have found a similar question in <o:p class=""></o:p></span></pre>
<pre style="margin: 0mm 0mm 0.0001pt; font-size: 12pt; font-family: "MS Gothic";" class=""><span lang="EN-US" class=""><o:p class=""> </o:p></span></pre>
<pre style="margin: 0mm 0mm 0.0001pt; font-size: 12pt; font-family: "MS Gothic";" class=""><span lang="EN-US" class=""><a href="https://mailman.science.ru.nl/pipermail/fieldtrip/2020-February/039790.html" class="">https://mailman.science.ru.nl/pipermail/fieldtrip/2020-February/039790.html</a><o:p class=""></o:p></span></pre>
<pre style="margin: 0mm 0mm 0.0001pt; font-size: 12pt; font-family: "MS Gothic";" class=""><span lang="EN-US" class=""><o:p class=""> </o:p></span></pre>
<pre style="margin: 0mm 0mm 0.0001pt; font-size: 12pt; font-family: "MS Gothic";" class=""><span lang="EN-US" class="">However, no one has yet answered this question.<o:p class=""></o:p></span></pre>
<pre style="margin: 0mm 0mm 0.0001pt; font-size: 12pt; font-family: "MS Gothic";" class=""><span lang="EN-US" class="">I want to know how to calculate band power or power spectral density in Fieldtrip. <o:p class=""></o:p></span></pre>
<pre style="margin: 0mm 0mm 0.0001pt; font-size: 12pt; font-family: "MS Gothic";" class=""><span lang="EN-US" class=""><o:p class=""> </o:p></span></pre>
<pre style="margin: 0mm 0mm 0.0001pt; font-size: 12pt; font-family: "MS Gothic";" class=""><span lang="EN-US" class="">Thanks in advance for your help,<o:p class=""></o:p></span></pre>
<pre style="margin: 0mm 0mm 0.0001pt; font-size: 12pt; font-family: "MS Gothic";" class=""><span lang="EN-US" class="">Francis<o:p class=""></o:p></span></pre>
<pre style="margin: 0mm 0mm 0.0001pt; font-size: 12pt; font-family: "MS Gothic";" class=""><span lang="EN-US" class=""><o:p class=""> </o:p></span></pre>
<pre style="margin: 0mm 0mm 0.0001pt; font-size: 12pt; font-family: "MS Gothic";" class=""><span lang="EN-US" class="">Zhiwei Fan, Ph.D.<o:p class=""></o:p></span></pre>
<pre style="margin: 0mm 0mm 0.0001pt; font-size: 12pt; font-family: "MS Gothic";" class=""><span lang="EN-US" class="">Post-doc | Abe lab<o:p class=""></o:p></span></pre>
<pre style="margin: 0mm 0mm 0.0001pt; font-size: 12pt; font-family: "MS Gothic";" class=""><span lang="EN-US" class=""><a href="https://urldefense.com/v3/__https://www.u.tsukuba.ac.jp/*abe.takashi.gp/__;fg!!HJOPV4FYYWzcc1jazlU!7fKm1v4hrZvcmNtCLJkiTTxFyctgS4iO5j_7yhGZHoryGlNv83zTXIjWs27mINTVdr-oPqYruYR7w8QHqUiUD4hKaafzhZ2KQ-xzuA$" class="">https://www.u.tsukuba.ac.jp/~abe.takashi.gp/</a></span><span lang="EN-US" style="" class=""><o:p class=""></o:p></span></pre>
</div>
</div>
<span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">_______________________________________________</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">fieldtrip
 mailing list</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: 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; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<a href="https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!7fKm1v4hrZvcmNtCLJkiTTxFyctgS4iO5j_7yhGZHoryGlNv83zTXIjWs27mINTVdr-oPqYruYR7w8QHqUiUD4hKaafzhZ0pCSAEuA$" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: 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; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!7fKm1v4hrZvcmNtCLJkiTTxFyctgS4iO5j_7yhGZHoryGlNv83zTXIjWs27mINTVdr-oPqYruYR7w8QHqUiUD4hKaafzhZ0pCSAEuA$</a><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class=""><span class="Apple-converted-space"> </span> </span></div>
</blockquote>
</div>
<br class="">
</div>
</div></div></blockquote>
</body></html>