emd.sift.sift#

emd.sift.sift(X, sift_thresh=1e-08, energy_thresh=50, rilling_thresh=None, max_imfs=None, verbose=None, return_residual=True, imf_opts=None, envelope_opts=None, extrema_opts=None)[source]#

Compute Intrinsic Mode Functions from an input data vector.

This function implements the original sift algorithm [1].

Parameters:
Xndarray

1D input array containing the time-series data to be decomposed

sift_threshfloat

The threshold at which the overall sifting process will stop. (Default value = 1e-8)

max_imfsint

The maximum number of IMFs to compute. (Default value = None)

Returns:
imf: ndarray

2D array [samples x nimfs] containing he Intrisic Mode Functions from the decomposition of X.

Other Parameters:
imf_optsdict

Optional dictionary of keyword options to be passed to emd.get_next_imf

envelope_optsdict

Optional dictionary of keyword options to be passed to emd.interp_envelope

extrema_optsdict

Optional dictionary of keyword options to be passed to emd.get_padded_extrema

verbose{None,’CRITICAL’,’WARNING’,’INFO’,’DEBUG’}

Option to override the EMD logger level for a call to this function.

Notes

The classic sift is computed by passing an input vector with all options left to default

>>> imf = emd.sift.sift(x)

The sift can be customised by passing additional options, here we only compute the first four IMFs.

>>> imf = emd.sift.sift(x, max_imfs=4)

More detailed options are passed as dictionaries which are passed to the relevant lower-level functions. For instance imf_opts are passed to get_next_imf.

>>> imf_opts = {'env_step_size': 1/3, 'stop_method': 'rilling'}
>>> imf = emd.sift.sift(x, max_imfs=4, imf_opts=imf_opts)

A modified dictionary of all options can be created using get_config. This can be modified and used by unpacking the options into a sift call.

>>> conf = emd.sift.get_config('sift')
>>> conf['max_imfs'] = 4
>>> conf['imf_opts'] = imf_opts
>>> imfs = emd.sift.sift(x, **conf)

References

[1]

Huang, N. E., Shen, Z., Long, S. R., Wu, M. C., Shih, H. H., Zheng, Q., … Liu, H. H. (1998). The empirical mode decomposition and the Hilbert spectrum for nonlinear and non-stationary time series analysis. Proceedings of the Royal Society of London. Series A: Mathematical, Physical and Engineering Sciences, 454(1971), 903–995. https://doi.org/10.1098/rspa.1998.0193