pub struct SpectralAlternatingProjection {
pub iterations: usize,
pub object_step: f64,
pub batch_size: usize,
pub epsilon: f64,
pub loss_type: LossType,
}Expand description
Object-only alternating projection for separate or multiplexed spectral data.
Every coherent source mode in an exposure is evaluated before any object update. One mask-aware amplitude ratio from their weighted intensity sum is applied to all modes. Canonical channel crop adjoints accumulate into the independent objects or one explicitly shared object. Mode updates use their effective intensity weight divided by the exposure’s total mode weight, preserving ordinary alternating-projection behavior when there is one channel. Pupils, source powers, and detector calibration remain fixed.
This generalizes narrowband state decomposition to typed channel/local-frame composition. It does not implement finite bandwidth or mixed-state coherence.
§References
S. Dong, R. Shiradkar, P. Nanda, and G. Zheng, “Spectral multiplexing and coherent-state decomposition in Fourier ptychographic imaging”, Biomedical Optics Express 5(6), 1757–1767 (2014).
Fields§
§iterations: usizePositive number of complete physical acquisition passes.
object_step: f64Finite positive relaxation applied to object corrections.
batch_size: usizePositive number of exposures per step; does not change per-frame update order.
epsilon: f64Finite positive denominator floor and dark-prediction threshold.
loss_type: LossTypeMask-aware diagnostic loss; the update always projects measured amplitude.
Implementations§
Source§impl SpectralAlternatingProjection
impl SpectralAlternatingProjection
Sourcepub fn iterations(self, iterations: usize) -> Self
pub fn iterations(self, iterations: usize) -> Self
Sets the positive number of complete acquisition passes.
Sourcepub fn object_step(self, object_step: f64) -> Self
pub fn object_step(self, object_step: f64) -> Self
Sets a finite positive object relaxation, checked before execution.
Sourcepub fn batch_size(self, batch_size: usize) -> Self
pub fn batch_size(self, batch_size: usize) -> Self
Sets positive batching without changing the sequential per-frame updates.
Trait Implementations§
Source§impl Clone for SpectralAlternatingProjection
impl Clone for SpectralAlternatingProjection
Source§fn clone(&self) -> SpectralAlternatingProjection
fn clone(&self) -> SpectralAlternatingProjection
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'de> Deserialize<'de> for SpectralAlternatingProjection
impl<'de> Deserialize<'de> for SpectralAlternatingProjection
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl SpectralReconstructionAlgorithm for SpectralAlternatingProjection
impl SpectralReconstructionAlgorithm for SpectralAlternatingProjection
Source§type IterationMetrics = NoIterationMetrics
type IterationMetrics = NoIterationMetrics
Source§fn step<M: MeasurementRead>(
&mut self,
problem: &SpectralReconstructionProblem<M>,
state: &mut SpectralReconstructionState,
batch: &Batch,
_iteration: usize,
) -> Result<StepOutput<Self::IterationMetrics>>
fn step<M: MeasurementRead>( &mut self, problem: &SpectralReconstructionProblem<M>, state: &mut SpectralReconstructionState, batch: &Batch, _iteration: usize, ) -> Result<StepOutput<Self::IterationMetrics>>
Source§fn iterations(&self) -> usize
fn iterations(&self) -> usize
Source§fn batch_size(&self) -> usize
fn batch_size(&self) -> usize
Source§fn checkpoint_configuration(&self) -> Option<String>
fn checkpoint_configuration(&self) -> Option<String>
None (the default) disables capture/resume for custom implementations.
Implementors opting in must keep every persistent numerical variable in
the spectral state and exclude only the total iteration target here.Source§fn validate_problem<M: MeasurementRead>(
&self,
_problem: &SpectralReconstructionProblem<M>,
) -> Result<()>
fn validate_problem<M: MeasurementRead>( &self, _problem: &SpectralReconstructionProblem<M>, ) -> Result<()>
Source§fn initialize<M: MeasurementRead>(
&self,
problem: &SpectralReconstructionProblem<M>,
) -> Result<SpectralReconstructionState>
fn initialize<M: MeasurementRead>( &self, problem: &SpectralReconstructionProblem<M>, ) -> Result<SpectralReconstructionState>
Source§fn run<M: MeasurementRead>(
self,
problem: &SpectralReconstructionProblem<M>,
) -> Result<SpectralReconstructionResult>where
Self: Sized,
fn run<M: MeasurementRead>(
self,
problem: &SpectralReconstructionProblem<M>,
) -> Result<SpectralReconstructionResult>where
Self: Sized,
Auto Trait Implementations§
impl Freeze for SpectralAlternatingProjection
impl RefUnwindSafe for SpectralAlternatingProjection
impl Send for SpectralAlternatingProjection
impl Sync for SpectralAlternatingProjection
impl Unpin for SpectralAlternatingProjection
impl UnsafeUnpin for SpectralAlternatingProjection
impl UnwindSafe for SpectralAlternatingProjection
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