Skip to content

Wrong dB normalization for TFR plots #11091

@Martin2Constant

Description

@Martin2Constant

Bug description

When using the plot() method on an AverageTFR object with the dB argument set to True, the dB normalization applied is 20*log10(data) instead of 10*log10(data) (which is what is specified in the documentation).
If I'm not mistaken, 20*log10(data) dB normalization is for amplitude data, not power data. I spotted this problem with this function, but it probably applies to other functions where the dB argument can be specified.

I suppose the problem lies here:

if dB:
data = 20 * np.log10(data)
from the recent commit 4a1bf6b

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions