Peaks
- class cubie.outputhandling.summarymetrics.peaks.Peaks(precision)[source]
Bases:
SummaryMetricSummary metric that records the indices of detected peaks.
Notes
The buffer stores the two previous values, a peak counter, and slots for the recorded peak indices. The algorithm assumes
0.0does not occur in valid data so it can serve as an initial sentinel.- build() MetricFuncCache[source]
Generate CUDA device functions for peak detection.
- Returns:
Cache containing the device update and save callbacks.
- Return type:
MetricFuncCache
Notes
The update callback compares the current value against stored history to identify peaks, while the save callback copies stored indices and resets the buffer for the next period.