pub fn py_find_peaks<'_py>(
voltages: Bound<'_py, PyArray1<f32>>,
nanoseconds: Bound<'_py, PyArray1<f32>>,
start_time: f32,
window_size: f32,
min_peak_width: usize,
threshold: f32,
max_peaks: usize,
) -> PyResult<Vec<(usize, usize)>>
Expand description
The GAPS peak finding algorithm, based on legacy code written by the UCLA TOF team.
This needs to be applied AFTER the peakfinding and takes a specific peak as input argument
ยงArguments
- voltages (np.ndarray) | These both together
- nanosecondes (np.ndarray) | are a calibrated waveform
- start_time (float) - begin peak search at this time
- window_size (float) - limit peak search to start_time + start_time + window_size (in ns)
- min_peak_width (usize) - If a peak has a lower width, it will get discarded (in bins)
- threshold (f32) - Ingore peaks which fall below this voltage (in mV)
- max_peaks (usize) - Stop peak search after max_peaks are found