pymultitaper
pymultitaper is a fast and easy-to-use small package for multitaper spectrogram/spectrum calculation, as well as oridnary (single-taper) spectrogram calculation.
Installation
Install via pip:
pip install pymultitaper
Usage
>>> from pymultitaper import multitaper_spectrogram, plot_spectrogram
>>> from scipy.io import wavfile
>>> fs, data = wavfile.read('test.wav')
>>> freqs,times,psd = multitaper_spectrogram(
... data, fs,time_step=0.001,window_length=0.005,NW=4
... )
>>> fig,ax = plot_spectrogram(times,freqs,psd,cmap="viridis")
GPU Support
GPU support requires CuPy. For installation instructions, see the CuPy documentation.
GPU usage is automatic: if you pass a CuPy array into the spectrogram functions, pymultitaper will use the GPU backend. NumPy arrays still use the CPU backend.
>>> import cupy as cp
>>> from pymultitaper import multitaper_spectrogram
>>> from scipy.io import wavfile
>>> fs, data = wavfile.read("test.wav")
>>> data_gpu = cp.asarray(data)
>>> freqs, times, psd = multitaper_spectrogram(
... data_gpu, fs, time_step=0.001, window_length=0.005, NW=4
... )
>>> psd.shape
(len(freqs), len(times))
The returned arrays stay on the GPU until you explicitly move them back to NumPy, for example with cp.asnumpy(...), before plotting.
Documentation
Refer to pymultitaper documentation for more details.
Examples
Metadata
Release files for pymultitaper 2.0.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 | Provenance | Actions |
|---|---|---|---|---|
| pymultitaper-2.0.0.tar.gz | 9.0 kB | Without provenance | Details for pymultitaper-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pymultitaper-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for pymultitaper-2.0.0-py3-none-any.whl |
Total release size: 16.8 kB
Release files / pymultitaper-2.0.0.tar.gz
| Download URL | pymultitaper-2.0.0.tar.gz |
|---|---|
| Size | 9.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ea28b0cf46a51a8aaef5ae9f964971afe66bc6414703f1d3d70445c8f699a36b
|
|
BLAKE2b-256 checksum How to use checksums |
6333e48f05f3adaeda6c7c541c704960e88fb974f80339b75aab1189405f64f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / pymultitaper-2.0.0-py3-none-any.whl
| Download URL | pymultitaper-2.0.0-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
623001d0877f57dbebcae659ed8c624cba5664232fa6bbce3c8a96009b854b8d
|
|
BLAKE2b-256 checksum How to use checksums |
3e8f8d9d65e101211b3a4156fdaa9172d3c94aeec3983519d6ba5640f06706ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Security for pymultitaper 2.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.