-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
DOC: Small documentation and docstring corrections for ShortTimeFFT
#19555
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
Conversation
41581e4
to
23681ee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @DietBru, the diff LGTM - can you merge main so that we can check the docs build? The artefact has expired.
* Marked function stft(), istft() and spectrogram as legacy in docstring. * In Python code example in `signal.rst`: - Removed most doctest workarounds, i.e., expressions like ``_ = ...``. - Beautified code and y-label a little bit * Use '~' to shorten displayed link, e.g. :func:`~scipy.fft.fft()` in ShortTimeFFT.fft_mode() docstring * Fixed `ShortTimeFFT.scaling` fixed link to scale_to() method * Remove typo in ShortTimeFFT.extent()
23681ee
to
6aae8e9
Compare
Thanks for reviewing, @lucascolley. I just rebased onto the current main. The rendered changes can be found at : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks again!
>>> fig1.colorbar(im1b, ax=axx, label="Magnitude $|S_z(t, f)|$") | ||
>>> _ = fig1.supylabel(rf"Frequency $f$ in Hertz ($\Delta f = %g\,$Hz)" % | ||
... SFT.delta_f) | ||
>>> _ = fig1.supylabel(r"Frequency $f$ in Hertz ($\Delta f = %g\,$Hz)" % |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this?
>>> _ = fig1.supylabel(r"Frequency $f$ in Hertz ($\Delta f = %g\,$Hz)" % | |
>>> fig1.supylabel(r"Frequency $f$ in Hertz ($\Delta f = %g\,$Hz)" % |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed because otherwise python dev.py -n refguide-check
would produce the following error:
File "doc/source/tutorial/signal.rst", line 1490, in /home/dietrich/GitHub/scipy/tools/../doc/source/tutorial/signal.rst
Failed example:
fig1.supylabel(r"Frequency $f$ in Hertz ($\Delta f = %g\,$Hz)" %
SFT.delta_f, x=0.08, y=0.5, fontsize='medium')
Expected nothing
Got:
Text(0.08, 0.5, 'Frequency $f$ in Hertz ($\\Delta f = 4\\,$Hz)')
ERROR: refguide or doctests have errors
Approved by @lucascolley, the one remaining comment from @j-bowhay seems to be addressed, and LGTM so in it goes, thanks @DietBru ! |
stft()
,istft()
andspectrogram()
as legacy in docstrings. This is a helpful clarification in the function list of the API reference.signal.rst
a little bitsignal.rst
and_short_time_fft.py
[skip actions] [skip cirrus]