New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The y-axis label of figures created with psd() should not say "Density" when scale_by_freq=False #862
Comments
@efiring, @dopplershift: It looks like you guys were the last to work around the |
Technically correct, but I was just trying to keep code simple in the On Fri, May 11, 2012 at 8:51 AM, Michael Droettboom
Ryan May |
@dopplershift, I am trying to clean up the labels and documentation for these functions, and I find the docstring for Fc to be completely incomprehensible. It sounds like what you are really trying to describe is heterodyning: mixing with a given frequency and low-pass filtering. But that leaves frequencies shifted down, and positive Fc corresponds to the case where frequencies have been shifted up. Whatever it is, Fc seems to be too arcane to be included in the quick and dirty psd and csd Axes methods. Actually, it is highly debatable whether we should even have such methods, and if we do, whether they should be using db. But we are stuck with them for now. Unless you can come up with a really short, clear explanation of how and when one uses Fc, I think we should deprecate it. |
@efiring I'm not clear on what you mean by Fc? I don't see that string anywhere in the entire mlab.py file. If you're talking about Fs, we absolutely need to keep this, as this represents the sampling frequency. Providing this allows psd() and company to display the x-axis in physical units (Hz) rather than normalized frequency. |
@dopplershift, Fc is not in mlab, but it is in all the pyplot functions and axes methods. Regarding Fs, yes, it is essential--but for many applications, Hz is not a customary physical unit for frequency, so probably yet another kwarg is needed in the axes methods and pyplot functions to allow alternatives. |
When the
scale_by_freq
parameter isFalse
, a more appropriate description might be "Power spectrum (dB)".See definition here: http://en.wikipedia.org/wiki/Spectral_density#Power_spectral_density
The text was updated successfully, but these errors were encountered: