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

Bring back deprecated functions #31

Merged
merged 1 commit into from
Sep 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions xwavelet/wavelet.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
"dwvlt",
"cwt",
"cwt2",
"wvlt_power_spectrum",
"wvlt_cross_spectrum",
"power_spectrum",
"cross_spectrum",
]
Expand Down Expand Up @@ -281,6 +283,40 @@ def cwt2(da, s, dim=None, x0=50e3, a=1.0, ntheta=16, wtype="morlet", **kwargs):
return dawt


def wvlt_power_spectrum(
da, s, dim=None, xo=50e3, a=1.0, ntheta=16, wtype="morlet", **kwargs
):
"""
Deprecated function. See power_spectrum doc.
"""
msg = (
"This function has been renamed and will disappear in the future."
+ " Please use `power_spectrum` instead."
)
warnings.warn(msg, FutureWarning)

return power_spectrum(
da, s, dim=dim, x0=xo, a=a, ntheta=ntheta, wtype=wtype, **kwargs
)


def wvlt_cross_spectrum(
da, da1, s, dim=None, xo=50e3, a=1.0, ntheta=16, wtype="morlet", **kwargs
):
"""
Deprecated function. See cross_spectrum doc.
"""
msg = (
"This function has been renamed and will disappear in the future."
+ " Please use `cross_spectrum` instead."
)
warnings.warn(msg, FutureWarning)

return cross_spectrum(
da, da1, s, dim=dim, x0=xo, a=a, ntheta=ntheta, wtype=wtype, **kwargs
)


def power_spectrum(
da,
s,
Expand Down
Loading