obspy / obspy

ObsPy: A Python Toolbox for seismology/seismological observatories.

Home Page:https://www.obspy.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`scipy.signal` window deprecation warning in e.g. `Trace.taper()`

liamtoney opened this issue · comments

Avoid duplicates

  • I searched existing issues

Bug Summary

I noticed a deprecation warning today w/ SciPy windows when tapering data. It looks like scipy.signal.<window_name> is going to become scipy.signal.windows.<window_name> — see traceback.

Looks like these lines in setup.py will need to have .windows inserted, but I wasn't sure on that.

Not urgent but an FYI for the future...

Code to Reproduce

obspy.core.trace.Trace.taper()  # With defaults

Error Traceback

/Users/ldtoney/opt/mambaforge/envs/sonify/lib/python3.11/site-packages/obspy/core/trace.py:2174:
DeprecationWarning: Importing hann from 'scipy.signal' is deprecated and will raise an error in SciPy 1.13.0. Please use 'scipy.signal.windows.hann' or the convenience function 'scipy.signal.get_window' instead.
    taper_sides = func(2 * wlen + 1, **kwargs)

ObsPy Version?

1.4.0

Operating System?

macOS (Intel)

Python Version?

3.11.4

Installation Method?

conda