pub struct CalibrationResult {
pub family: String,
pub theta: Vec<f64>,
pub chi2_dof: f64,
pub resolution: ResolutionFunction,
pub iterations: usize,
pub converged: bool,
pub position_t0_us: f64,
pub position_l_scale: f64,
pub prior_penalty: f64,
pub n_free_params: usize,
pub bounds_hit: Vec<String>,
}Expand description
Result of a resolution calibration.
Fields§
§family: StringFamily label ("gaussian" | "udr_corr" | "ic").
theta: Vec<f64>Fitted parameter vector (raw optimizer space; see ResolutionFamily
and ResolutionFamily::param_names). For the IC family these are
ln/box-encoded — read decoded physical values off
resolution instead of exponentiating by hand.
chi2_dof: f64Reduced data χ²/dof of the best fit (after anorm/baseline). The
energy-scale prior penalty is excluded — it is reported separately as
prior_penalty.
resolution: ResolutionFunctionThe calibrated resolution, ready to pin into a sample fit.
iterations: usizeOptimizer iterations of the winning restart.
converged: boolWhether the winning restart self-converged.
position_t0_us: f64Fitted (or pinned) SAMMY energy-scale TOF zero t0 (µs). Equals
config.position_t0_center_us when fit_t0 is false (pinned). When fit, it
is a SHARED energy-scale parameter (not a per-family nuisance): the resonance
dip position is confounded with flight-path geometry (the asymmetric-kernel
lag is the same 1/√E basis as L_scale), so t0/L_scale are constrained
by the metrology prior, not free.
position_l_scale: f64Fitted (or pinned) flight-path scale L_scale. Equals
config.position_l_scale_center when fit_l_scale is false.
prior_penalty: f64Gaussian-prior penalty Σ((θ−center)/σ)² on the fitted (t0, L_scale) at the
solution (0 when no position prior is active). objective = χ²_data + prior_penalty; report it alongside chi2_dof so a large position move
(e.g. a wrong family needing ΔL/L ≫ the metrology σ) is visible, not hidden.
n_free_params: usizeTotal outer-loop free parameters: resolution θ plus any FITTED position
coordinates (t0, L_scale). Makes cross-family χ² comparisons and
dof bookkeeping explicit now that families differ in size (IC is 4–5
parameters, Gaussian/UdrCorr are 2).
bounds_hit: Vec<String>Coordinates that finished within BOUND_HIT_REL_TOL·(hi−lo) of a box
bound, as "name:lower" / "name:upper" (names from
ResolutionFamily::param_names, plus "t0_us" / "l_scale" when
position is fitted). Empty = interior solution. A pinned bound makes a
degenerate calibration visible instead of silent: e.g. an eV-regime
calibrant with no storage tail drives R → 0 ("r:lower") — on that
β↔R ridge the storage term vanishes and β is unconstrained, so the
reported β must not be physically interpreted.
Trait Implementations§
Source§impl Clone for CalibrationResult
impl Clone for CalibrationResult
Source§fn clone(&self) -> CalibrationResult
fn clone(&self) -> CalibrationResult
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for CalibrationResult
impl RefUnwindSafe for CalibrationResult
impl Send for CalibrationResult
impl Sync for CalibrationResult
impl Unpin for CalibrationResult
impl UnsafeUnpin for CalibrationResult
impl UnwindSafe for CalibrationResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more