pub struct ImagePlaneModel {
pub k_vectors: Vec<KVector>,
pub pupil: Pupil,
pub crop_indices: CropIndices,
pub subpixel_offsets: Option<Vec<FourierOffset>>,
pub sampling: Sampling,
pub image_shape: (usize, usize),
pub reconstruction_shape: (usize, usize),
pub frame_gains: Option<Vec<f64>>,
pub background: Option<Vec<f64>>,
pub multiplexing_matrix: Option<MultiplexingMatrix>,
}Expand description
Algorithm-facing image-plane FPM model. It contains no LED or camera geometry.
Fields§
§k_vectors: Vec<KVector>One transverse wave vector per illumination source.
pupil: Pupil§crop_indices: CropIndices§subpixel_offsets: Option<Vec<FourierOffset>>Fractional (row, column) Fourier-grid offsets relative to each crop.
sampling: Sampling§image_shape: (usize, usize)§reconstruction_shape: (usize, usize)§frame_gains: Option<Vec<f64>>§background: Option<Vec<f64>>§multiplexing_matrix: Option<MultiplexingMatrix>Optional measured-frame rows of (source_index, incoherent_weight).
Implementations§
Source§impl ImagePlaneModel
impl ImagePlaneModel
pub fn new( k_vectors: Vec<KVector>, pupil: Pupil, crop_indices: CropIndices, sampling: Sampling, image_shape: (usize, usize), reconstruction_shape: (usize, usize), ) -> Result<Self>
Sourcepub fn from_experiment<I: IlluminationSource>(
optics: &Optics,
illumination: &I,
image_shape: (usize, usize),
reconstruction_shape: ReconstructionShape,
) -> Result<Self>
pub fn from_experiment<I: IlluminationSource>( optics: &Optics, illumination: &I, image_shape: (usize, usize), reconstruction_shape: ReconstructionShape, ) -> Result<Self>
Compiles an experiment using an explicit or automatically selected reconstruction shape.
Sourcepub fn suggest_reconstruction_shape<I: IlluminationSource>(
optics: &Optics,
illumination: &I,
image_shape: (usize, usize),
reconstruction_shape: ReconstructionShape,
) -> Result<(usize, usize)>
pub fn suggest_reconstruction_shape<I: IlluminationSource>( optics: &Optics, illumination: &I, image_shape: (usize, usize), reconstruction_shape: ReconstructionShape, ) -> Result<(usize, usize)>
Resolves an explicit shape or suggests an automatic reconstruction grid from the actual illumination wave vectors.
pub fn source_count(&self) -> usize
pub fn frame_count(&self) -> usize
pub fn is_multiplexed(&self) -> bool
pub fn with_multiplexing(self, matrix: MultiplexingMatrix) -> Result<Self>
pub fn with_subpixel_offsets(self, offsets: Vec<FourierOffset>) -> Result<Self>
pub fn source_offset(&self, source: usize) -> Result<FourierOffset>
pub fn extract_patch( &self, object_spectrum: &Array2<Complex64>, source: usize, destination: &mut [Complex64], ) -> Result<()>
pub fn extract_patch_at_offset( &self, object_spectrum: &Array2<Complex64>, source: usize, offset: FourierOffset, destination: &mut [Complex64], ) -> Result<()>
pub fn insert_patch_adjoint( &self, destination: &mut Array2<Complex64>, source: usize, update: &[Complex64], scale: f64, ) -> Result<()>
pub fn insert_patch_adjoint_at_offset( &self, destination: &mut Array2<Complex64>, source: usize, update: &[Complex64], scale: f64, offset: FourierOffset, ) -> Result<()>
pub fn validate_source_offset( &self, source: usize, offset: FourierOffset, ) -> Result<()>
pub fn frame_gain(&self, frame: usize) -> Result<f64>
pub fn background_value(&self, frame: usize, pixel: usize) -> Result<f64>
pub fn validate(&self) -> Result<()>
Trait Implementations§
Source§impl Clone for ImagePlaneModel
impl Clone for ImagePlaneModel
Source§fn clone(&self) -> ImagePlaneModel
fn clone(&self) -> ImagePlaneModel
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ImagePlaneModel
impl Debug for ImagePlaneModel
Source§impl<'de> Deserialize<'de> for ImagePlaneModel
impl<'de> Deserialize<'de> for ImagePlaneModel
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ImagePlaneModel
impl RefUnwindSafe for ImagePlaneModel
impl Send for ImagePlaneModel
impl Sync for ImagePlaneModel
impl Unpin for ImagePlaneModel
impl UnsafeUnpin for ImagePlaneModel
impl UnwindSafe for ImagePlaneModel
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
Mutably borrows from an owned value. Read more