Skip to content

Commit 70f8932

Browse files
committed
whenxuan: black init
1 parent ebb45e7 commit 70f8932

42 files changed

Lines changed: 49 additions & 452 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ plot_IMFs_amplitude_spectra(IMFs, smooth="exp") # use exp smooth
106106
| [`HVD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_tid/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) | ✔️ |
107107
| [`ITD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_tid/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) | ✔️ |
108108
| [`ALIF`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_tid/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+
| [`APMD`](https://github.com/wwhenxuan/PySDKit/blob/main/pysdkit/_imd/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/_imd/apmd.py) | ✔️ |
110110
| [`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) | ✔️ |
111111
| [`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) | ✔️ |
112112
| [`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) | ✔️ |

‎examples/data_generator.ipynb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"\n",
6464
"# Create a simple test case and visualize it\n",
6565
"time, signal = test_emd()\n",
66-
"fig = plot_signal(time, signal)\n"
66+
"fig = plot_signal(time, signal)"
6767
]
6868
},
6969
{

‎examples/demo.ipynb‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"import numpy as np\n",
2727
"from pysdkit import EMD\n",
2828
"from pysdkit.data import test_emd\n",
29-
"from pysdkit.plot import plot_IMFs, plot_signal\n"
29+
"from pysdkit.plot import plot_IMFs, plot_signal"
3030
],
3131
"outputs": [],
3232
"execution_count": 1
@@ -137,6 +137,7 @@
137137
"# load new signal\n",
138138
"from pathlib import Path\n",
139139
"\n",
140+
"\n",
140141
"def _find_data_file(name: str) -> Path:\n",
141142
" cwd = Path.cwd().resolve()\n",
142143
" for base in [cwd, *cwd.parents]:\n",
@@ -145,14 +146,15 @@
145146
" return cand\n",
146147
" raise FileNotFoundError(name)\n",
147148
"\n",
149+
"\n",
148150
"signal = np.load(_find_data_file(\"example.npy\"))\n",
149151
"\n",
150152
"# use variational mode decomposition\n",
151153
"vmd = VMD(alpha=500, K=3, tau=0.0, tol=1e-9)\n",
152154
"IMFs = vmd.fit_transform(signal=signal)\n",
153155
"print(IMFs.shape)\n",
154156
"\n",
155-
"vmd.plot_IMFs(save_figure=True, dpi=600)\n"
157+
"vmd.plot_IMFs(save_figure=True, dpi=600)"
156158
],
157159
"outputs": [
158160
{

‎examples/emd/emd.ipynb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@
175175
" \"L\": L,\n",
176176
" \"m\": m,\n",
177177
" \"h_new\": h_new,\n",
178-
" }\n"
178+
" }"
179179
]
180180
},
181181
{

‎examples/emd/emd_denoising.ipynb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@
235235
" \"n_noise_imfs\": n_noise_imfs,\n",
236236
" \"sigma1\": sigma1,\n",
237237
" \"recon\": recon,\n",
238-
" }\n"
238+
" }"
239239
]
240240
},
241241
{

‎examples/emd/emd_forecasting.ipynb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@
206206
" component_forecasts=comp_forecasts,\n",
207207
" imfs=imfs_arr,\n",
208208
" residue=residue,\n",
209-
" )\n"
209+
" )"
210210
]
211211
},
212212
{

‎examples/emd/hht.ipynb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@
154154
"axs[1, 1].set_ylabel(\"Imag\")\n",
155155
"axs[1, 1].set_title(\"Complex plane\")\n",
156156
"plt.tight_layout()\n",
157-
"plt.show()\n"
157+
"plt.show()"
158158
]
159159
},
160160
{

‎examples/emd_variants/ceemdan.ipynb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"from pysdkit.data import test_emd\n",
7373
"from pysdkit.plot import plot_IMFs, plot_IMFs_amplitude_spectra\n",
7474
"\n",
75-
"print(CEEMDAN())\n"
75+
"print(CEEMDAN())"
7676
]
7777
},
7878
{

‎examples/emd_variants/eemd.ipynb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"from pysdkit.data import test_emd\n",
7676
"from pysdkit.plot import plot_IMFs, plot_IMFs_amplitude_spectra\n",
7777
"\n",
78-
"print(EEMD())\n"
78+
"print(EEMD())"
7979
]
8080
},
8181
{

‎examples/emd_variants/esmd.ipynb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"from pysdkit import ESMD, esmd\n",
6060
"from pysdkit._emd.esmd import make_esmd_example3\n",
6161
"\n",
62-
"plt.rcParams.update({\"figure.dpi\": 120, \"axes.grid\": True, \"grid.alpha\": 0.3})\n"
62+
"plt.rcParams.update({\"figure.dpi\": 120, \"axes.grid\": True, \"grid.alpha\": 0.3})"
6363
]
6464
},
6565
{

0 commit comments

Comments
 (0)