find_peaks_binary#
- ethograph.features.changepoints.find_peaks_binary(x, prominence=None, distance=None, height=None, width=None, **kwargs)[source]#
Local maxima + NaN boundaries -> binary mask.
- Parameters:
x – Input 1-D signal.
prominence (
float|None) – Minimum peak prominence (how far a peak stands out from its surroundings). Raise it to keep only the clearest peaks.distance (
int|None) – Minimum number of samples between neighbouring peaks.**kwargs – Any further
scipy.signal.find_peakskeyword.
- Returns:
Binary array of the same length as x, 1 at peaks and NaN boundaries.