NegativePeaks
- class cubie.outputhandling.summarymetrics.negative_peaks.NegativePeaks(precision)[source]
Bases:
SummaryMetricSummary metric that records the indices of detected negative peaks.
Notes
The buffer stores the two previous values, a peak counter, and slots for the recorded negative 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 negative 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 negative peaks (local minima), while the save callback copies stored indices and resets the buffer for the next period.