Skip to content

PySDKit 0.4.55

Choose a tag to compare

@wwhenxuan wwhenxuan released this 27 Aug 15:56
· 17 commits to main since this release

Highlights

This release adds a time–frequency extraction path and a blind-deconvolution toolkit for periodic transients:

  • Synchroextracting Transform (SET) (Yu, Yu & Xu, IEEE TIE 2017). SST squeezes every STFT coefficient onto the instantaneous-frequency trajectory; SET instead extracts only the coefficient that already sits on that trajectory and discards the smeared energy. The retained values are the original STFT samples, so a real-valued mode can be read off the ridge (real(Te[ridge, t])). Ridge tracking follows the MATLAB brevridge / brevridge_mult extractors.
  • Blind deconvolution with on-the-fly period estimation — ports of IMCKD, ACYCBD and SMHD from the MATLAB pack Period estimation of deconvolution (MCKD, CYCBD, SMHD). Each method learns an inverse FIR for x = h * s + n and re-estimates the cycle from the Hilbert envelope every iteration, so geometry / RPM is not required as a prior. These are feature extractors, not EMD-style decomposers.

Also on PyPI as 0.4.55: pip install -U PySDKit.

What's new

  • SET (pysdkit._tfa.set)
    • transform — SET map Te(t, ω) of shape (n_freq, T) (and the companion STFT / synchroextracting operator)
    • fit_transform / __call__ — extract n_imfs ridges of |Te| and reconstruct each mode as the real SET coefficient on that ridge; last row is the residual
    • brevridge / brevridge_mult — greedy IF ridges with a frequency clearing window between successive modes
    • Gaussian window length hlength (odd; default round(N/8)), sampling rate fs
    • Unit tests: pysdkit/tests/test_set.py
    • Example notebooks: examples/tfa/set.ipynb, examples/tfa/set_decomposition.ipynb
  • Blind deconvolution (pysdkit.utils.deconvolution)
    • imckd — Improved Maximum Correlated Kurtosis Deconvolution (Miao, Zhao, Lin & Lei, MSSP 2017); period from envelope autocorrelation
    • acycbd — Adaptive CYCBD (Zhang, Miao, Lin & Yi, MSSP 2021); cyclic frequency from the envelope harmonic-product spectrum (EHPS)
    • smhd — Sparse Maximum Harmonics-to-Noise-Ratio Deconvolution (Miao, Zhao, Lin & Lei, Meas. Sci. Technol. 2016); sparsity map plus envelope HNR
    • Shared helpers: estimate_period, ehps, envelope_spectrum, analytic_envelope, marked_envelope_spectrum
    • Unit tests: pysdkit/tests/test_deconvolution.py
    • Example notebooks: examples/deconvolution/imckd.ipynb, examples/deconvolution/acycbd.ipynb, examples/deconvolution/smhd.ipynb
  • Packaged demo data (pysdkit.data)
    • load_set_batdata2() — bat echolocation record from SET Example 3 (Fs = 1e6 / 7)
    • load_set_vibdata() — vibration record from SET Example 4 (Fs = 2000)
    • load_imckd_sig1() — IMCKD demo (Fs = 20 kHz, fault ≈ 29 Hz)
    • load_acycbd_sig2() — ACYCBD demo (Fs = 20 kHz, BPFI = 47 Hz)
    • load_smhd_sig3() — SMHD demo (Fs = 20 kHz, BPFI = 38 Hz)
  • SST notebooks (follow-up to 0.4.54)
  • README
    • Target table row for SET with paper, source, and notebook links

Quick start

from pysdkit import SET
from pysdkit.data import load_set_batdata2, load_imckd_sig1
from pysdkit.utils import imckd, acycbd, smhd

# SET: TFR, then ridge reconstruction (last row is the residual)
bat = load_set_batdata2()
te, freq = SET(hlength=50, fs=bat["fs"]).transform(bat["signal"])
imfs = SET(hlength=50, fs=bat["fs"], n_imfs=3)(bat["signal"])  # (4, T)

# Blind deconvolution: inverse FIR + period estimated on the fly
sig1 = load_imckd_sig1()
y, fir, info = imckd(sig1["signal"], fs=sig1["fs"])

Notes

  • Public imports: from pysdkit import SET, set and from pysdkit.utils import imckd, acycbd, smhd.
  • SET is TFA / extraction, not sifting. fit_transform still follows the usual IMF layout (last row is the residual).
  • IMCKD / ACYCBD / SMHD are utilities, not decomposers: they recover a sparse or cyclostationary source. acycbd returns (fir, s, info) with s of length L - N + 1; imckd and smhd return (y, fir, info).
  • SET expects a real 1-D record (at least 8 samples). hlength must be >= 3 (forced odd).

Install

pip install -U PySDKit

Full Changelog: 0.4.54...0.4.55