Skip to main content

CalibrationResult

Struct CalibrationResult 

Source
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: String

Family 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: f64

Reduced data χ²/dof of the best fit (after anorm/baseline). The energy-scale prior penalty is excluded — it is reported separately as prior_penalty.

§resolution: ResolutionFunction

The calibrated resolution, ready to pin into a sample fit.

§iterations: usize

Optimizer iterations of the winning restart.

§converged: bool

Whether the winning restart self-converged.

§position_t0_us: f64

Fitted (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: f64

Fitted (or pinned) flight-path scale L_scale. Equals config.position_l_scale_center when fit_l_scale is false.

§prior_penalty: f64

Gaussian-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: usize

Total 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

Source§

fn clone(&self) -> CalibrationResult

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CalibrationResult

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more