# 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

plot_psd_topomap

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 .

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: