pactools.utils.peak_finder.peak_finder¶
-
pactools.utils.peak_finder.
peak_finder
(x0, thresh=None, extrema=1)[source]¶ Noise tolerant fast peak finding algorithm
- Parameters
- x01d array
A real vector from the maxima will be found (required).
- threshfloat
The amount above surrounding data for a peak to be identified (default = (max(x0)-min(x0))/4). Larger values mean the algorithm is more selective in finding peaks.
- extrema{-1, 1}
1 if maxima are desired, -1 if minima are desired (default = maxima, 1).
- Returns
- peak_locarray
The indices of the identified peaks in x0
- peak_magarray
The magnitude of the identified peaks
Notes
If repeated values are found the first is identified as the peak. Conversion from initial Matlab code from: Nathanael C. Yoder (ncyoder@purdue.edu)