[FieldTrip] PSD units

Adam Grinberg adam.grinberg at umu.se
Wed Apr 12 09:40:32 CEST 2023


Hi,
I indeed wish to calculate the power spectral density of my signal. I.e., how the signal power is distributed across various frequencies. Fieldtrip's ft_freqanalysis function can indeed calculate this (even though they do not explicitly use this term.

    cfg              = [];
    cfg.method       = 'mtmfft';
    cfg.taper        = 'dpss';
    cfg.tapsmofrq       = 0.5;
    cfg.output       = 'pow';
    cfg.channel = {'F3', 'Fz', 'F4'};

  theta_freq) = ft_freqanalysis(cfg, ft_data);

Now, while power is generally represented in Watt, a common unit of power is are µV^2/Hz. This however is not the output that I get, but seems to be smaller by a factor of ~120. As I wish to publish in accordance with the convention, I at least wish to know what type of normalization/transformation Fieldtrip is performing and what the rationale for that is.


/Adam
______________________________________________________________________________________
Adam Grinberg, PT, PhD
Department of Community Medicine and Rehabilitation, Physiotherapy
Umeå University
Umeå, Sweden
Tel: +46 (0) 90 786 96 30

From: fieldtrip <fieldtrip-bounces at science.ru.nl> On Behalf Of Schoffelen, J.M. (Jan Mathijs) via fieldtrip
Sent: 11 April 2023 17:09
To: FieldTrip discussion list <fieldtrip at science.ru.nl>
Cc: Schoffelen, J.M. (Jan Mathijs) <janmathijs.schoffelen at donders.ru.nl>
Subject: Re: [FieldTrip] PSD units

Hi Adam,

What's your question? I have some difficulty distilling it from your e-mail.

I assume that you have visited the discussion list's archive, where you will have noticed that questions regarding the units of the output of ft_freqanalysis pop up now and then.

Nobody seems to have made an effort so far, to sort it out once and for all, by making a FAQ out of this. I think it would be great if you could start this piece of documentation by describing the normalisation that FT uses in ft_freqanalysis (and the underlying ft_specest_<> functions), and how this relates to plain matlab, or any other software package.

Perhaps you could start by studying the difference between the power spectrum, and power spectral density. The fact that you use the term PSD in your e-mail, whereas - as far as I know - fieldtrip does not use this terminology, nor claims that it computes the PSD.

Good luck,
Jan-Mathijs





On 11 Apr 2023, at 09:09, Adam Grinberg via fieldtrip <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>> wrote:

Hello,
My question concerns the Fieldtrip PSD function. I am running the code on some EEG data and comparing it with the MATLAB periodogram function. While the FFT produces similar graphical shape of the spectrogram, the units are different.
The periodogram function's units are µV^2/Hz, which is the common output for power (before converting to Db). However, the values that I get with the Fieldtrip freqanalysis function seem to be ~120 times lower. I cannot understand what they are. I looked at the code and still do not get it. I suppose that this is due to some normalization method done but I am not certain as to the rationale for the particular one used.

Tanks.


/Adam
______________________________________________________________________________________
Adam Grinberg, PT, PhD
Department of Community Medicine and Rehabilitation, Physiotherapy
Umeå University
Umeå, Sweden
Tel: +46 (0) 90 786 96 30

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20230412/85ad6f9e/attachment.htm>


More information about the fieldtrip mailing list