Skip to content
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

ENH: Improved documentation of parameters 'scaling' and 'mode' of signal.spectrogram() #16000

Closed
wants to merge 5 commits into from

Conversation

DietBru
Copy link
Contributor

@DietBru DietBru commented Apr 17, 2022

This PR tries to improve the docstring of signal.spectrogram().

Closes #14903

@DietBru DietBru changed the title BUG: Improved documentation of parameters 'scaling' and 'mode' of signal.spectrogram() ENH: Improved documentation of parameters 'scaling' and 'mode' of signal.spectrogram() Apr 17, 2022
@tylerjereddy tylerjereddy added scipy.signal Documentation Issues related to the SciPy documentation. Also check https://github.com/scipy/scipy.org labels Apr 18, 2022
Copy link
Member

@larsoner larsoner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise LGTM

scipy/signal/_spectral_py.py Outdated Show resolved Hide resolved
@larsoner
Copy link
Member

The content in #14903 (comment) seems useful -- would you be up for adding some variant of this to the Notes section? I think copy-pasting the table plus some of your text would already be quite helpful (including the suggestion of when to use stft directly!).

@DietBru
Copy link
Contributor Author

DietBru commented Apr 24, 2022

I initially created the table for the documentation. I decided to leave it out, since in IMHO the same information is already in the documentation of the mode parameter—perhaps a bit of redundancy might be helpful to the reader, so I put in again.

Nevertheless, I think that both the stft() and spectrogram() documentation contain quite a few relevant omissions (e.g., formulas for the stft and istft are missing, boundary behavior is not easy to interpret without guessing, etc). Hence, this PR is just piecemeal. It seems to me that not all main problems can be resolved by just improving the documentation—perhaps some refactoring would be beneficial (I'm still pondering about that) ...

@larsoner
Copy link
Member

Nevertheless, I think that both the stft() and spectrogram() documentation contain quite a few relevant omissions (e.g., formulas for the stft and istft are missing, boundary behavior is not easy to interpret without guessing, etc). Hence, this PR is just piecemeal. It seems to me that not all main problems can be resolved by just improving the documentation—perhaps some refactoring would be beneficial (I'm still pondering about that) ...

Sounds good. Incremental progress is better than no progress here! And happy to look at follow-up PRs that make things more consistent, usable, and/or complete.

@DietBru
Copy link
Contributor Author

DietBru commented Jul 8, 2023

Can be closed due to #17408 being merged.

@DietBru DietBru closed this Jul 8, 2023
@DietBru DietBru deleted the spectrogram_scaling_doc branch February 17, 2024 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Issues related to the SciPy documentation. Also check https://github.com/scipy/scipy.org scipy.signal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ENH: Clarify scipy.signal.spectrogram documentation (scaling description does not consider mode)
3 participants