PySDKit 0.4.27__tar.gz → 0.4.29__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pysdkit-0.4.27 → pysdkit-0.4.29}/PKG-INFO +8 -6
- {pysdkit-0.4.27 → pysdkit-0.4.29}/PySDKit.egg-info/PKG-INFO +8 -6
- {pysdkit-0.4.27 → pysdkit-0.4.29}/PySDKit.egg-info/SOURCES.txt +6 -2
- {pysdkit-0.4.27 → pysdkit-0.4.29}/README.md +7 -5
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/__init__.py +16 -1
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_alif/alif.py +2 -2
- pysdkit-0.4.27/pysdkit/_alif/_helpers.py → pysdkit-0.4.29/pysdkit/_alif/iterative_filtering.py +160 -3
- pysdkit-0.4.29/pysdkit/_apmd/__init__.py +7 -0
- pysdkit-0.4.29/pysdkit/_apmd/apmd.py +829 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_hvd/hvd.py +1 -1
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_jmd/__init__.py +3 -0
- pysdkit-0.4.29/pysdkit/_jmd/jmd.py +288 -0
- pysdkit-0.4.29/pysdkit/_jmd/mjmd.py +302 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_lmd/rlmd.py +2 -2
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_vmd/__init__.py +2 -0
- pysdkit-0.4.29/pysdkit/_vmd/ovmd.py +244 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/tests/test_alif.py +5 -1
- pysdkit-0.4.29/pysdkit/tests/test_apmd.py +124 -0
- pysdkit-0.4.29/pysdkit/tests/test_jmd.py +108 -0
- pysdkit-0.4.29/pysdkit/tests/test_ovmd.py +100 -0
- pysdkit-0.4.27/pysdkit/_alif/iterative_filtering.py +0 -175
- pysdkit-0.4.27/pysdkit/_ifd/__init__.py +0 -7
- pysdkit-0.4.27/pysdkit/_jmd/jmd.py +0 -395
- pysdkit-0.4.27/pysdkit/_jmd/mjmd.py +0 -34
- {pysdkit-0.4.27 → pysdkit-0.4.29}/LICENSE +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/PySDKit.egg-info/dependency_links.txt +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/PySDKit.egg-info/requires.txt +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/PySDKit.egg-info/top_level.txt +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pyproject.toml +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_alif/__init__.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_alif/data/__init__.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_alif/data/prefixed_double_filter.npy +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_emd/__init__.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_emd/_find_extrema.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_emd/_prepare_points.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_emd/_splines.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_emd/ceemdan.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_emd/eemd.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_emd/efd.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_emd/emd.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_emd/hht/__init__.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_emd/hht/frequency.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_emd/hht/hht.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_emd/memd.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_emd/remd.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_emd/tvf_emd.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_emd2d/__init__.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_emd2d/bemd.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_emd2d/bmemd.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_emd2d/emd2d.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_esmd/__init__.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_esmd/esmd.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_ewt/__init__.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_ewt/ewt.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_ewt/ewt2d.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_faemd/__init__.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_faemd/extrema.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_faemd/faemd.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_faemd/faemd2d.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_faemd/faemd3d.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_faemd/filter.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_fmd/__init__.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_fmd/fmd.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_fmd/nfmd.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_hvd/__init__.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_itd/__init__.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_itd/itd.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_lmd/__init__.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_lmd/lmd.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_osd/__init__.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_ssa/__init__.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_ssa/ssa.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_vmd/acmd.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_vmd/avmd.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_vmd/ba_acmd.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_vmd/base.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_vmd/mvmd.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_vmd/svmd.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_vmd/vmd_c.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_vmd/vmd_f.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_vmd/vme.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_vmd2d/__init__.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_vmd2d/cvmd2d.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_vmd2d/vmd2d.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_vncmd/__init__.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_vncmd/avncmd.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_vncmd/incmd.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_vncmd/mncmd.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/_vncmd/vncmd.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/data/__init__.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/data/_add_noise.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/data/_cube.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/data/_generator.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/data/_image.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/data/_models.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/data/_test_univariate.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/data/_time_series.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/data/texture.txt +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/entropy/__init__.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/entropy/_approxiamte_entropy.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/entropy/_permutation_entropy.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/entropy/_sample_entropy.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/models/__init__.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/models/_base.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/models/_kmeans.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/models/_knn.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/models/_pca.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/plot/__init__.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/plot/_fourier_spectra.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/plot/_functions.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/plot/_plot_images.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/plot/_plot_imfs.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/plot/_plot_signal.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/tests/__init__.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/tests/data/__init__.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/tests/data/test_generator_cube.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/tests/data/test_generator_image.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/tests/data/test_generator_signal.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/tests/data/test_generator_univariate_signal.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/tests/models/__init__.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/tests/models/test_knn.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/tests/models/test_pca.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/tests/run_all.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/tests/test_avncmd.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/tests/test_ceemdan.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/tests/test_emd.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/tests/test_ewt.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/tests/test_faemd.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/tests/test_faemd2d.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/tests/test_faemd3d.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/tests/test_itd.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/tests/test_lmd.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/tests/test_moving_decomp.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/tests/test_rlmd.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/tests/test_stl.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/tests/test_vmd.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/tests/test_vmd2d.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/tsa/__init__.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/tsa/_dtw.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/tsa/_moving_decomp.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/tsa/_mstl.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/tsa/_stl.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/utils/__init__.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/utils/_cite.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/utils/_correlation.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/utils/_diagnalization.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/utils/_differ.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/utils/_fft.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/utils/_function.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/utils/_hilbert.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/utils/_instantaneous.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/utils/_kernel_matrix.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/utils/_mirror.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/utils/_process.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/pysdkit/utils/_smooth1d.py +0 -0
- {pysdkit-0.4.27 → pysdkit-0.4.29}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PySDKit
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.29
|
|
4
4
|
Summary: A Python library for signal decomposition algorithms with a unified interface.
|
|
5
5
|
Author: josefinez, Deeksha Manjunath, Yuan Feng, JacktheFowler
|
|
6
6
|
Author-email: Whenxuan Wang <wwhenxuan@gmail.com>, RuiZhe Wang <3133986068@qq.com>, WenTong Zhao <23049200290@stu.xidian.edu.cn>
|
|
@@ -139,7 +139,7 @@ plot_IMFs_amplitude_spectra(IMFs, smooth="exp") # use exp smooth
|
|
|
139
139
|
|
|
140
140
|
## Target 🎯 <a id="Target"></a>
|
|
141
141
|
|
|
142
|
-
`PySDKit` is still under development. We are currently working on reproducing the signal decomposition algorithms in the table below, including not only common decomposition algorithms for `univariate signals` such as EMD and
|
|
142
|
+
`PySDKit` is still under development. We are currently working on reproducing the signal decomposition algorithms in the table below, including not only common decomposition algorithms for `univariate signals` such as EMD, VMD, OVMD, AVNCMD, ALIF and APMD, but also decomposition algorithms for `multivariate signals` such as MEMD and MVMD. We will also further reproduce the decomposition algorithms for `two-dimensional images` to make PySDKit not only suitable for signal processing, but also for image analysis and understanding. See [`Mission`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/README.md) for the reasons why we developed PySDKit.
|
|
143
143
|
|
|
144
144
|
| Algorithm | Paper | Code | State |
|
|
145
145
|
|:---------------------------------------------------------------------------------------------------------------------------------------------:| :----------------------------------------------------------: | :----------------------------------------------------------: |:--------:|
|
|
@@ -159,10 +159,11 @@ plot_IMFs_amplitude_spectra(IMFs, smooth="exp") # use exp smooth
|
|
|
159
159
|
| [`FAEMD3D`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_faemd/faemd3d.py) (Three-Dimensional Fast and Adaptive EMD) | [[paper]](https://ieeexplore.ieee.org/document/8447300) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/71270-fast-and-adaptive-multivariate-and-multidimensional-emd) | ✖️ |
|
|
160
160
|
| [`HVD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_hvd/hvd.py) (Hilbert Vibration Decomposition) | [[paper]](https://www.sciencedirect.com/science/article/pii/S0022460X06001556) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/178804-hilbert-vibration-decomposition?s_tid=FX_rc1_behav) | ✔️ |
|
|
161
161
|
| [`ITD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_itd/itd.py) (Intrinsic Time-Scale Decomposition) | [[paper]](https://royalsocietypublishing.org/doi/10.1098/rspa.2006.1761) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/69380-intrinsic-time-scale-decomposition-itd) | ✔️ |
|
|
162
|
-
|
|
|
162
|
+
| [`ALIF`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_alif/alif.py) (Adaptive Local Iterative Filtering) | [[paper]](https://arxiv.org/abs/1411.6051) | [[code]](https://github.com/Cicone/ALIF) | ✔️ |
|
|
163
|
+
| [`APMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_apmd/apmd.py) (Adaptive Polymorphic Mode Decomposition) | [[paper]](https://doi.org/10.1016/j.dsp.2024.104913) | [[code]](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_apmd/apmd.py) | ✔️ |
|
|
163
164
|
| [`LMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_lmd/lmd.py) (Local Mean Decomposition) | [[paper]](https://www.sciencedirect.com/science/article/abs/pii/S1051200418308133?via%3Dihub) | [[code]](https://github.com/shownlin/PyLMD/blob/master/PyLMD/LMD.py) | ✔️ |
|
|
164
165
|
| [`RLMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_lmd/rlmd.py) (Robust Local Mean Decomposition) | [[paper]](https://www.sciencedirect.com/science/article/abs/pii/S0888327017301619) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/66935-robust-local-mean-decomposition-rlmd) | ✔️ |
|
|
165
|
-
| [`FMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_fmd/fmd.py) (Feature Mode Decomposition) | [[paper]](https://ieeexplore.ieee.org/document/9732251) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/108099-feature-mode-decomposition-fmd) |
|
|
166
|
+
| [`FMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_fmd/fmd.py) (Feature Mode Decomposition) | [[paper]](https://ieeexplore.ieee.org/document/9732251) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/108099-feature-mode-decomposition-fmd) | ✔️ |
|
|
166
167
|
| [`NFMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_fmd/nfmd.py) (Non-stationary Feature Mode Decomposition) | [[paper]](https://ieeexplore.ieee.org/document/9732251) | [[code]](https://github.com/sheadan/NFMD-ExtractionInstantaneous/blob/master/nfmd/NFMD.py) | ✖️ |
|
|
167
168
|
| [`SSA`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_ssa/ssa.py) (Singular Spectral Analysis) | [[paper]](https://orca.cardiff.ac.uk/id/eprint/15208/1/Zhiglavsky_SSA_encyclopedia.pdf) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/58967-singular-spectrum-analysis-beginners-guide) | ✔️ |
|
|
168
169
|
| [`EWT`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_ewt/ewt.py) (Empirical Wavelet Transform) | [[paper]](https://ieeexplore.ieee.org/document/6522142) | [[code]](https://www.mathworks.com/help/wavelet/ug/empirical-wavelet-transform.html) | ✔️ |
|
|
@@ -172,6 +173,7 @@ plot_IMFs_amplitude_spectra(IMFs, smooth="exp") # use exp smooth
|
|
|
172
173
|
| [`VMD2D`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_vmd2d/vmd2d.py) (Two-Dimensional Variational Mode Decomposition) | [[paper]](https://ww3.math.ucla.edu/camreport/cam14-16.pdf) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/45918-two-dimensional-variational-mode-decomposition?s_tid=srchtitle) | ✔️ |
|
|
173
174
|
| [`CVMD2D`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_vmd2d/cvmd2d.py) (Two-Dimensional Compact Variational Mode Decomposition) | [[paper]](https://link.springer.com/article/10.1007/s10851-017-0710-z) | [[code]](https://ww2.mathworks.cn/matlabcentral/fileexchange/67285-two-dimensional-compact-variational-mode-decomposition-2d-tv-vmd?s_tid=FX_rc2_behav) | ✔️ |
|
|
174
175
|
| [`VME`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_vmd/vme.py) (Variational Mode Extraction) | [[paper]](https://ieeexplore.ieee.org/document/7997854) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/76003-variational-mode-extraction-vme-m?s_tid=srchtitle) | ✔️ |
|
|
176
|
+
| [`OVMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_vmd/ovmd.py) (Orthogonalized Variational Mode Decomposition) | [[paper]](https://doi.org/10.1016/j.sigpro.2025.110251) | [[code]](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_vmd/ovmd.py) | ✔️ |
|
|
175
177
|
| [`SVMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_vmd/svmd.py) (Successive Variational Mode Decomposition) | [[paper]](https://www.sciencedirect.com/science/article/pii/S0165168420301535) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/98649-successive-variational-mode-decomposition-svmd-m?s_tid=FX_rc3_behav) | ✖️ |
|
|
176
178
|
| [`VNCMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_vncmd/vncmd.py) (Variational Nonlinear Chirp Mode Decomposition) | [[paper]](https://ieeexplore.ieee.org/document/7990179) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/64292-variational-nonlinear-chirp-mode-decomposition) | ✔️ |
|
|
177
179
|
| [`INCMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_vncmd/incmd.py) (Iterative Nonlinear Chirp Mode Decomposition) | [[paper]](https://www.sciencedirect.com/science/article/pii/S0022460X2030403X?via%3Dihub) | [[code]](https://github.com/sheadan/IterativeNCMD) | ✔️ |
|
|
@@ -180,10 +182,10 @@ plot_IMFs_amplitude_spectra(IMFs, smooth="exp") # use exp smooth
|
|
|
180
182
|
| [`ACMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_vmd/acmd.py) (Adaptive Chirp Mode Decomposition) | [[paper]]() | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/121373-data-driven-adaptive-chirp-mode-decomposition?s_tid=srchtitle) | ✔️ |
|
|
181
183
|
| [`BA-ACMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_vmd/ba_acmd.py) (Bandwidth-aware adaptive chirp mode decomposition) | [[paper]](https://journals.sagepub.com/doi/abs/10.1177/14759217231174699) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/132792-bandwidth-aware-adaptive-chirp-mode-decomposition-ba-acmd?s_tid=srchtitle) | ✖️ |
|
|
182
184
|
| [`JMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_jmd/jmd.py) (Jump Plus AM-FM Mode Decomposition) | [[paper]](https://arxiv.org/abs/2407.07800) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/169388-jump-plus-am-fm-mode-decomposition-jmd?s_tid=prof_contriblnk) | ️✔️ |
|
|
183
|
-
| [`MJMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_jmd/mjmd.py) (Multivariate Jump Plus AM-FM Mode Decomposition) | [[paper]](https://arxiv.org/abs/2407.07800) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/169393-multivariate-jump-plus-am-fm-mode-decomposition-mjmd?s_tid=prof_contriblnk) |
|
|
185
|
+
| [`MJMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_jmd/mjmd.py) (Multivariate Jump Plus AM-FM Mode Decomposition) | [[paper]](https://arxiv.org/abs/2407.07800) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/169393-multivariate-jump-plus-am-fm-mode-decomposition-mjmd?s_tid=prof_contriblnk) | ✔️ |
|
|
184
186
|
| [`ESMD`]() (Extreme-Point Symmetric Mode Decomposition) | [[paper]](https://arxiv.org/abs/1303.6540) | [[code]](https://github.com/WuShichao/esmd) | ✖️ |
|
|
185
187
|
| [`STNBMD`]() (Short-Time Narrow-Band Mode Decomposition) | [[paper]](https://www.sciencedirect.com/science/article/pii/S0022460X16002443?via%3Dihub) | [[code]](https://ww2.mathworks.cn/matlabcentral/fileexchange/56226-short-time-narrow-band-mode-decomposition-stnbmd-toolbox) | ✖️ |
|
|
186
|
-
|
|
|
188
|
+
| [`STL`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/tsa/_stl.py) (Seasonal-Trend decomposition using LOESS) | [[paper]](https://www.nniiem.ru/file/news/2016/stl-statistical-model.pdf) | [[code]](https://www.statsmodels.org/stable/examples/notebooks/generated/stl_decomposition.html) | ✔️ |
|
|
187
189
|
| [`MSTL`]() (Multivariate Seasonal-Trend decomposition using LOESS) | [[paper]](https://www.nniiem.ru/file/news/2016/stl-statistical-model.pdf) | [[code]](https://www.statsmodels.org/stable/examples/notebooks/generated/mstl_decomposition.html) | ✖️ |
|
|
188
190
|
|
|
189
191
|
## Acknowledgements 🎖️ <a id="Acknowledgements"></a>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PySDKit
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.29
|
|
4
4
|
Summary: A Python library for signal decomposition algorithms with a unified interface.
|
|
5
5
|
Author: josefinez, Deeksha Manjunath, Yuan Feng, JacktheFowler
|
|
6
6
|
Author-email: Whenxuan Wang <wwhenxuan@gmail.com>, RuiZhe Wang <3133986068@qq.com>, WenTong Zhao <23049200290@stu.xidian.edu.cn>
|
|
@@ -139,7 +139,7 @@ plot_IMFs_amplitude_spectra(IMFs, smooth="exp") # use exp smooth
|
|
|
139
139
|
|
|
140
140
|
## Target 🎯 <a id="Target"></a>
|
|
141
141
|
|
|
142
|
-
`PySDKit` is still under development. We are currently working on reproducing the signal decomposition algorithms in the table below, including not only common decomposition algorithms for `univariate signals` such as EMD and
|
|
142
|
+
`PySDKit` is still under development. We are currently working on reproducing the signal decomposition algorithms in the table below, including not only common decomposition algorithms for `univariate signals` such as EMD, VMD, OVMD, AVNCMD, ALIF and APMD, but also decomposition algorithms for `multivariate signals` such as MEMD and MVMD. We will also further reproduce the decomposition algorithms for `two-dimensional images` to make PySDKit not only suitable for signal processing, but also for image analysis and understanding. See [`Mission`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/README.md) for the reasons why we developed PySDKit.
|
|
143
143
|
|
|
144
144
|
| Algorithm | Paper | Code | State |
|
|
145
145
|
|:---------------------------------------------------------------------------------------------------------------------------------------------:| :----------------------------------------------------------: | :----------------------------------------------------------: |:--------:|
|
|
@@ -159,10 +159,11 @@ plot_IMFs_amplitude_spectra(IMFs, smooth="exp") # use exp smooth
|
|
|
159
159
|
| [`FAEMD3D`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_faemd/faemd3d.py) (Three-Dimensional Fast and Adaptive EMD) | [[paper]](https://ieeexplore.ieee.org/document/8447300) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/71270-fast-and-adaptive-multivariate-and-multidimensional-emd) | ✖️ |
|
|
160
160
|
| [`HVD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_hvd/hvd.py) (Hilbert Vibration Decomposition) | [[paper]](https://www.sciencedirect.com/science/article/pii/S0022460X06001556) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/178804-hilbert-vibration-decomposition?s_tid=FX_rc1_behav) | ✔️ |
|
|
161
161
|
| [`ITD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_itd/itd.py) (Intrinsic Time-Scale Decomposition) | [[paper]](https://royalsocietypublishing.org/doi/10.1098/rspa.2006.1761) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/69380-intrinsic-time-scale-decomposition-itd) | ✔️ |
|
|
162
|
-
|
|
|
162
|
+
| [`ALIF`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_alif/alif.py) (Adaptive Local Iterative Filtering) | [[paper]](https://arxiv.org/abs/1411.6051) | [[code]](https://github.com/Cicone/ALIF) | ✔️ |
|
|
163
|
+
| [`APMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_apmd/apmd.py) (Adaptive Polymorphic Mode Decomposition) | [[paper]](https://doi.org/10.1016/j.dsp.2024.104913) | [[code]](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_apmd/apmd.py) | ✔️ |
|
|
163
164
|
| [`LMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_lmd/lmd.py) (Local Mean Decomposition) | [[paper]](https://www.sciencedirect.com/science/article/abs/pii/S1051200418308133?via%3Dihub) | [[code]](https://github.com/shownlin/PyLMD/blob/master/PyLMD/LMD.py) | ✔️ |
|
|
164
165
|
| [`RLMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_lmd/rlmd.py) (Robust Local Mean Decomposition) | [[paper]](https://www.sciencedirect.com/science/article/abs/pii/S0888327017301619) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/66935-robust-local-mean-decomposition-rlmd) | ✔️ |
|
|
165
|
-
| [`FMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_fmd/fmd.py) (Feature Mode Decomposition) | [[paper]](https://ieeexplore.ieee.org/document/9732251) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/108099-feature-mode-decomposition-fmd) |
|
|
166
|
+
| [`FMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_fmd/fmd.py) (Feature Mode Decomposition) | [[paper]](https://ieeexplore.ieee.org/document/9732251) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/108099-feature-mode-decomposition-fmd) | ✔️ |
|
|
166
167
|
| [`NFMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_fmd/nfmd.py) (Non-stationary Feature Mode Decomposition) | [[paper]](https://ieeexplore.ieee.org/document/9732251) | [[code]](https://github.com/sheadan/NFMD-ExtractionInstantaneous/blob/master/nfmd/NFMD.py) | ✖️ |
|
|
167
168
|
| [`SSA`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_ssa/ssa.py) (Singular Spectral Analysis) | [[paper]](https://orca.cardiff.ac.uk/id/eprint/15208/1/Zhiglavsky_SSA_encyclopedia.pdf) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/58967-singular-spectrum-analysis-beginners-guide) | ✔️ |
|
|
168
169
|
| [`EWT`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_ewt/ewt.py) (Empirical Wavelet Transform) | [[paper]](https://ieeexplore.ieee.org/document/6522142) | [[code]](https://www.mathworks.com/help/wavelet/ug/empirical-wavelet-transform.html) | ✔️ |
|
|
@@ -172,6 +173,7 @@ plot_IMFs_amplitude_spectra(IMFs, smooth="exp") # use exp smooth
|
|
|
172
173
|
| [`VMD2D`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_vmd2d/vmd2d.py) (Two-Dimensional Variational Mode Decomposition) | [[paper]](https://ww3.math.ucla.edu/camreport/cam14-16.pdf) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/45918-two-dimensional-variational-mode-decomposition?s_tid=srchtitle) | ✔️ |
|
|
173
174
|
| [`CVMD2D`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_vmd2d/cvmd2d.py) (Two-Dimensional Compact Variational Mode Decomposition) | [[paper]](https://link.springer.com/article/10.1007/s10851-017-0710-z) | [[code]](https://ww2.mathworks.cn/matlabcentral/fileexchange/67285-two-dimensional-compact-variational-mode-decomposition-2d-tv-vmd?s_tid=FX_rc2_behav) | ✔️ |
|
|
174
175
|
| [`VME`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_vmd/vme.py) (Variational Mode Extraction) | [[paper]](https://ieeexplore.ieee.org/document/7997854) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/76003-variational-mode-extraction-vme-m?s_tid=srchtitle) | ✔️ |
|
|
176
|
+
| [`OVMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_vmd/ovmd.py) (Orthogonalized Variational Mode Decomposition) | [[paper]](https://doi.org/10.1016/j.sigpro.2025.110251) | [[code]](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_vmd/ovmd.py) | ✔️ |
|
|
175
177
|
| [`SVMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_vmd/svmd.py) (Successive Variational Mode Decomposition) | [[paper]](https://www.sciencedirect.com/science/article/pii/S0165168420301535) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/98649-successive-variational-mode-decomposition-svmd-m?s_tid=FX_rc3_behav) | ✖️ |
|
|
176
178
|
| [`VNCMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_vncmd/vncmd.py) (Variational Nonlinear Chirp Mode Decomposition) | [[paper]](https://ieeexplore.ieee.org/document/7990179) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/64292-variational-nonlinear-chirp-mode-decomposition) | ✔️ |
|
|
177
179
|
| [`INCMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_vncmd/incmd.py) (Iterative Nonlinear Chirp Mode Decomposition) | [[paper]](https://www.sciencedirect.com/science/article/pii/S0022460X2030403X?via%3Dihub) | [[code]](https://github.com/sheadan/IterativeNCMD) | ✔️ |
|
|
@@ -180,10 +182,10 @@ plot_IMFs_amplitude_spectra(IMFs, smooth="exp") # use exp smooth
|
|
|
180
182
|
| [`ACMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_vmd/acmd.py) (Adaptive Chirp Mode Decomposition) | [[paper]]() | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/121373-data-driven-adaptive-chirp-mode-decomposition?s_tid=srchtitle) | ✔️ |
|
|
181
183
|
| [`BA-ACMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_vmd/ba_acmd.py) (Bandwidth-aware adaptive chirp mode decomposition) | [[paper]](https://journals.sagepub.com/doi/abs/10.1177/14759217231174699) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/132792-bandwidth-aware-adaptive-chirp-mode-decomposition-ba-acmd?s_tid=srchtitle) | ✖️ |
|
|
182
184
|
| [`JMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_jmd/jmd.py) (Jump Plus AM-FM Mode Decomposition) | [[paper]](https://arxiv.org/abs/2407.07800) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/169388-jump-plus-am-fm-mode-decomposition-jmd?s_tid=prof_contriblnk) | ️✔️ |
|
|
183
|
-
| [`MJMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_jmd/mjmd.py) (Multivariate Jump Plus AM-FM Mode Decomposition) | [[paper]](https://arxiv.org/abs/2407.07800) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/169393-multivariate-jump-plus-am-fm-mode-decomposition-mjmd?s_tid=prof_contriblnk) |
|
|
185
|
+
| [`MJMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_jmd/mjmd.py) (Multivariate Jump Plus AM-FM Mode Decomposition) | [[paper]](https://arxiv.org/abs/2407.07800) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/169393-multivariate-jump-plus-am-fm-mode-decomposition-mjmd?s_tid=prof_contriblnk) | ✔️ |
|
|
184
186
|
| [`ESMD`]() (Extreme-Point Symmetric Mode Decomposition) | [[paper]](https://arxiv.org/abs/1303.6540) | [[code]](https://github.com/WuShichao/esmd) | ✖️ |
|
|
185
187
|
| [`STNBMD`]() (Short-Time Narrow-Band Mode Decomposition) | [[paper]](https://www.sciencedirect.com/science/article/pii/S0022460X16002443?via%3Dihub) | [[code]](https://ww2.mathworks.cn/matlabcentral/fileexchange/56226-short-time-narrow-band-mode-decomposition-stnbmd-toolbox) | ✖️ |
|
|
186
|
-
|
|
|
188
|
+
| [`STL`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/tsa/_stl.py) (Seasonal-Trend decomposition using LOESS) | [[paper]](https://www.nniiem.ru/file/news/2016/stl-statistical-model.pdf) | [[code]](https://www.statsmodels.org/stable/examples/notebooks/generated/stl_decomposition.html) | ✔️ |
|
|
187
189
|
| [`MSTL`]() (Multivariate Seasonal-Trend decomposition using LOESS) | [[paper]](https://www.nniiem.ru/file/news/2016/stl-statistical-model.pdf) | [[code]](https://www.statsmodels.org/stable/examples/notebooks/generated/mstl_decomposition.html) | ✖️ |
|
|
188
190
|
|
|
189
191
|
## Acknowledgements 🎖️ <a id="Acknowledgements"></a>
|
|
@@ -8,11 +8,12 @@ PySDKit.egg-info/requires.txt
|
|
|
8
8
|
PySDKit.egg-info/top_level.txt
|
|
9
9
|
pysdkit/__init__.py
|
|
10
10
|
pysdkit/_alif/__init__.py
|
|
11
|
-
pysdkit/_alif/_helpers.py
|
|
12
11
|
pysdkit/_alif/alif.py
|
|
13
12
|
pysdkit/_alif/iterative_filtering.py
|
|
14
13
|
pysdkit/_alif/data/__init__.py
|
|
15
14
|
pysdkit/_alif/data/prefixed_double_filter.npy
|
|
15
|
+
pysdkit/_apmd/__init__.py
|
|
16
|
+
pysdkit/_apmd/apmd.py
|
|
16
17
|
pysdkit/_emd/__init__.py
|
|
17
18
|
pysdkit/_emd/_find_extrema.py
|
|
18
19
|
pysdkit/_emd/_prepare_points.py
|
|
@@ -47,7 +48,6 @@ pysdkit/_fmd/fmd.py
|
|
|
47
48
|
pysdkit/_fmd/nfmd.py
|
|
48
49
|
pysdkit/_hvd/__init__.py
|
|
49
50
|
pysdkit/_hvd/hvd.py
|
|
50
|
-
pysdkit/_ifd/__init__.py
|
|
51
51
|
pysdkit/_itd/__init__.py
|
|
52
52
|
pysdkit/_itd/itd.py
|
|
53
53
|
pysdkit/_jmd/__init__.py
|
|
@@ -65,6 +65,7 @@ pysdkit/_vmd/avmd.py
|
|
|
65
65
|
pysdkit/_vmd/ba_acmd.py
|
|
66
66
|
pysdkit/_vmd/base.py
|
|
67
67
|
pysdkit/_vmd/mvmd.py
|
|
68
|
+
pysdkit/_vmd/ovmd.py
|
|
68
69
|
pysdkit/_vmd/svmd.py
|
|
69
70
|
pysdkit/_vmd/vmd_c.py
|
|
70
71
|
pysdkit/_vmd/vmd_f.py
|
|
@@ -104,6 +105,7 @@ pysdkit/plot/_plot_signal.py
|
|
|
104
105
|
pysdkit/tests/__init__.py
|
|
105
106
|
pysdkit/tests/run_all.py
|
|
106
107
|
pysdkit/tests/test_alif.py
|
|
108
|
+
pysdkit/tests/test_apmd.py
|
|
107
109
|
pysdkit/tests/test_avncmd.py
|
|
108
110
|
pysdkit/tests/test_ceemdan.py
|
|
109
111
|
pysdkit/tests/test_emd.py
|
|
@@ -112,8 +114,10 @@ pysdkit/tests/test_faemd.py
|
|
|
112
114
|
pysdkit/tests/test_faemd2d.py
|
|
113
115
|
pysdkit/tests/test_faemd3d.py
|
|
114
116
|
pysdkit/tests/test_itd.py
|
|
117
|
+
pysdkit/tests/test_jmd.py
|
|
115
118
|
pysdkit/tests/test_lmd.py
|
|
116
119
|
pysdkit/tests/test_moving_decomp.py
|
|
120
|
+
pysdkit/tests/test_ovmd.py
|
|
117
121
|
pysdkit/tests/test_rlmd.py
|
|
118
122
|
pysdkit/tests/test_stl.py
|
|
119
123
|
pysdkit/tests/test_vmd.py
|
|
@@ -85,7 +85,7 @@ plot_IMFs_amplitude_spectra(IMFs, smooth="exp") # use exp smooth
|
|
|
85
85
|
|
|
86
86
|
## Target 🎯 <a id="Target"></a>
|
|
87
87
|
|
|
88
|
-
`PySDKit` is still under development. We are currently working on reproducing the signal decomposition algorithms in the table below, including not only common decomposition algorithms for `univariate signals` such as EMD and
|
|
88
|
+
`PySDKit` is still under development. We are currently working on reproducing the signal decomposition algorithms in the table below, including not only common decomposition algorithms for `univariate signals` such as EMD, VMD, OVMD, AVNCMD, ALIF and APMD, but also decomposition algorithms for `multivariate signals` such as MEMD and MVMD. We will also further reproduce the decomposition algorithms for `two-dimensional images` to make PySDKit not only suitable for signal processing, but also for image analysis and understanding. See [`Mission`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/README.md) for the reasons why we developed PySDKit.
|
|
89
89
|
|
|
90
90
|
| Algorithm | Paper | Code | State |
|
|
91
91
|
|:---------------------------------------------------------------------------------------------------------------------------------------------:| :----------------------------------------------------------: | :----------------------------------------------------------: |:--------:|
|
|
@@ -105,10 +105,11 @@ plot_IMFs_amplitude_spectra(IMFs, smooth="exp") # use exp smooth
|
|
|
105
105
|
| [`FAEMD3D`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_faemd/faemd3d.py) (Three-Dimensional Fast and Adaptive EMD) | [[paper]](https://ieeexplore.ieee.org/document/8447300) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/71270-fast-and-adaptive-multivariate-and-multidimensional-emd) | ✖️ |
|
|
106
106
|
| [`HVD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_hvd/hvd.py) (Hilbert Vibration Decomposition) | [[paper]](https://www.sciencedirect.com/science/article/pii/S0022460X06001556) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/178804-hilbert-vibration-decomposition?s_tid=FX_rc1_behav) | ✔️ |
|
|
107
107
|
| [`ITD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_itd/itd.py) (Intrinsic Time-Scale Decomposition) | [[paper]](https://royalsocietypublishing.org/doi/10.1098/rspa.2006.1761) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/69380-intrinsic-time-scale-decomposition-itd) | ✔️ |
|
|
108
|
-
|
|
|
108
|
+
| [`ALIF`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_alif/alif.py) (Adaptive Local Iterative Filtering) | [[paper]](https://arxiv.org/abs/1411.6051) | [[code]](https://github.com/Cicone/ALIF) | ✔️ |
|
|
109
|
+
| [`APMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_apmd/apmd.py) (Adaptive Polymorphic Mode Decomposition) | [[paper]](https://doi.org/10.1016/j.dsp.2024.104913) | [[code]](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_apmd/apmd.py) | ✔️ |
|
|
109
110
|
| [`LMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_lmd/lmd.py) (Local Mean Decomposition) | [[paper]](https://www.sciencedirect.com/science/article/abs/pii/S1051200418308133?via%3Dihub) | [[code]](https://github.com/shownlin/PyLMD/blob/master/PyLMD/LMD.py) | ✔️ |
|
|
110
111
|
| [`RLMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_lmd/rlmd.py) (Robust Local Mean Decomposition) | [[paper]](https://www.sciencedirect.com/science/article/abs/pii/S0888327017301619) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/66935-robust-local-mean-decomposition-rlmd) | ✔️ |
|
|
111
|
-
| [`FMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_fmd/fmd.py) (Feature Mode Decomposition) | [[paper]](https://ieeexplore.ieee.org/document/9732251) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/108099-feature-mode-decomposition-fmd) |
|
|
112
|
+
| [`FMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_fmd/fmd.py) (Feature Mode Decomposition) | [[paper]](https://ieeexplore.ieee.org/document/9732251) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/108099-feature-mode-decomposition-fmd) | ✔️ |
|
|
112
113
|
| [`NFMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_fmd/nfmd.py) (Non-stationary Feature Mode Decomposition) | [[paper]](https://ieeexplore.ieee.org/document/9732251) | [[code]](https://github.com/sheadan/NFMD-ExtractionInstantaneous/blob/master/nfmd/NFMD.py) | ✖️ |
|
|
113
114
|
| [`SSA`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_ssa/ssa.py) (Singular Spectral Analysis) | [[paper]](https://orca.cardiff.ac.uk/id/eprint/15208/1/Zhiglavsky_SSA_encyclopedia.pdf) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/58967-singular-spectrum-analysis-beginners-guide) | ✔️ |
|
|
114
115
|
| [`EWT`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_ewt/ewt.py) (Empirical Wavelet Transform) | [[paper]](https://ieeexplore.ieee.org/document/6522142) | [[code]](https://www.mathworks.com/help/wavelet/ug/empirical-wavelet-transform.html) | ✔️ |
|
|
@@ -118,6 +119,7 @@ plot_IMFs_amplitude_spectra(IMFs, smooth="exp") # use exp smooth
|
|
|
118
119
|
| [`VMD2D`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_vmd2d/vmd2d.py) (Two-Dimensional Variational Mode Decomposition) | [[paper]](https://ww3.math.ucla.edu/camreport/cam14-16.pdf) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/45918-two-dimensional-variational-mode-decomposition?s_tid=srchtitle) | ✔️ |
|
|
119
120
|
| [`CVMD2D`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_vmd2d/cvmd2d.py) (Two-Dimensional Compact Variational Mode Decomposition) | [[paper]](https://link.springer.com/article/10.1007/s10851-017-0710-z) | [[code]](https://ww2.mathworks.cn/matlabcentral/fileexchange/67285-two-dimensional-compact-variational-mode-decomposition-2d-tv-vmd?s_tid=FX_rc2_behav) | ✔️ |
|
|
120
121
|
| [`VME`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_vmd/vme.py) (Variational Mode Extraction) | [[paper]](https://ieeexplore.ieee.org/document/7997854) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/76003-variational-mode-extraction-vme-m?s_tid=srchtitle) | ✔️ |
|
|
122
|
+
| [`OVMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_vmd/ovmd.py) (Orthogonalized Variational Mode Decomposition) | [[paper]](https://doi.org/10.1016/j.sigpro.2025.110251) | [[code]](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_vmd/ovmd.py) | ✔️ |
|
|
121
123
|
| [`SVMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_vmd/svmd.py) (Successive Variational Mode Decomposition) | [[paper]](https://www.sciencedirect.com/science/article/pii/S0165168420301535) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/98649-successive-variational-mode-decomposition-svmd-m?s_tid=FX_rc3_behav) | ✖️ |
|
|
122
124
|
| [`VNCMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_vncmd/vncmd.py) (Variational Nonlinear Chirp Mode Decomposition) | [[paper]](https://ieeexplore.ieee.org/document/7990179) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/64292-variational-nonlinear-chirp-mode-decomposition) | ✔️ |
|
|
123
125
|
| [`INCMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_vncmd/incmd.py) (Iterative Nonlinear Chirp Mode Decomposition) | [[paper]](https://www.sciencedirect.com/science/article/pii/S0022460X2030403X?via%3Dihub) | [[code]](https://github.com/sheadan/IterativeNCMD) | ✔️ |
|
|
@@ -126,10 +128,10 @@ plot_IMFs_amplitude_spectra(IMFs, smooth="exp") # use exp smooth
|
|
|
126
128
|
| [`ACMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_vmd/acmd.py) (Adaptive Chirp Mode Decomposition) | [[paper]]() | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/121373-data-driven-adaptive-chirp-mode-decomposition?s_tid=srchtitle) | ✔️ |
|
|
127
129
|
| [`BA-ACMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_vmd/ba_acmd.py) (Bandwidth-aware adaptive chirp mode decomposition) | [[paper]](https://journals.sagepub.com/doi/abs/10.1177/14759217231174699) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/132792-bandwidth-aware-adaptive-chirp-mode-decomposition-ba-acmd?s_tid=srchtitle) | ✖️ |
|
|
128
130
|
| [`JMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_jmd/jmd.py) (Jump Plus AM-FM Mode Decomposition) | [[paper]](https://arxiv.org/abs/2407.07800) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/169388-jump-plus-am-fm-mode-decomposition-jmd?s_tid=prof_contriblnk) | ️✔️ |
|
|
129
|
-
| [`MJMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_jmd/mjmd.py) (Multivariate Jump Plus AM-FM Mode Decomposition) | [[paper]](https://arxiv.org/abs/2407.07800) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/169393-multivariate-jump-plus-am-fm-mode-decomposition-mjmd?s_tid=prof_contriblnk) |
|
|
131
|
+
| [`MJMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_jmd/mjmd.py) (Multivariate Jump Plus AM-FM Mode Decomposition) | [[paper]](https://arxiv.org/abs/2407.07800) | [[code]](https://www.mathworks.com/matlabcentral/fileexchange/169393-multivariate-jump-plus-am-fm-mode-decomposition-mjmd?s_tid=prof_contriblnk) | ✔️ |
|
|
130
132
|
| [`ESMD`]() (Extreme-Point Symmetric Mode Decomposition) | [[paper]](https://arxiv.org/abs/1303.6540) | [[code]](https://github.com/WuShichao/esmd) | ✖️ |
|
|
131
133
|
| [`STNBMD`]() (Short-Time Narrow-Band Mode Decomposition) | [[paper]](https://www.sciencedirect.com/science/article/pii/S0022460X16002443?via%3Dihub) | [[code]](https://ww2.mathworks.cn/matlabcentral/fileexchange/56226-short-time-narrow-band-mode-decomposition-stnbmd-toolbox) | ✖️ |
|
|
132
|
-
|
|
|
134
|
+
| [`STL`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/tsa/_stl.py) (Seasonal-Trend decomposition using LOESS) | [[paper]](https://www.nniiem.ru/file/news/2016/stl-statistical-model.pdf) | [[code]](https://www.statsmodels.org/stable/examples/notebooks/generated/stl_decomposition.html) | ✔️ |
|
|
133
135
|
| [`MSTL`]() (Multivariate Seasonal-Trend decomposition using LOESS) | [[paper]](https://www.nniiem.ru/file/news/2016/stl-statistical-model.pdf) | [[code]](https://www.statsmodels.org/stable/examples/notebooks/generated/mstl_decomposition.html) | ✖️ |
|
|
134
136
|
|
|
135
137
|
## Acknowledgements 🎖️ <a id="Acknowledgements"></a>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
A Python library for signal decomposition algorithms.
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
-
__version__ = "0.4.
|
|
5
|
+
__version__ = "0.4.29"
|
|
6
6
|
|
|
7
7
|
# Empirical Mode Decomposition
|
|
8
8
|
from ._emd import EMD
|
|
@@ -58,6 +58,9 @@ from ._vmd import MVMD
|
|
|
58
58
|
# Variational Mode Extraction, to extract a specific mode from the signal
|
|
59
59
|
from ._vmd import VME
|
|
60
60
|
|
|
61
|
+
# Orthogonalized Variational Mode Decomposition
|
|
62
|
+
from ._vmd import OVMD
|
|
63
|
+
|
|
61
64
|
# Variational Mode Decomposition for 2D Image
|
|
62
65
|
from ._vmd2d import VMD2D
|
|
63
66
|
|
|
@@ -76,12 +79,18 @@ from ._vncmd import AVNCMD
|
|
|
76
79
|
# Adaptive Local Iterative Filtering
|
|
77
80
|
from ._alif import ALIF
|
|
78
81
|
|
|
82
|
+
# Adaptive Polymorphic Mode Decomposition
|
|
83
|
+
from ._apmd import APMD
|
|
84
|
+
|
|
79
85
|
# Empirical Wavelet Transform
|
|
80
86
|
from ._ewt import ewt, EWT
|
|
81
87
|
|
|
82
88
|
# Jump Plus AM-FM Mode Decomposition
|
|
83
89
|
from ._jmd import JMD
|
|
84
90
|
|
|
91
|
+
# Multivariate Jump Plus AM-FM Mode Decomposition
|
|
92
|
+
from ._jmd import MJMD
|
|
93
|
+
|
|
85
94
|
# Feature Mode Decomposition
|
|
86
95
|
from ._fmd import FMD
|
|
87
96
|
|
|
@@ -135,14 +144,17 @@ Singular Spectral Analysis | SSA
|
|
|
135
144
|
Variational Mode Decomposition | VMD
|
|
136
145
|
Multivariate Variational Mode Decomposition | MVMD
|
|
137
146
|
Variational Mode Extraction | VME
|
|
147
|
+
Orthogonalized Variational Mode Decomposition | OVMD
|
|
138
148
|
Variational Mode Decomposition for 2D Image | VMD2D
|
|
139
149
|
Compact VMD for 2D Image | CVMD2D
|
|
140
150
|
Variational Nonlinear Chirp Mode Decomposition | VNCMD
|
|
141
151
|
Iterative Nonlinear Chirp Mode Decomposition | INCMD
|
|
142
152
|
Adaptive Variational Nonlinear Chirp Mode Dec. | AVNCMD
|
|
143
153
|
Adaptive Local Iterative Filtering | ALIF
|
|
154
|
+
Adaptive Polymorphic Mode Decomposition | APMD
|
|
144
155
|
Empirical Wavelet Transform | EWT
|
|
145
156
|
Jump Plus AM-FM Mode Decomposition | JMD
|
|
157
|
+
Multivariate Jump Plus AM-FM Mode Decomposition | MJMD
|
|
146
158
|
Feature Mode Decomposition | FMD
|
|
147
159
|
Moving Average Decomposition | Moving
|
|
148
160
|
Seasonal-Trend decomposition using LOESS | STL
|
|
@@ -172,15 +184,18 @@ __all__ = [
|
|
|
172
184
|
"ACMD",
|
|
173
185
|
"MVMD",
|
|
174
186
|
"VME",
|
|
187
|
+
"OVMD",
|
|
175
188
|
"VMD2D",
|
|
176
189
|
"CVMD2D",
|
|
177
190
|
"VNCMD",
|
|
178
191
|
"INCMD",
|
|
179
192
|
"AVNCMD",
|
|
180
193
|
"ALIF",
|
|
194
|
+
"APMD",
|
|
181
195
|
"ewt",
|
|
182
196
|
"EWT",
|
|
183
197
|
"JMD",
|
|
198
|
+
"MJMD",
|
|
184
199
|
"FMD",
|
|
185
200
|
"Moving_Decomp",
|
|
186
201
|
"STL",
|
|
@@ -14,12 +14,12 @@ from typing import Optional
|
|
|
14
14
|
import numpy as np
|
|
15
15
|
from scipy.interpolate import interp1d
|
|
16
16
|
|
|
17
|
-
from pysdkit._alif.
|
|
17
|
+
from pysdkit._alif.iterative_filtering import (
|
|
18
|
+
IterativeFiltering,
|
|
18
19
|
adaptive_average,
|
|
19
20
|
load_prefixed_filter,
|
|
20
21
|
maxmins,
|
|
21
22
|
)
|
|
22
|
-
from pysdkit._alif.iterative_filtering import IterativeFiltering
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
class ALIF(object):
|
pysdkit-0.4.27/pysdkit/_alif/_helpers.py → pysdkit-0.4.29/pysdkit/_alif/iterative_filtering.py
RENAMED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
"""
|
|
3
|
-
|
|
3
|
+
Iterative Filtering (IF) — subroutine used by Adaptive Local Iterative Filtering.
|
|
4
4
|
|
|
5
|
-
MATLAB reference: https://github.com/Cicone/ALIF
|
|
5
|
+
MATLAB reference: IF_v8_3.m from https://github.com/Cicone/ALIF
|
|
6
6
|
"""
|
|
7
7
|
from __future__ import annotations
|
|
8
8
|
|
|
9
9
|
import os
|
|
10
|
-
|
|
10
|
+
import time
|
|
11
|
+
from typing import Optional, Tuple, Union
|
|
11
12
|
|
|
12
13
|
import numpy as np
|
|
13
14
|
|
|
@@ -246,3 +247,159 @@ def adaptive_average(
|
|
|
246
247
|
continue
|
|
247
248
|
ave[i] = float(np.dot(wn, h[idxs]))
|
|
248
249
|
return ave
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
class IterativeFiltering(object):
|
|
253
|
+
"""
|
|
254
|
+
Iterative Filtering for periodic signals.
|
|
255
|
+
|
|
256
|
+
Cicone, A., Liu, J., Zhou, H. Adaptive Local Iterative Filtering for Signal
|
|
257
|
+
Decomposition and Instantaneous Frequency analysis. ACHA, 2016.
|
|
258
|
+
"""
|
|
259
|
+
|
|
260
|
+
def __init__(
|
|
261
|
+
self,
|
|
262
|
+
delta: float = 0.001,
|
|
263
|
+
ext_points: int = 3,
|
|
264
|
+
max_imfs: int = 200,
|
|
265
|
+
xi: float = 1.6,
|
|
266
|
+
alpha: Union[str, float] = "Almost_min",
|
|
267
|
+
max_inner: int = 200,
|
|
268
|
+
max_time: float = np.inf,
|
|
269
|
+
verbose: int = 0,
|
|
270
|
+
) -> None:
|
|
271
|
+
self.delta = delta
|
|
272
|
+
self.ext_points = ext_points
|
|
273
|
+
self.max_imfs = max_imfs
|
|
274
|
+
self.xi = xi
|
|
275
|
+
self.alpha = alpha
|
|
276
|
+
self.max_inner = max_inner
|
|
277
|
+
self.max_time = max_time
|
|
278
|
+
self.verbose = verbose
|
|
279
|
+
self.log_m: Optional[np.ndarray] = None
|
|
280
|
+
|
|
281
|
+
def __call__(self, signal: np.ndarray) -> np.ndarray:
|
|
282
|
+
return self.fit_transform(signal)
|
|
283
|
+
|
|
284
|
+
def __str__(self) -> str:
|
|
285
|
+
return "Iterative Filtering (IF)"
|
|
286
|
+
|
|
287
|
+
def _mask_length(
|
|
288
|
+
self,
|
|
289
|
+
n_pp: int,
|
|
290
|
+
k_pp: int,
|
|
291
|
+
diff_maxmins: np.ndarray,
|
|
292
|
+
count_imfs: int,
|
|
293
|
+
log_m: np.ndarray,
|
|
294
|
+
m_override: Optional[float],
|
|
295
|
+
) -> float:
|
|
296
|
+
if m_override is not None:
|
|
297
|
+
return float(m_override)
|
|
298
|
+
|
|
299
|
+
avg = 2 * round(n_pp / max(k_pp, 1) * self.xi)
|
|
300
|
+
if isinstance(self.alpha, str):
|
|
301
|
+
if self.alpha == "ave":
|
|
302
|
+
m = avg
|
|
303
|
+
elif self.alpha == "Almost_min":
|
|
304
|
+
p30 = 2 * round(self.xi * float(np.percentile(diff_maxmins, 30)))
|
|
305
|
+
m = p30 if p30 < avg else avg
|
|
306
|
+
if count_imfs > 1 and m <= log_m[count_imfs - 2]:
|
|
307
|
+
m = float(np.ceil(log_m[count_imfs - 2] * 1.1))
|
|
308
|
+
else:
|
|
309
|
+
raise ValueError("Unrecognized IF.alpha value: {}".format(self.alpha))
|
|
310
|
+
else:
|
|
311
|
+
alpha = float(self.alpha)
|
|
312
|
+
m = 2 * round(
|
|
313
|
+
self.xi
|
|
314
|
+
* (
|
|
315
|
+
float(np.max(diff_maxmins)) * alpha
|
|
316
|
+
+ float(np.min(diff_maxmins)) * (1.0 - alpha)
|
|
317
|
+
)
|
|
318
|
+
)
|
|
319
|
+
return float(m)
|
|
320
|
+
|
|
321
|
+
def fit_transform(
|
|
322
|
+
self,
|
|
323
|
+
signal: np.ndarray,
|
|
324
|
+
mask_lengths: Optional[np.ndarray] = None,
|
|
325
|
+
) -> np.ndarray:
|
|
326
|
+
"""
|
|
327
|
+
Decompose a periodic signal into IMFs + trend.
|
|
328
|
+
|
|
329
|
+
:return: array of shape ``(n_imfs + 1, N)``; last row is the trend.
|
|
330
|
+
"""
|
|
331
|
+
f = np.asarray(signal, dtype=np.float64).ravel().copy()
|
|
332
|
+
n = f.size
|
|
333
|
+
mm = load_prefixed_filter()
|
|
334
|
+
|
|
335
|
+
f_pp = f[np.abs(f) > 1e-18]
|
|
336
|
+
maxmins_pp = maxmins(f_pp, extension_type="p")
|
|
337
|
+
if maxmins_pp.size < 2:
|
|
338
|
+
return f.reshape(1, -1)
|
|
339
|
+
diff_maxmins_pp = np.diff(maxmins_pp)
|
|
340
|
+
# Periodic wrap for spacing (MATLAB uses plain diff on extrema of zero-stripped signal)
|
|
341
|
+
n_pp = f_pp.size
|
|
342
|
+
k_pp = maxmins_pp.size
|
|
343
|
+
|
|
344
|
+
imfs = []
|
|
345
|
+
log_m = np.zeros(self.max_imfs, dtype=np.float64)
|
|
346
|
+
count = 0
|
|
347
|
+
t0 = time.perf_counter()
|
|
348
|
+
|
|
349
|
+
while (
|
|
350
|
+
count < self.max_imfs
|
|
351
|
+
and k_pp >= self.ext_points
|
|
352
|
+
and (time.perf_counter() - t0) < self.max_time
|
|
353
|
+
):
|
|
354
|
+
count += 1
|
|
355
|
+
h = f.copy()
|
|
356
|
+
m_override = None
|
|
357
|
+
if mask_lengths is not None and len(mask_lengths) >= count:
|
|
358
|
+
m_override = float(mask_lengths[count - 1])
|
|
359
|
+
|
|
360
|
+
m = self._mask_length(n_pp, k_pp, diff_maxmins_pp, count, log_m, m_override)
|
|
361
|
+
log_m[count - 1] = m
|
|
362
|
+
a = get_mask_v1(mm, m)
|
|
363
|
+
|
|
364
|
+
# Tile signal if shorter than the mask
|
|
365
|
+
n_work = n
|
|
366
|
+
n_old = n
|
|
367
|
+
tiled = False
|
|
368
|
+
if n < a.size:
|
|
369
|
+
tiled = True
|
|
370
|
+
nxs = int(np.ceil(a.size / float(n)))
|
|
371
|
+
if nxs % 2 == 0:
|
|
372
|
+
nxs += 1
|
|
373
|
+
h = np.tile(h, nxs)
|
|
374
|
+
n_work = nxs * n_old
|
|
375
|
+
|
|
376
|
+
ifft_a = build_ifft_kernel(a, n_work)
|
|
377
|
+
|
|
378
|
+
sd = 1.0
|
|
379
|
+
in_step = 0
|
|
380
|
+
while sd > self.delta and in_step < self.max_inner:
|
|
381
|
+
in_step += 1
|
|
382
|
+
h_ave = np.real(np.fft.ifft(ifft_a * np.fft.fft(h)))
|
|
383
|
+
denom = np.linalg.norm(h) ** 2
|
|
384
|
+
sd = (np.linalg.norm(h_ave) ** 2 / denom) if denom > 0 else 0.0
|
|
385
|
+
h = h - h_ave
|
|
386
|
+
|
|
387
|
+
if tiled:
|
|
388
|
+
start = int(n_old * (nxs - 1) / 2)
|
|
389
|
+
h = h[start : start + n_old]
|
|
390
|
+
|
|
391
|
+
imfs.append(h)
|
|
392
|
+
f = f - h
|
|
393
|
+
|
|
394
|
+
f_pp = f[np.abs(f) > 1e-18]
|
|
395
|
+
maxmins_pp = maxmins(f_pp, extension_type="p")
|
|
396
|
+
if maxmins_pp.size < 2:
|
|
397
|
+
break
|
|
398
|
+
diff_maxmins_pp = np.diff(maxmins_pp)
|
|
399
|
+
n_pp = f_pp.size
|
|
400
|
+
k_pp = maxmins_pp.size
|
|
401
|
+
|
|
402
|
+
self.log_m = log_m[:count]
|
|
403
|
+
if not imfs:
|
|
404
|
+
return f.reshape(1, -1)
|
|
405
|
+
return np.vstack([np.asarray(imfs), f])
|