WDM wavelet transform
This package hosts the python version of WDM wavelet used in coherentWaveBurst(cWB) search.
Installation
pip install wdm-wavelet
Example
Generate a timeseries waveform
from pycbc.waveform import get_td_waveform
import matplotlib.pyplot as plt
hp, hc = get_td_waveform(approximant="IMRPhenomTPHM",
mass1=20,
mass2=20,
spin1z=0.9,
spin2z=0.4,
inclination=1.23,
coa_phase=2.45,
distance=100,
delta_t=1.0/2048,
f_lower=20)
Apply WDM wavelet transform
from wdm_wavelet.wdm import WDM
wdm = WDM(32, 64, 6, 10, backend="jax") # or backend="numba"
tf_map = wdm.t2w(hp)
tf_map.plot_energy()
Inverse WDM wavelet transform
ts = wdm.w2t(tf_map)
plt.plot(ts)
Supported class backends: "jax" (default) and "numba".
Both JAX and Numba are required installation dependencies.
For more examples, please refer to the example notebook.
API docs
Choosing a backend
from wdm_wavelet.wdm import WDM
wdm = WDM(16, 16, 6, 10, backend="numba") # or backend="jax"
The backend selects the forward and inverse transform kernels for each instance. Numba executes on the CPU; JAX uses its configured device. Both implementations are installed together, so changing backend requires no dependency changes. Missing dependencies fail at import rather than silently selecting slower kernels.
WDM.filter remains a float64 JAX array for both backends, as in v0.3.1.
Numba wrappers convert inputs to NumPy arrays at the kernel boundary. NumPy
remains a dependency for array storage and numerical operations; it is not a
separate execution backend. Class inverse methods return GWpy TimeSeries.
Metadata
Release files for wdm-wavelet 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| wdm_wavelet-0.4.0.tar.gz | 698.5 kB | Details |
Release files / wdm_wavelet-0.4.0.tar.gz
| Download URL | wdm_wavelet-0.4.0.tar.gz |
|---|---|
| Size | 698.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c0cdc4939997d8a175f1098951eb93456336d0593edad49cb0e4d010c196e9a8
|
|
BLAKE2b-256 checksum How to use checksums |
d36b6f4e485d92345f1423549730f585e74bb20709f2084f8667e5acbbac847f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.21
|