# About the units of the PSD

**URL:** <https://mne.discourse.group/t/about-the-units-of-the-psd/1326>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [October 4, 2017, 12:31am UTC](https://mne.discourse.group/t/about-the-units-of-the-psd/1326 "2017-10-04T00:31:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [October 4, 2017, 12:31am UTC](https://mne.discourse.group/t/about-the-units-of-the-psd/1326/1 "2017-10-04T00:31:38Z")

</div>

Hi:

I have some questions regarding the units used in the PSD plot of raw signals.

As a reference for definitions related to the PSD I'm using this  
document: [https://holometer.fnal.gov/GH\_FFT.pdf](https://holometer.fnal.gov/GH_FFT.pdf) . In particular, see  
Table 1 in page 7, and Eq. (14) in page 10.

Looking at the code, I see that all the calls to the spectrogram  
function are made with the scaling parameter set to "density" (that's  
the default value). According to the documentation, the description of  
the parameter is:

"Selects between computing the power spectral density (?density?)  
where Sxx has units of V\*\*2/Hz and computing the power spectrum  
(?spectrum?) where Sxx has units of V\*\*2, if x is measured in V and fs  
is measured in Hz. "

My understanding is that this implies that MNE always compute the  
power spectral density, with units uV\*\*2/Hz (I'm focusing on EEG,  
which is scaled to uV).

On the other hand, the dB parameter of the raw.plot\_psd function is  
documented as:

"If True, transform data to decibels. If False, plot amplitudes."

My questions is:

- When using dB=False, shouldn't the units used in the PSD plot be  
uV\*\*2/Hz, instead of uV/sqrt{Hz} ?

Also related, I think that saying that dB=False corresponds to  
plotting the amplitudes is not correct, since that would require to  
take the square root of the PSD, which isn't the case.

Alejandro

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [October 4, 2017, 6:56am UTC](https://mne.discourse.group/t/about-the-units-of-the-psd/1326/2 "2017-10-04T06:56:18Z")

</div>

Alejandro,

you are right that the unit of the PSD is V\*\*2/Hz (or uV\*\*2/Hz in the case of EEG). If dB=True, the unit should be dB without anything else in parentheses. Since MNE uses scipy.signal.spectrogram, my guess is that the labels are wrong. The ASD has units of V/sqrt(Hz) because the ASD is the square root of the PSD, so if MNE is really calculating the ASD this should be documented or changed.

I've created a new issue: [https://github.com/mne-tools/mne-python/issues/4642](https://github.com/mne-tools/mne-python/issues/4642)

Clemens

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [October 4, 2017, 3:02pm UTC](https://mne.discourse.group/t/about-the-units-of-the-psd/1326/3 "2017-10-04T15:02:25Z")

</div>

Hi all,?

I have a problem when I create the stc?file specifically in the loose orientation. I am using mne.minimum\_norm.make\_inverse\_operator and mne.minimum\_norm.apply\_inverse\_raw functions. I used the default parameters to get the \*.stc file for my resting data (loose: 0.2 ad depth: 0.8). Overall, I have got the results which are not what I expected (the frequency and spatial response are different with the channel space). It should be the same response between \*fif and \*stc file. I am afraid that I should use different parameters for resting data.?  
Thank you so much for any suggestions.?  
Hendrik SantosaUniversity of Pittsburgh

-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20171004/b4a09ebe/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20171004/b4a09ebe/attachment.html)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [October 5, 2017, 12:17am UTC](https://mne.discourse.group/t/about-the-units-of-the-psd/1326/4 "2017-10-05T00:17:11Z")

</div>

> Overall, I have got the results which are not what I expected (the  
> frequency and spatial response are different with the channel space).

With a loose (or free) orientation inverse, calling `apply_inverse_*`  
without the default pick\_ori=None argument will end up taking the absolute  
value. This nonlinearity can change the frequency response, which would  
otherwise be preserved by a linear transformation (which you would have  
with the pick\_ori="normal" and "vector" modes)..

As for the spatial distribution being different, you might want to use  
`plot_alignment` to verify your sources, conductor model, and sensors are  
properly aligned.

Eric  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20171004/88a625b4/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20171004/88a625b4/attachment.html)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [October 5, 2017, 3:47pm UTC](https://mne.discourse.group/t/about-the-units-of-the-psd/1326/5 "2017-10-05T15:47:28Z")

</div>

Hi Eric,?  
Thanks for your response.?Could you please give me the detail information about 'plot-alignment'? How to use that function, etc. Also, where I can find the argument for "vector' modes in 'apply\_inverse'.  
Thanks!  
Hendrik?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [October 5, 2017, 3:50pm UTC](https://mne.discourse.group/t/about-the-units-of-the-psd/1326/6 "2017-10-05T15:50:09Z")

</div>

They are currently in the development version, which we hope to release  
soon:

[https://mne-tools.github.io/dev/python\_reference.html](https://mne-tools.github.io/dev/python_reference.html)

Eric
