laszukdawid / PyEMD

Python implementation of Empirical Mode Decompoisition (EMD) method
https://pyemd.readthedocs.io/
Apache License 2.0
867 stars 224 forks source link

How should I look at res or rn ? #28

Closed mk123qwe closed 5 years ago

mk123qwe commented 5 years ago

How should I look at res or rn ? your examples do not show the resulits

laszukdawid commented 5 years ago

Please elaborate on your question. Do you mean to plot residue?

mk123qwe commented 5 years ago

Please elaborate on your question. Do you mean to plot residue?

Yes,many tools show that the last graph is residual part.Your examples do not show the residue

laszukdawid commented 5 years ago

Sorry, I thought there were information about this issue. It's a rather common question. Will update the code and possibly provide some quick library on how to display on the weekend.

For now please use these:

import pylab as plt
from EMD import EMD

# S is your signal

imfs = EMD(S)
res = imfs[-1]
plt.plot(res)
plt.show()
mk123qwe commented 5 years ago

Sorry, I thought there were information about this issue. It's a rather common question. Will update the code and possibly provide some quick library on how to display on the weekend.

For now please use these:

import pylab as plt
from EMD import EMD

# S is your signal

imfs = EMD(S)
res = imfs[-1]
plt.plot(res)
plt.show()

Thanks.Although the last graph is imfn,actually it is residual part. Do I understand that correctly?

laszukdawid commented 5 years ago

If there is a residual it will be the last component in the imfs results. You can also use get_imfs_and_residue() method in EMD instance which will return separate imfs and residue.

import pylab as plt
from EMD import EMD

# S is your signal

emd = EMD()
emd.emd(S)
imfs, residue = emd.get_imfs_and_residue()
plt.plot(residue)
plt.show()
laszukdawid commented 5 years ago

Also, I just (38b2cc39e9f532ea436da0fea673916c3c449b8f) added Visualisation module which should help with displaying the results.

Please check Readme for an example.