emd.sift.get_padded_extrema#

emd.sift.get_padded_extrema(X, pad_width=2, mode='peaks', parabolic_extrema=False, loc_pad_opts=None, mag_pad_opts=None, method='rilling')[source]#

Identify and pad the extrema in a signal.

This function returns a set of extrema from a signal including padded extrema at the edges of the signal. Padding is carried out using numpy.pad.

Parameters:
Xndarray

Input signal

pad_widthint >= 0

Number of additional extrema to add to the start and end

mode{‘peaks’, ‘troughs’, ‘abs_peaks’, ‘both’}

Switch between detecting peaks, troughs, peaks in the abs signal or both peaks and troughs

method{‘rilling’, ‘numpypad’}

Which padding method to use

parabolic_extremabool

Flag indicating whether extrema positions should be refined by parabolic interpolation

loc_pad_optsdict

Optional dictionary of options to be passed to np.pad when padding extrema locations

mag_pad_optsdict

Optional dictionary of options to be passed to np.pad when padding extrema magnitudes

Returns:
locsndarray

location of extrema in samples

magsndarray

Magnitude of each extrema

See also

emd.sift.interp_envelope
emd.sift._pad_extrema_numpy
emd.sift._pad_extrema_rilling

Notes

The ‘abs_peaks’ mode is not compatible with the ‘rilling’ method as rilling must identify all peaks and troughs together.