Skip to main content

SpectralRunner

Struct SpectralRunner 

Source
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>

Source

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.

Source

pub fn new(algorithm: A) -> Self

Creates an executor using sequential detector order and amplitude initialization.

Source

pub fn with_schedule(self, schedule: SpectralFrameSchedule) -> Self

Selects physical detector ordering; channel/local-frame order stays canonical.

Source

pub fn with_initial_objects(self, objects: Vec<Array2<Complex64>>) -> Self

Sets owned initial complex fields in stored-object order, validated when run.

Source

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.

Source

pub fn with_checkpoint_options(self, options: SpectralCheckpointOptions) -> Self

Configures periodic JSON files after complete passes and at completion.

Source

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,