You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mlab.psd behaviour has changed in 1.5.x, psd depends on window size NFFT? #7237
This is intended--it is the way the "power spectrum" works, as opposed to the "power density spectrum". The former is what you get with scale_by_freq=False, the latter with True. It is illustrated in the second plot here: http://currents.soest.hawaii.edu/ocn_data_analysis/_static/Spectrum.html. As NFFT changes, the power spectrum preserves the height of a spectral peak from a single sinusoid, but not the level of a broad-bandwidth background. The reverse is true of the power spectral density.
I was expecting that. My point was actually the change in behavior wrt previous matplotlib versions that I did not find in the changelog and that ended up breaking backwards compatibility. Possibly I missed that.
Activity
efiring commentedon Oct 8, 2016
This is intended--it is the way the "power spectrum" works, as opposed to the "power density spectrum". The former is what you get with
scale_by_freq=False, the latter withTrue. It is illustrated in the second plot here: http://currents.soest.hawaii.edu/ocn_data_analysis/_static/Spectrum.html. As NFFT changes, the power spectrum preserves the height of a spectral peak from a single sinusoid, but not the level of a broad-bandwidth background. The reverse is true of the power spectral density.See #4328 and #4593.
callegar commentedon Oct 10, 2016
I was expecting that. My point was actually the change in behavior wrt previous matplotlib versions that I did not find in the changelog and that ended up breaking backwards compatibility. Possibly I missed that.
efiring commentedon Oct 10, 2016
No, I think we missed it. It looks like it should be in http://matplotlib.org/api/api_changes.html, but isn't.
jklymak commentedon Jan 28, 2023
This is really old history - closing...