pub struct BackgroundConfig {
pub anorm_init: f64,
pub back_a_init: f64,
pub back_b_init: f64,
pub back_c_init: f64,
pub back_d_init: f64,
pub back_f_init: f64,
pub fit_anorm: bool,
pub fit_back_a: bool,
pub fit_back_b: bool,
pub fit_back_c: bool,
pub fit_back_d: bool,
pub fit_back_f: bool,
}Expand description
SAMMY-style normalization and background configuration.
When enabled, the transmission model becomes: T_out(E) = Anorm × T_inner(E) + BackA + BackB / √E + BackC × √E + BackD × exp(−BackF / √E)
The first 4 background parameters (Anorm, BackA, BackB, BackC) are always
available. The exponential tail (BackD, BackF) is optional and disabled
by default (fit_back_d = false, fit_back_f = false).
§SAMMY Reference
SAMMY manual Sec III.E.2 — NORMAlization and BACKGround cards. SAMMY fits up to 6 background terms; we implement all 6.
Fields§
§anorm_init: f64Initial value for the normalization factor (default 1.0).
back_a_init: f64Initial value for the constant background (default 0.0).
back_b_init: f64Initial value for the 1/√E background term (default 0.0).
back_c_init: f64Initial value for the √E background term (default 0.0).
back_d_init: f64Initial value for the exponential amplitude (default 0.01).
Must be > 0 when fit_back_f is true, otherwise the Jacobian
column for BackF is identically zero and BackF cannot be learned.
back_f_init: f64Initial value for the exponential decay constant (default 1.0).
Units: √eV. Must be > 0 when fit_back_d is true, otherwise
BackD is indistinguishable from BackA (both become constants).
fit_anorm: boolWhether Anorm is free (true) or fixed (false).
fit_back_a: boolWhether BackA is free (true) or fixed (false).
fit_back_b: boolWhether BackB is free (true) or fixed (false).
fit_back_c: boolWhether BackC is free (true) or fixed (false).
fit_back_d: boolWhether BackD (exponential amplitude) is free (true) or fixed (false).
fit_back_f: boolWhether BackF (exponential decay constant) is free (true) or fixed (false).
Trait Implementations§
Source§impl Clone for BackgroundConfig
impl Clone for BackgroundConfig
Source§fn clone(&self) -> BackgroundConfig
fn clone(&self) -> BackgroundConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BackgroundConfig
impl Debug for BackgroundConfig
Auto Trait Implementations§
impl Freeze for BackgroundConfig
impl RefUnwindSafe for BackgroundConfig
impl Send for BackgroundConfig
impl Sync for BackgroundConfig
impl Unpin for BackgroundConfig
impl UnsafeUnpin for BackgroundConfig
impl UnwindSafe for BackgroundConfig
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