emd.sift.get_next_imf#

emd.sift.get_next_imf(X, env_step_size=1, max_iters=1000, energy_thresh=50, stop_method='sd', sd_thresh=0.1, rilling_thresh=(0.05, 0.5, 0.05), envelope_opts=None, extrema_opts=None)[source]#

Compute the next IMF from a data set.

This is a helper function used within the more general sifting functions.

Parameters:
Xndarray [nsamples x 1]

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

env_step_sizefloat

Scaling of envelope prior to removal at each iteration of sift. The average of the upper and lower envelope is muliplied by this value before being subtracted from the data. Values should be between 0 > x >= 1 (Default value = 1)

max_itersint > 0

Maximum number of iterations to compute before throwing an error

energy_threshfloat > 0

Threshold for energy difference (in decibels) between IMF and residual to suggest stopping overall sift. (Default is None, recommended value is 50)

stop_method{‘sd’,’rilling’,’fixed’}

Flag indicating which metric to use to stop sifting and return an IMF.

sd_threshfloat

Used if ‘stop_method’ is ‘sd’. The threshold at which the sift of each IMF will be stopped. (Default value = .1)

rilling_threshtuple

Used if ‘stop_method’ is ‘rilling’, needs to contain three values (sd1, sd2, alpha). An evaluation function (E) is defined by dividing the residual by the mode amplitude. The sift continues until E < sd1 for the fraction (1-alpha) of the data, and E < sd2 for the remainder. See section 3.2 of http://perso.ens-lyon.fr/patrick.flandrin/NSIP03.pdf

Returns:
proto_imfndarray

1D vector containing the next IMF extracted from X

continue_flagbool

Boolean indicating whether the sift can be continued beyond this IMF

Other Parameters:
envelope_optsdict

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

extrema_optsdict

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