pub struct Pupil {
pub values: Array2<Complex64>,
pub support: Vec<bool>,
}Fields§
§values: Array2<Complex64>§support: Vec<bool>Implementations§
Source§impl Pupil
impl Pupil
pub fn new(values: Array2<Complex64>, support: Vec<bool>) -> Result<Self>
Sourcepub fn circular(
shape: (usize, usize),
sampling: &Sampling,
optics: &Optics,
) -> Result<Self>
pub fn circular( shape: (usize, usize), sampling: &Sampling, optics: &Optics, ) -> Result<Self>
Builds a sampled circular pupil from microscope optics.
Samples outside sqrt(kx^2 + ky^2) <= 2 pi NA / lambda are set to zero.
Inside the support, optional defocus contributes the paraxial phase
-z * (kx^2 + ky^2) / (2 k0), where k0 = 2 pi n / lambda.
If crate::experiment::PupilAberration is present, this method adds
crate-specific phase terms
astigmatism * rho^2 * cos(2 theta),
coma * (3 rho^3 - 2 rho) * cos(theta), and
spherical * (6 rho^4 - 6 rho^2 + 1), with amplitude
exp(-edge_apodization * rho^2). These coefficients are direct radian
weights, not normalized Zernike coefficients.
pub fn shape(&self) -> (usize, usize)
pub fn apply_support(&mut self)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Pupil
impl<'de> Deserialize<'de> for Pupil
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 Pupil
impl RefUnwindSafe for Pupil
impl Send for Pupil
impl Sync for Pupil
impl Unpin for Pupil
impl UnsafeUnpin for Pupil
impl UnwindSafe for Pupil
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