pub enum InputData {
Transmission {
transmission: Vec<f64>,
uncertainty: Vec<f64>,
},
Counts {
sample_counts: Vec<f64>,
open_beam_counts: Vec<f64>,
},
CountsWithNuisance {
sample_counts: Vec<f64>,
flux: Vec<f64>,
background: Vec<f64>,
},
}Expand description
Typed input data — makes the data format explicit at the API boundary.
The two variants carry genuinely different data:
- Counts: raw detector counts + open beam → Poisson statistics native
- Transmission: normalized T = sample/open_beam + uncertainty → Gaussian statistics
spatial_map_typed dispatches to the correct fitting engine based on
which variant is provided. This eliminates the overloaded positional
arguments that caused silent misinterpretation in the old API.
Variants§
Transmission
Pre-normalized transmission with Gaussian uncertainties.
Use with LM (default) or Poisson KL (opt-in for low-count T data).
Fields
Counts
Raw detector counts with open beam reference.
Always uses Poisson KL (statistically optimal for count data). The fitting engine works directly on counts — no information-losing normalization to transmission.
Fields
CountsWithNuisance
Counts with pre-estimated nuisance parameters (power users).
Use when you want to inspect or override the flux estimate before fitting.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for InputData
impl RefUnwindSafe for InputData
impl Send for InputData
impl Sync for InputData
impl Unpin for InputData
impl UnsafeUnpin for InputData
impl UnwindSafe for InputData
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