[FieldTrip] Calculating band power or power spectral density with ft_freqanalysis

Schoffelen, J.M. (Jan Mathijs) janmathijs.schoffelen at donders.ru.nl
Tue Oct 4 09:13:16 CEST 2022


Hi Zhiwei,

On 4 Oct 2022, at 02:59, fewaster at gmail.com<mailto:fewaster at gmail.com> wrote:

Thank you, Jan-Mathijs!

I still have two questions:
1. about average bandpower.
Is your method for calculating average bandpower different from that by integral of PSD?

Yes this is different. An integral is a sum, and ‘my method’ is -as the name suggests- an average.

2. about total band power.
How to calculate total band power instead of average band power in fieldtrip?

What about multiplying the average with the number of frequency bins, assuming that with ’total band power’ you mean the same as ‘integral of PSD'?

Best wishes and happy computing,
Jan-Mathijs




Best,
Zhiwei
________________________________
fewaster at gmail.com<mailto:fewaster at gmail.com>

From: Schoffelen, J.M. \(Jan Mathijs\) via fieldtrip<mailto:fieldtrip at science.ru.nl>
Date: 2022-09-06 22:03
To: FieldTrip discussion list<mailto:fieldtrip at science.ru.nl>
CC: Schoffelen, J.M. \(Jan Mathijs\)<mailto:janmathijs.schoffelen at donders.ru.nl>
Subject: Re: [FieldTrip] Calculating band power or power spectral density with ft_freqanalysis
Hi Zhiwei Fan,

Averaging across a spectral band these days is done with the ft_selectdata function:

cfg = [];
cfg.frequency = [low high]
cfg.avgoverfreq = ‘yes’;
dataout = ft_freqanalysis(cfg, datain);

Good luck,
Jan-Mathijs


On 2 Sep 2022, at 05:21, Francis (Zhiwei Fan) via fieldtrip <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>> wrote:


Dear All,



I am attempting to calculate band power or power spectral density (then I can use bandpower() in Matlab to calculate band power) with

ft_freqanalysis but it seems does provide this function. I have found a similar question in



https://mailman.science.ru.nl/pipermail/fieldtrip/2020-February/039790.html



However, no one has yet answered this question.

I want to know how to calculate band power or power spectral density in Fieldtrip.



Thanks in advance for your help,

Francis



Zhiwei Fan, Ph.D.

Post-doc | Abe lab

https://www.u.tsukuba.ac.jp/~abe.takashi.gp/<https://urldefense.com/v3/__https://www.u.tsukuba.ac.jp/*abe.takashi.gp/__;fg!!HJOPV4FYYWzcc1jazlU!7fKm1v4hrZvcmNtCLJkiTTxFyctgS4iO5j_7yhGZHoryGlNv83zTXIjWs27mINTVdr-oPqYruYR7w8QHqUiUD4hKaafzhZ2KQ-xzuA$>

_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!7fKm1v4hrZvcmNtCLJkiTTxFyctgS4iO5j_7yhGZHoryGlNv83zTXIjWs27mINTVdr-oPqYruYR7w8QHqUiUD4hKaafzhZ0pCSAEuA$

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20221004/73b56f32/attachment.htm>


More information about the fieldtrip mailing list