pub struct SpatialResult {
pub density_maps: Vec<Array2<f64>>,
pub uncertainty_maps: Vec<Array2<f64>>,
pub chi_squared_map: Array2<f64>,
pub converged_map: Array2<bool>,
pub temperature_map: Option<Array2<f64>>,
pub temperature_uncertainty_map: Option<Array2<f64>>,
pub isotope_labels: Vec<String>,
pub anorm_map: Option<Array2<f64>>,
pub background_maps: Option<[Array2<f64>; 3]>,
pub n_converged: usize,
pub n_total: usize,
pub n_failed: usize,
}Expand description
Result of spatial mapping over a 2D image.
Fields§
§density_maps: Vec<Array2<f64>>Fitted areal density maps, one per isotope. Each Array2 has shape (height, width).
uncertainty_maps: Vec<Array2<f64>>Uncertainty maps, one per isotope.
chi_squared_map: Array2<f64>Reduced chi-squared map.
converged_map: Array2<bool>Convergence map (true = converged).
temperature_map: Option<Array2<f64>>Fitted temperature map (K). Some when config.fit_temperature() is true.
temperature_uncertainty_map: Option<Array2<f64>>Per-pixel temperature uncertainty map (K, 1-sigma).
Some when config.fit_temperature() is true.
Entries are NaN where uncertainty was unavailable for that pixel.
isotope_labels: Vec<String>Isotope labels captured at compute time, one per density map. Ensures display labels stay in sync with density data even if the user modifies the isotope list after fitting.
anorm_map: Option<Array2<f64>>Per-pixel normalization / signal-scale map (when background fitting is enabled).
background_maps: Option<[Array2<f64>; 3]>Per-pixel background parameter maps.
Transmission LM uses [BackA, BackB, BackC].
Counts KL background uses [b0, b1, alpha_2].
n_converged: usizeNumber of pixels that converged.
n_total: usizeTotal number of pixels fitted.
n_failed: usizeNumber of pixels where the fitter returned an error (not just non-convergence — a hard failure like invalid parameters or NaN model output). These pixels have NaN density and false convergence.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SpatialResult
impl RefUnwindSafe for SpatialResult
impl Send for SpatialResult
impl Sync for SpatialResult
impl Unpin for SpatialResult
impl UnwindSafe for SpatialResult
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
§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