Skip to content

peak_annotation

PeakAnnotation

Bases: SignalAnnotation

The peak annotator finds the elements in the signal array that correspond to the peaks in the signal and returns the corresponding indices of these peaks. A minimum periodic distance between peaks can be passed.

min_peak_distance = signals.min_peak_distance instance-attribute

__init__(signals)

Parameters:

Name Type Description Default
signals Signals

an array of the signals to find peaks in

required

annotate()

Find peaks in the signal. The returned array contains the indexes of the peaks in the signal array. if the signal array is 2D, the shape will be: number of signals x max number of peaks

For signals with less elements than max number of peaks, the remaining elements at the end of the array will be np.nan

Returns:

Type Description
ndarray

np.ndarray: an array of the signals indexes of the peaks