Skip to content

Tweak y-axis label #13298

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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Tweak y-axis label #13298

wants to merge 4 commits into from

Conversation

cbrnr
Copy link
Contributor

@cbrnr cbrnr commented Jun 25, 2025

Use more common y-axis label for PSD plot. Fixes #13296.

@cbrnr
Copy link
Contributor Author

cbrnr commented Jun 25, 2025

@drammock I tried to make the docstring slightly more readable, but the dB_plot_psd entry is just for the legacy function(s). The new functions are based on the _dB entry, which currently is

_dB = """
dB : bool
    Whether to plot on a decibel scale. If ``True``, plots
    10 × log₁₀({quantity}){caveat}.{extra}
"""

I would like to change the following three things:

  1. The factor 10 only applies for PSDs, but for ASDs the factor is 20 (hopefully that's also what the code does, I didn't check).
  2. The formula shows the conversion to dB, but the plots (both PSD and ASD) show dB/Hz or dB/√Hz. I think this should be included in the docs, but I'm not sure how.
  3. In that docstring we could also include the reference power or amplitude values, but I'm also not sure how.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Further clarify dB units in PSD plots
1 participant