Skip to content

Commit f380592

Browse files
committed
whenxuan: add the blind deconvolution with on-the-fly period estimation
1 parent 80e229d commit f380592

13 files changed

Lines changed: 1687 additions & 0 deletions

File tree

‎pysdkit/data/__init__.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@
5252
"load_fast_kurtogram_x",
5353
"load_set_batdata2",
5454
"load_set_vibdata",
55+
"load_imckd_sig1",
56+
"load_acycbd_sig2",
57+
"load_smhd_sig3",
5558
]
5659

5760
# A series of functions for generating 1D NumPy signals
@@ -143,4 +146,7 @@
143146
load_fast_kurtogram_x,
144147
load_set_batdata2,
145148
load_set_vibdata,
149+
load_imckd_sig1,
150+
load_acycbd_sig2,
151+
load_smhd_sig3,
146152
)

‎pysdkit/data/_loaders.py‎

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,55 @@ def load_set_vibdata() -> Dict[str, Union[np.ndarray, float]]:
338338
return {"signal": signal, "fs": fs, "t": t}
339339

340340

341+
def load_imckd_sig1() -> Dict[str, Union[np.ndarray, float]]:
342+
"""
343+
Load the packaged IMCKD demo record (Miao et al., MSSP 2017).
344+
345+
MATLAB ``sig1.mat`` (variable ``x``, 20001 samples) from
346+
``01 IMCKD/demo.m``. Sampling rate 20 kHz; the demo overlays
347+
period harmonics of ``20000/29`` samples (about 29 Hz).
348+
Stored as ``deconv_sig1.npy``.
349+
350+
:return: dict with ``signal``, ``fs``, ``t``, ``fault_hz``
351+
"""
352+
signal = _load_float1d("deconv_sig1.npy")
353+
fs = 20000.0
354+
t = np.arange(signal.size, dtype=float) / fs
355+
return {"signal": signal, "fs": fs, "t": t, "fault_hz": 29.0}
356+
357+
358+
def load_acycbd_sig2() -> Dict[str, Union[np.ndarray, float]]:
359+
"""
360+
Load the packaged ACYCBD demo record (Zhang, Miao, Lin, Yi, MSSP 2021).
361+
362+
MATLAB ``sig2.mat`` (variable ``x``, 20000 samples) from
363+
``02 ACYCBD/demo.m``. Sampling rate 20 kHz, inner-race frequency
364+
``BPFI = 47`` Hz. Stored as ``deconv_sig2.npy``.
365+
366+
:return: dict with ``signal``, ``fs``, ``t``, ``bpfi``
367+
"""
368+
signal = _load_float1d("deconv_sig2.npy")
369+
fs = 20000.0
370+
t = np.arange(signal.size, dtype=float) / fs
371+
return {"signal": signal, "fs": fs, "t": t, "bpfi": 47.0}
372+
373+
374+
def load_smhd_sig3() -> Dict[str, Union[np.ndarray, float]]:
375+
"""
376+
Load the packaged SMHD demo record (Miao et al., Meas. Sci. Technol. 2016).
377+
378+
MATLAB ``sig3.mat`` (variable ``x``, 20001 samples) from
379+
``03 SMHD/demo.m``. Sampling rate 20 kHz; the demo marks
380+
``BPFI = 38`` Hz. Stored as ``deconv_sig3.npy``.
381+
382+
:return: dict with ``signal``, ``fs``, ``t``, ``bpfi``
383+
"""
384+
signal = _load_float1d("deconv_sig3.npy")
385+
fs = 20000.0
386+
t = np.arange(signal.size, dtype=float) / fs
387+
return {"signal": signal, "fs": fs, "t": t, "bpfi": 38.0}
388+
389+
341390
def load_memd_taichi_hex() -> Dict[str, np.ndarray]:
342391
"""
343392
Load the packaged MATLAB ``taichi_hex_inp.mat`` demo (``taichi_final``).

‎pysdkit/data/deconv_sig1.npy‎

156 KB
Binary file not shown.

‎pysdkit/data/deconv_sig2.npy‎

156 KB
Binary file not shown.

‎pysdkit/data/deconv_sig3.npy‎

156 KB
Binary file not shown.

0 commit comments

Comments
 (0)