xoa.core.signal.peak_mask#
- xoa.core.signal.peak_mask(x, distance=1)[source]#
Boolean mask of the local maxima of series.
A flat top counts once, at its middle sample; the first and last samples are never maxima. Same result as
scipy.signal.find_peaks(x, distance=distance), but for many series in parallel (equal peak heights may be tied differently).- Parameters:
x (ndarray (nt, ...)) – Time first.
distance (int) – Minimal number of samples between two maxima; the highest ones are kept.
- Returns:
ndarray of bool, same shape as
x