Skip to main content

CountsFit

Struct CountsFit 

Source
pub struct CountsFit {
Show 23 fields pub regions: Vec<RegionFit>, pub normalization: f64, pub t0_us: f64, pub flight_path_m: f64, pub alpha: [f64; 2], pub beta: [f64; 2], pub r: f64, pub fwhm_squared_us2: f64, pub r_high: Option<f64>, pub detector_tail: Option<[f64; 2]>, pub time_background: [f64; 3], pub room_background: f64, pub spread_share: f64, pub covariance: Option<FlatMatrix>, pub unbounded: Option<Unbounded>, pub on_bound: Vec<bool>, pub deviance: f64, pub converged: bool, pub measured_pulls: Option<Vec<f64>>, pub pulse_consistency: Option<Consistency>, pub step_us: f64, pub points: usize, pub halvings: usize,
}
Expand description

The fitted quantities of every region, and the normalization, time background, timing offset, flight path and pulse numbers the regions share.

Fields§

§regions: Vec<RegionFit>

Each region’s fitted quantities and counts, in the order given.

§normalization: f64

The normalization a: the known one, or the fitted one.

§t0_us: f64

The timing offset t0 in µs: the known one, or the fitted one.

§flight_path_m: f64

The flight path in m: the known one, or the fitted one.

§alpha: [f64; 2]

The pulse’s [α₀, α₁], each the known or the fitted one.

§beta: [f64; 2]

The pulse’s [β₀, β₁], each the known or the fitted one.

§r: f64

The pulse’s R: the known one, or the fitted one.

§fwhm_squared_us2: f64

The square of the pulse’s triangle FWHM, h² in µs²: the known one, or the fitted one.

§r_high: Option<f64>

The pulse’s R_high, the known or the fitted one; None without one.

§detector_tail: Option<[f64; 2]>

The detector tail’s [f, τ_D], each the known or the fitted one; None without one.

§time_background: [f64; 3]

The time background’s [C, A, τ], each the known or the fitted one; a fitted τ is undetermined when A ends at 0.

§room_background: f64

The room background’s ρ: the known one, the fitted one, or 0 without one.

§spread_share: f64

The spread’s h: the known one, the fitted one, or 0 without one.

§covariance: Option<FlatMatrix>

Covariance of the fitted quantities among, in this order, each region’s densities, in the order given, temperature and thickness variance, region by region; the normalization; each region’s b0, b1, b2, d and f, region by region; each region’s gamma transmission, region by region; each region’s capture gammas’ ε, region by region; each region’s in-scatter’s Ω, region by region; each region’s timing offset δt, region by region; the time background’s C, A and τ; the room background’s ρ; the spread’s h; t0; the flight path; α₀, α₁, β₀, β₁, R, h², R_high, f and τ_D: the inverse of the information at the fit, each run’s expected information over its overdispersion plus 1/sd² for each measured quantity and C⁻¹ over the pulse numbers a calibration’s Pulse::prior covers. The row and column of a quantity on one of its bounds, or that neither the counts nor a measurement determine, are NaN, and the other entries are conditional on every quantity that ended on a bound being held there; every entry is NaN when the fitted temperature of any region ends at 1 K or 5000 K. None when the fit did not converge.

Each covariance in a material’s Material::covariances adds S M Sᵀ, first order in the resonance parameters it lists, so valid while a standard deviation of each moves the fit little: M that covariance, S = −C Jᵀ W c, C this covariance without the term, J and c the counts’ slopes with respect to the fitted quantities and to those parameters, the latter by central differences at a tenth of each standard deviation, and W the counts’ weights. Every other known quantity is taken as exact. They are not reliable where the counts barely determine a fitted temperature or barely separate it from a density, as at few counts or for a thin sample at modest counts.

§unbounded: Option<Unbounded>

The fitted quantities’ Gaussian without their bounds, in the covariance’s order (see Unbounded), with the resonance parameters taken as exact, NaN where covariance is at a temperature edge. None when covariance is, or when the fitter reports none.

§on_bound: Vec<bool>

Whether each fitted quantity, in the covariance’s order, ended on one of its bounds.

§deviance: f64

Each run’s half Poisson deviance over the overdispersion it was weighted with, summed over both runs of every region at the fit, outside the sample runs’ RegionFit::excluded_bins.

§converged: bool

Whether the fitter converged, the open-beam fits’ time background settled at the fitted one, every sample run’s overdispersion settled, the grid met its rule at the fitted temperatures, its flight times cover the fitted t0, flight path and pulse, and the bins left out at those are the ones the fit left out.

§measured_pulls: Option<Vec<f64>>

For each measured quantity, in the covariance’s order, its value without the fit’s bounds (Self::unbounded) less its measurement over the standard deviation of that difference, √(sd² − variance + N), the variance also without the bounds and N the term resonance covariances add to it: near 0 ± 1 when the counts agree with the measurement. NaN for a quantity the counts and measurements do not determine, and for every quantity when a fitted temperature ends at 1 K or 5000 K; it loses precision as the counts’ information on the quantity vanishes beside the measurement’s. None when unbounded is.

§pulse_consistency: Option<Consistency>

Whether the counts accept the pulse’s calibration on the numbers it covers, by consistency with the fit’s numbers and covariance without their bounds (Self::unbounded). The counts’ information is divided by each run’s overdispersion, so the test weakens as the overdispersion grows. The overdispersion is at least 1, so with Poisson counts its estimate inflates the covariances the test uses, and p rejects a right calibration less often than its value says, the more so the fewer bins each run counts. A calibration fitted to the same open-beam run is not independent of the fit, which the test does not account for. None without a calibration, when unbounded is None or withheld, or when consistency gives none.

§step_us: f64

Step, in µs, of the fit’s grid.

§points: usize

Number of points of that grid.

§halvings: usize

How many times the grid of FlightTimeGrid::new was halved to reach it; that grid is built at the starting t0, flight path and pulse, or at fitted ones when the fit rebuilt it.

Trait Implementations§

Source§

impl Clone for CountsFit

Source§

fn clone(&self) -> CountsFit

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 CountsFit

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
§

impl<T> ByRef<T> for T

§

fn by_ref(&self) -> &T

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
§

impl<T, U> Imply<T> for U
where T: ?Sized, U: ?Sized,