xboa
|
Find peaks in a list of data points by looking for the peak within a window. More...
Inherits object.
Public Member Functions | |
def | __init__ |
Initialise the peak finder. More... | |
def | find_peaks |
Find peaks in the data. More... | |
Public Attributes | |
window_size | |
threshold | |
window_step | |
Find peaks in a list of data points by looking for the peak within a window.
This algorithm will ignore subpeaks that are close to the main peak (assuming e.g. that they are noise)
Definition at line 24 of file _window_peak_finder.py.
def __init__ | ( | self, | |
window_size, | |||
threshold_over_mean, | |||
window_step | |||
) |
Initialise the peak finder.
Definition at line 33 of file _window_peak_finder.py.
def find_peaks | ( | self, | |
data | |||
) |
Find peaks in the data.
Makes a window and looks for the highest value within that window. If the highest value is at the boundary of the window, it is ignored; else the peak is saved. The index corresponding to window start is then incremented by one and the routine is repeated.
uses window_size that is the smallest of self.window_size and len(data)
Returns a list of indices, each index corresponding to the location of a peak
Definition at line 55 of file _window_peak_finder.py.
References WindowPeakFinder.threshold, WindowPeakFinder.window_size, and WindowPeakFinder.window_step.
window_size |
Definition at line 34 of file _window_peak_finder.py.
Referenced by WindowPeakFinder.find_peaks().
threshold |
Definition at line 35 of file _window_peak_finder.py.
Referenced by WindowPeakFinder.find_peaks().
window_step |
Definition at line 36 of file _window_peak_finder.py.
Referenced by WindowPeakFinder.find_peaks().