pub struct TwoArmBackgroundFitResult {
pub names: Vec<String>,
pub amplitudes: Vec<f64>,
pub amplitude_uncertainties: Option<Vec<f64>>,
pub amplitude_at_bound: Vec<bool>,
pub amplitudes_identifiable: bool,
pub prediction: TwoArmCountPrediction,
pub poisson_deviance: f64,
pub deviance_per_dof: f64,
pub n_informative: usize,
pub converged: bool,
pub iterations: usize,
}Expand description
Result of fitting fixed neutron signals plus background templates.
Fields§
§names: Vec<String>Component names in the same order as amplitudes.
amplitudes: Vec<f64>Fitted non-negative template amplitudes.
amplitude_uncertainties: Option<Vec<f64>>Local one-sigma amplitude uncertainties from the expected (Fisher) information of the constrained objective at the solution.
Free amplitudes are conditioned on the constraint: the information is
restricted to the free set before inversion, so an amplitude whose
correlated partner is held on its bound is not reported with the
marginal over a direction the constraint removed. An amplitude on its
zero bound (see amplitude_at_bound) reports 1 / sqrt(I_jj), the
one-sided curvature scale of the objective at the boundary, not a
symmetric interval.
None when the fit did not converge, when the amplitudes are not
identifiable, when the free block of the information matrix is
singular, or when the caller’s PoissonConfig has
compute_covariance == false. An individual entry is NaN when its variance is
non-positive, or when its template is sensitive on a bin with zero
expectation — the boundary of the Poisson support, where the expected
information diverges and no regular estimate exists. A reported number
is therefore never zero.
amplitude_at_bound: Vec<bool>Whether each fitted amplitude sits on its non-negativity bound with the gradient still pushing it negative — a one-sided limit rather than an interior estimate.
amplitudes_identifiable: boolWhether every named template amplitude is separately determined.
false means that at least two supplied shapes are linearly dependent:
the total fitted background can be valid, but the individual amplitudes
are not physically interpretable. In that case uncertainties are not
reported.
prediction: TwoArmCountPredictionNeutron signal, fitted background, and total for both arms.
poisson_deviance: f64Poisson deviance for the concatenated open and sample arrays.
deviance_per_dof: f64Deviance divided by n_informative - template_rank.
n_informative: usizeConcatenated bins that contribute to the deviance: the observation, the neutron signal, or at least one template is nonzero there.
This is not simply 2 * n_bins: a bin where all three are exactly
zero yields identically zero deviance for any amplitude vector, so it
cannot be a degree of freedom.
converged: boolWhether the bounded optimizer converged.
iterations: usizeJoint iterations taken, including the post-convergence active-set
polish; never exceeds the caller’s max_iter.
Trait Implementations§
Source§impl Clone for TwoArmBackgroundFitResult
impl Clone for TwoArmBackgroundFitResult
Source§fn clone(&self) -> TwoArmBackgroundFitResult
fn clone(&self) -> TwoArmBackgroundFitResult
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 TwoArmBackgroundFitResult
impl RefUnwindSafe for TwoArmBackgroundFitResult
impl Send for TwoArmBackgroundFitResult
impl Sync for TwoArmBackgroundFitResult
impl Unpin for TwoArmBackgroundFitResult
impl UnsafeUnpin for TwoArmBackgroundFitResult
impl UnwindSafe for TwoArmBackgroundFitResult
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