Closed nescirem closed 5 years ago
Thank you for contributing.
Could you please update this pull request to a single commit (squeeze them) instead of 4?
Also, the only change that is required is in CEEMDAN.py on line 172. Please don't update .gitignore
at this time.
It's also a good practise to update test cases so that they reflect what you are trying to fix. Any chance you could also add a test case for what you're fixing? It should be with other CEEMDAN test, i.e. in https://github.com/laszukdawid/PyEMD/blob/master/PyEMD/tests/test_ceemdan.py .
Improved PR in #46
My python version is
3.6.4
. I have tested EMD, EEMD and CEEMDAN to decomposite a piece of music, and I found the plottedOriginal signal
is wrong if I use CEEMDAN as you can see in Fig.3, compared with Figs.1-2. The same issue is opened in #42 . In #42 and #44 one can find he will receive a wrong result if he usesres = S-np.sum(C_IMFs, axis=0)
to calculate the residual due to the wrongOriginal signal
. Fig.1 EMD Fig.2 EEMD Fig.3 CEEMDANI debugged it and found out why the
Original signal
is changed: the functionceemdan
changed it. It may need to be scaled inside the function but it shouldn't affect the outside one. That is why mycopy
action worked. But it dosesn't slove the problem because I just changed the usage of it.I don't think input signal should changed outside the function
ceemdan
and fixed it in a better way instead of just change the usage of it. For the reason why it works, one can refer to https://stackoverflow.com/questions/22054698/python-modifying-list-inside-a-function The result of CEEMDAN after I fixed it: Fig.4 Fixed CEEMDANAttention: One may need to run
python setup.py install
again to update the function.The code when I use CEEMDAN to dcoposite the music (from:http://www.music.helsinki.fi/tmt/opetus/uusmedia/esim/index-e.html):