pub struct CountsBackgroundConfig {
pub alpha_1_init: f64,
pub alpha_2_init: f64,
pub fit_alpha_1: bool,
pub fit_alpha_2: bool,
}Expand description
Background model for the counts fitting engine.
In the counts domain, the forward model is: Y(E) = α₁ · [Φ(E) · exp(-Σ nᵢσᵢ(E))] + α₂ · B(E)
where Φ(E) is the incident flux and B(E) is detector/gamma background. The reference Φ(E) / B(E) spectra are supplied by the caller or by spatial pre-processing; this config only controls the fitted scale factors.
Important distinction:
- This is a detector-space counts background model
B(E). - It is NOT the same as the transmission-lift background used by
BackgroundConfig, which models additive uplift of the apparent transmission curve (for example gamma-tail structure that pushes transmission upward).
For VENUS MCP/TPX event detectors, the current working assumption is:
- raw/open-beam is the correct normalization baseline
- dark-current / CCD-style electronic offset is not modeled
- rare ghost counts may exist at the hardware level, but are currently treated as negligible unless a detector-background reference spectrum is explicitly provided
This is structurally different from the transmission background model
(BackgroundConfig) because:
- Φ and B are reference spectra, not fitted per pixel
- α₁ and α₂ are optional per-pixel scale corrections
- All terms are non-negative (required for valid Poisson NLL)
Fields§
§alpha_1_init: f64Initial normalization scale (default 1.0).
alpha_2_init: f64Initial background scale (default 1.0).
fit_alpha_1: boolWhether α₁ is free (true) or fixed (false).
fit_alpha_2: boolWhether α₂ is free (true) or fixed (false).
Trait Implementations§
Source§impl Clone for CountsBackgroundConfig
impl Clone for CountsBackgroundConfig
Source§fn clone(&self) -> CountsBackgroundConfig
fn clone(&self) -> CountsBackgroundConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CountsBackgroundConfig
impl Debug for CountsBackgroundConfig
Auto Trait Implementations§
impl Freeze for CountsBackgroundConfig
impl RefUnwindSafe for CountsBackgroundConfig
impl Send for CountsBackgroundConfig
impl Sync for CountsBackgroundConfig
impl Unpin for CountsBackgroundConfig
impl UnwindSafe for CountsBackgroundConfig
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
Mutably borrows from an owned value. Read more
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>
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 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>
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