Summary metrics

cubie.outputhandling.summarymetrics

The summarymetrics package houses the summary metric registry used by output handling to accumulate reductions during integration. Importing the package creates summary_metrics and eagerly imports the built-in metrics so that each registers its CUDA device update and save functions. External packages extend the system by decorating new metric classes with register_metric().

Public interface

  • summary_metrics – registry storing metric factories and compiled device callables.

  • register_metric – decorator used by metric modules to register implementations.

  • SummaryMetric – base class describing summary metric interfaces.

  • SummaryMetrics – registry container that stores metrics and compiled functions.

  • MetricFuncCache – caches compiled CUDA functions per metric.

Built-in metrics

  • Mean – arithmetic average.

  • Max – maximum value.

  • Min – minimum value.

  • RMS – root-mean-square.

  • Std – standard deviation.

  • MaxMagnitude – maximum absolute value.

  • Extrema – both maximum and minimum.

  • Peaks – peak detection (local maxima).

  • NegativePeaks – negative peak detection (local minima).

  • MeanStdRms – composite metric computing mean, std, and rms efficiently.

  • DxdtMax – maximum first derivative (slope).

  • DxdtMin – minimum first derivative (slope).

  • DxdtExtrema – both maximum and minimum first derivative.

  • D2xdt2Max – maximum second derivative (acceleration).

  • D2xdt2Min – minimum second derivative (acceleration).

  • D2xdt2Extrema – both maximum and minimum second derivative.

Dependencies

  • Compiles device functions via cubie.CUDAFactory and numba.cuda.

  • Consumes save/update cadence configuration from cubie.outputhandling.