pub struct SpectralReconstructionState { /* private fields */ }Expand description
Mutable spectral object state with scratch storage for only the current exposure.
Independent coupling stores one centered spectrum per channel; shared coupling stores exactly one. Pupils and calibration stay fixed in the model.
Implementations§
Source§impl SpectralReconstructionState
impl SpectralReconstructionState
Sourcepub fn initialize<M: MeasurementRead>(
problem: &SpectralReconstructionProblem<M>,
) -> Result<Self>
pub fn initialize<M: MeasurementRead>( problem: &SpectralReconstructionProblem<M>, ) -> Result<Self>
Initializes real non-negative objects from weighted, mask-aware measured amplitudes.
Separate frames reproduce ordinary per-channel initialization. For mixed frames the starting amplitude splits measured signal equally per unit spectral/local-gain weight; this is an initialization heuristic, not spectral demixing. Fully unseen pixels use the weighted amplitude mean.
Sourcepub fn from_objects<M: MeasurementRead>(
problem: &SpectralReconstructionProblem<M>,
objects: Vec<Array2<Complex64>>,
) -> Result<Self>
pub fn from_objects<M: MeasurementRead>( problem: &SpectralReconstructionProblem<M>, objects: Vec<Array2<Complex64>>, ) -> Result<Self>
Initializes from owned common-grid complex objects in stored-object order.
Inputs must be finite standard row-major arrays. Independent coupling requires one object per channel; shared coupling requires exactly one.
Sourcepub fn object_spectra(&self) -> Vec<ArrayView2<'_, Complex64>> ⓘ
pub fn object_spectra(&self) -> Vec<ArrayView2<'_, Complex64>> ⓘ
Borrows stored centered spectra, one per independent object or one when shared.
Sourcepub fn object_spectrum_mut(
&mut self,
index: usize,
) -> Result<ArrayViewMut2<'_, Complex64>>
pub fn object_spectrum_mut( &mut self, index: usize, ) -> Result<ArrayViewMut2<'_, Complex64>>
Mutably borrows one stored centered spectrum by zero-based object index. Shared coupling has only index zero; out-of-range indices return an error.
Auto Trait Implementations§
impl Freeze for SpectralReconstructionState
impl !RefUnwindSafe for SpectralReconstructionState
impl Send for SpectralReconstructionState
impl Sync for SpectralReconstructionState
impl Unpin for SpectralReconstructionState
impl UnsafeUnpin for SpectralReconstructionState
impl !UnwindSafe for SpectralReconstructionState
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> 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