About the units of the PSD

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 . 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

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

Clemens

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

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

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?

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

https://mne-tools.github.io/dev/python_reference.html

Eric