PSD different units

Hi, I’m getting different unit ranges when doing psd.

When I epoch raw data with equal length segments and do a plot_psd_topomap per frequency bands, the range is different from the plot_psd one.
See last figures on this notebook.
I marked dB=True and Normalize=False. Any other thing that should be taking into account?

plot_psd
Captura de pantalla 2021-10-15 a las 13.42.51

plot_psd_topomap
Captura de pantalla 2021-10-15 a las 13.42.58

The topomaps show power within specific frequency bands, whereas the PSD shows density. I’m thinking that maybe the units should not be per Hz in the topomaps because you’re basically summing power at specific frequencies.

In addition, if the unit is dB it cannot also be e.g. fT2/Hz, so we should probably fix the labels.

@cbrnr After bringing this up in a 10-second convo with @agramfort it appears that the actual difference is that in the topomaps, the unit is scaled differently (it’s actually in T^2/Hz and not in fT^2/Hz), so we should fix this or at least correct the label. Note that so far this is only a suspicion and I have yet to verify this.

This doesn’t sound right to me. If it really were T^2/Hz, you would see nothing in the maps because the actual signal is orders of magnitudes smaller. If you consider what I suspected and add up the power e.g. within 0-4Hz, you’d actually get the values in the topomap. But I’m also not 100% and would need to confirm.

Did you consider that the values of the colorbar are MINUS ~200 dB? Your explanation doesn’t work with this

True, I didn’t see the minus. But we’re talking about dB so it looks like the denominator in the two plot is different. But the other comment is still valid, the unit is dB and cannot be fT^2/Hz (or T^2/Hz) at the same time.

The labels indicate that the unit is, in fact, dB — indicated by “dB” written in parentheses.

To avoid confusion, the “fT^2/Hz” part could probably be renamed to “power” instead.

Yes, this would avoid confusion, because fT^2/Hz are also just units :slightly_smiling_face:.

1 Like

OTOH it helps to figure out WHAT was “deci-Bel’d”. Maybe instead, we should have something like: “Power (dB(fT^2/Hz))”?

Or more easily, just “dB(fT^2/Hz)”?

But why would you want to do this? dB is a ratio of two power values on a log scale. It doesn’t matter if the original unit was fT/Hz or T/Hz, because the ratio will be the same.

To make it obvious what’s the “power” that’s considered here in the first place. I guess I’m more thinking about how to help beginners understand what they’re seeing here…

I’ve opened a related issue that hopefully helps clarify things a bit:

1 Like

Hi! I think labels help a lot for units etc, so I wouldn’t removed them.

The issue you opened Richard dealing with the psd_plot, it’s instructive, I reproduced it as well using psd welch and multitapper funtions (old posts), but still I miss the relation with the plot_psd_topomap

1 Like

plot_psd_topomap doesn’t apply the unit scaling. If you run my example code from the GH issue and drop the line that scales the values, you’ll get results that resemble what you have in the topomaps.

I’ve opened an issue to address this inconsistency:

what is the reference signal used when plotting PSD in (microvolt)^2/Hz (dB)? Since dB is a ratio of two power values on a log scale.

It’s probably just 1.

I’m just asking to clarify. Is it 1 W?

1 of the same unit as the value in the numerator. In the original example, it should be 1 fT².

1 Like