scipp.scipy.signal.find_peaks#
- scipp.scipy.signal.find_peaks(da, *, height=None, threshold=None, rel_height=None, **kwargs)#
A routine that locates “peaks” in a 1D signal.
This is a wrapper around :py:func:`scipy.signal.find_peaks. See there for a complete description of parameters.
- Returns:
Variable
– Indices of peaks in the signal that satisfy all given conditions.
Examples
>>> from scipp.scipy.signal import find_peaks >>> x = sc.linspace('x', -3.14, 3.14, 101, unit='rad') >>> y = sc.DataArray(sc.cos(5 * x), coords={'x': x}) >>> find_peaks(y) <scipp.Variable> (x: 5) int64 <no unit> [10, 30, ..., 70, 90]