Skip to main content

Module algorithms

Module algorithms 

Source
Expand description

Algorithms used to exract information from the TOF waveforms.

Functions§

calculate_pedestal
The pedestal is the baseline of the waveform
cfd_simple
Find the onset time of a peak with a constant fraction discrimination method.
find_peaks
Find peaks in a given time window (in ns) by comparing the waveform voltages with the given threshold.
find_peaks_zscore
Z-scores peak finding algorithm
fit_sine_simple
Simple, analystyc line fit to fit a a sine function (e.g. as to TOF ch 9 sine wave data)
get_max_value_idx
Return the index of the maximum value in an array of floats. This works also for numbers which don’t implement Ord, only PartialOrd is required.
integrate
Integrate a waveform
interpolate_time
Linear interpolation of the time within a single bin of a TOF waveform
time2bin
Given a time in ns, find the bin most closely corresponding to that time
time_over_threshold
Calculate the time in ns for which the waveform is above a certain threshold for paddle end A