pub struct SpectralRunner<A> { /* private fields */ }Expand description
Executor for a spectral algorithm, distinct from ordinary reconstruction.
Global detector order is preserved even with batching; scratch fields are released after each exposure. Existing single-object algorithms and their calibration/pupil-recovery contracts cannot be passed to this runner.
Implementations§
Source§impl<A: SpectralReconstructionAlgorithm> SpectralRunner<A>
impl<A: SpectralReconstructionAlgorithm> SpectralRunner<A>
Sourcepub fn run_opd<M: MeasurementRead>(
self,
problem: &SpectralReconstructionProblem<M>,
unwrapper: &SyntheticWavelengthUnwrapper,
reference: &PhaseReference,
mask: Option<ArrayView2<'_, u8>>,
) -> Result<MultiWavelengthReconstructionResult>
pub fn run_opd<M: MeasurementRead>( self, problem: &SpectralReconstructionProblem<M>, unwrapper: &SyntheticWavelengthUnwrapper, reference: &PhaseReference, mask: Option<ArrayView2<'_, u8>>, ) -> Result<MultiWavelengthReconstructionResult>
Reconstructs independent wavelength fields, then mixes referenced phases into OPD.
Assumes nondispersive OPD and registered, resolution-matched fields; this
convenience performs the same operations as run followed by
SpectralReconstructionResult::unwrap_opd. Pupils and calibration stay fixed.
Shared-complex coupling is rejected before reconstruction.
Sourcepub fn new(algorithm: A) -> Self
pub fn new(algorithm: A) -> Self
Creates an executor using sequential detector order and amplitude initialization.
Sourcepub fn with_schedule(self, schedule: SpectralFrameSchedule) -> Self
pub fn with_schedule(self, schedule: SpectralFrameSchedule) -> Self
Selects physical detector ordering; channel/local-frame order stays canonical.
Sourcepub fn with_initial_objects(self, objects: Vec<Array2<Complex64>>) -> Self
pub fn with_initial_objects(self, objects: Vec<Array2<Complex64>>) -> Self
Sets owned initial complex fields in stored-object order, validated when run.
Sourcepub fn with_checkpoint(
self,
checkpoint: SpectralReconstructionCheckpoint,
) -> Self
pub fn with_checkpoint( self, checkpoint: SpectralReconstructionCheckpoint, ) -> Self
Restores a validated spectral solver snapshot. Initial objects cannot
also be supplied. Its schedule is inherited unless explicitly selected,
in which case the schedule must match. iterations is the total target.
Sourcepub fn with_checkpoint_options(self, options: SpectralCheckpointOptions) -> Self
pub fn with_checkpoint_options(self, options: SpectralCheckpointOptions) -> Self
Configures periodic JSON files after complete passes and at completion.
Sourcepub fn run<M: MeasurementRead>(
self,
problem: &SpectralReconstructionProblem<M>,
) -> Result<SpectralReconstructionResult>
pub fn run<M: MeasurementRead>( self, problem: &SpectralReconstructionProblem<M>, ) -> Result<SpectralReconstructionResult>
Validates and streams one exposure at a time, returning owned channel records.
Auto Trait Implementations§
impl<A> Freeze for SpectralRunner<A>where
A: Freeze,
impl<A> RefUnwindSafe for SpectralRunner<A>where
A: RefUnwindSafe,
impl<A> Send for SpectralRunner<A>where
A: Send,
impl<A> Sync for SpectralRunner<A>where
A: Sync,
impl<A> Unpin for SpectralRunner<A>where
A: Unpin,
impl<A> UnsafeUnpin for SpectralRunner<A>where
A: UnsafeUnpin,
impl<A> UnwindSafe for SpectralRunner<A>where
A: UnwindSafe,
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