pub struct ReconstructionState { /* private fields */ }Expand description
Mutable numerical state shared by algorithms during reconstruction.
The object spectrum is centered and shaped on the high-resolution grid. The pupil and scratch arrays use the low-resolution grid. Accessors borrow storage without copying; mutating the spectrum invalidates the cached object-domain field.
Implementations§
Source§impl ReconstructionState
impl ReconstructionState
Sourcepub fn object_spectrum(&self) -> ArrayView2<'_, Complex64>
pub fn object_spectrum(&self) -> ArrayView2<'_, Complex64>
Borrows the centered high-resolution complex object spectrum.
Sourcepub fn object_spectrum_mut(&mut self) -> ArrayViewMut2<'_, Complex64>
pub fn object_spectrum_mut(&mut self) -> ArrayViewMut2<'_, Complex64>
Mutably borrows the object spectrum and invalidates the object-domain cache.
Sourcepub fn pupil(&self) -> &Pupil
pub fn pupil(&self) -> &Pupil
Borrows the current low-resolution complex pupil and binary support.
Sourcepub fn illumination_corrections(&self) -> Option<&[(f64, f64)]>
pub fn illumination_corrections(&self) -> Option<&[(f64, f64)]>
Borrows optional per-source (row, column) corrections in Fourier-grid pixels.
Sourcepub fn frame_gains(&self) -> Option<&[f64]>
pub fn frame_gains(&self) -> Option<&[f64]>
Borrows optional positive gains in acquisition-frame order.
Sourcepub fn background(&self) -> Option<&[f64]>
pub fn background(&self) -> Option<&[f64]>
Borrows optional additive backgrounds in acquisition-frame order.
Sourcepub fn physical_illumination_calibration(
&self,
) -> Option<&IlluminationCalibrationState>
pub fn physical_illumination_calibration( &self, ) -> Option<&IlluminationCalibrationState>
Borrows checkpointable physical planar-array calibration state, when active.
Sourcepub fn calibrated_model(&self) -> Option<&ImagePlaneModel>
pub fn calibrated_model(&self) -> Option<&ImagePlaneModel>
Borrows the illumination-refreshed model used by joint reconstruction, when active.
Sourcepub fn illumination_gradient(&self) -> &[(f64, f64)]
pub fn illumination_gradient(&self) -> &[(f64, f64)]
Most recently accumulated per-source illumination gradient.
Sourcepub fn effective_source_offset(
&self,
model: &ImagePlaneModel,
source: usize,
) -> Result<FourierOffset>
pub fn effective_source_offset( &self, model: &ImagePlaneModel, source: usize, ) -> Result<FourierOffset>
Adds the current calibration correction to a model source offset and validates bounds.
Sourcepub fn initialize<M: MeasurementRead>(
problem: &ReconstructionProblem<M>,
) -> Result<Self>
pub fn initialize<M: MeasurementRead>( problem: &ReconstructionProblem<M>, ) -> Result<Self>
Initializes a CPU-backed object estimate from weighted measured amplitudes.
Sourcepub fn initialize_with_backend<M: MeasurementRead>(
problem: &ReconstructionProblem<M>,
backend: Arc<dyn Backend>,
) -> Result<Self>
pub fn initialize_with_backend<M: MeasurementRead>( problem: &ReconstructionProblem<M>, backend: Arc<dyn Backend>, ) -> Result<Self>
Initializes an object estimate, pupil, calibration variables, and scratch storage
using backend after validating problem.
Sourcepub fn from_object<M: MeasurementRead>(
problem: &ReconstructionProblem<M>,
object: Array2<Complex64>,
) -> Result<Self>
pub fn from_object<M: MeasurementRead>( problem: &ReconstructionProblem<M>, object: Array2<Complex64>, ) -> Result<Self>
Initializes state from an owned standard-layout high-resolution complex object.
Sourcepub fn from_checkpoint<M: MeasurementRead>(
problem: &ReconstructionProblem<M>,
checkpoint: &ReconstructionCheckpoint,
) -> Result<Self>
pub fn from_checkpoint<M: MeasurementRead>( problem: &ReconstructionProblem<M>, checkpoint: &ReconstructionCheckpoint, ) -> Result<Self>
Restores CPU-backed state from a checkpoint validated against problem.
Sourcepub fn from_checkpoint_with_backend<M: MeasurementRead>(
problem: &ReconstructionProblem<M>,
checkpoint: &ReconstructionCheckpoint,
backend: Arc<dyn Backend>,
) -> Result<Self>
pub fn from_checkpoint_with_backend<M: MeasurementRead>( problem: &ReconstructionProblem<M>, checkpoint: &ReconstructionCheckpoint, backend: Arc<dyn Backend>, ) -> Result<Self>
Restores state from a compatible checkpoint using backend.
Trait Implementations§
Source§impl Clone for ReconstructionState
impl Clone for ReconstructionState
Source§fn clone(&self) -> ReconstructionState
fn clone(&self) -> ReconstructionState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ReconstructionState
impl !RefUnwindSafe for ReconstructionState
impl Send for ReconstructionState
impl Sync for ReconstructionState
impl Unpin for ReconstructionState
impl UnsafeUnpin for ReconstructionState
impl !UnwindSafe for ReconstructionState
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,
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