STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
fsw::calibration::CubicFit Struct Reference

Result of a least-squares polynomial fit over a channel's captured points. More...

#include <CubicCalibrationStore.hpp>

Collaboration diagram for fsw::calibration::CubicFit:
[legend]

Public Attributes

bool valid = false
double A = 0.0
double B = 0.0
double C = 0.0
double D = 0.0
std::vector< double > poly
double norm_min = 0.0
double norm_scale = 1.0
double rmse = 0.0
int degree = 0

Detailed Description

Result of a least-squares polynomial fit over a channel's captured points.

Two equivalent representations are kept:

  • raw cubic psi = A*adc^3 + B*adc^2 + C*adc + D (consumed by PTCalibrationCoeffs, raw int32)
  • normalized psi = sum poly[i] * ((adc - norm_min)/norm_scale)^i (well-conditioned; TS side) The normalized form is what the frontend evaluates and what passes the backend's coefficient validator (which rejects |A| > 1e-11 on a raw-ADC cubic).

Definition at line 29 of file CubicCalibrationStore.hpp.

Member Data Documentation

◆ A

◆ B

◆ C

◆ D

◆ degree

◆ norm_min

double fsw::calibration::CubicFit::norm_min = 0.0

◆ norm_scale

double fsw::calibration::CubicFit::norm_scale = 1.0

◆ poly

std::vector<double> fsw::calibration::CubicFit::poly

◆ rmse

double fsw::calibration::CubicFit::rmse = 0.0

◆ valid

bool fsw::calibration::CubicFit::valid = false

The documentation for this struct was generated from the following file: