pub struct Optics {
pub wavelength_vacuum_m: f64,
pub objective_na: f64,
pub magnification: f64,
pub camera_pixel_size: f64,
pub illumination_refractive_index: f64,
pub objective_medium_refractive_index: f64,
pub defocus_distance: Option<f64>,
pub pupil_aberration: Option<PupilAberration>,
}Expand description
Physical microscope parameters in SI units.
The sample-plane detector pitch must satisfy the coherent-field sampling invariant
camera_pixel_size / magnification < wavelength_vacuum_m / (2 * objective_na).
Equality is rejected because the circular pupil cutoff would lie on the one-sided discrete Nyquist boundary.
§References
§Example
use fpm_rs::experiment::Optics;
let optics = Optics {
wavelength_vacuum_m: 532e-9,
objective_na: 0.1,
magnification: 4.0,
camera_pixel_size: 6.5e-6,
illumination_refractive_index: 1.0,
objective_medium_refractive_index: 1.0,
defocus_distance: None,
pupil_aberration: None,
};
optics.validate()?;
assert_eq!(optics.object_pixel_size(), 6.5e-6 / 4.0);Fields§
§wavelength_vacuum_m: f64Illumination wavelength in vacuum, in metres.
objective_na: f64Objective numerical aperture; must not exceed Self::objective_medium_refractive_index.
magnification: f64Lateral image magnification, as a positive dimensionless ratio.
camera_pixel_size: f64Physical detector-pixel pitch in metres.
After division by Self::magnification, this must be strictly less
than wavelength_vacuum_m / (2 * objective_na).
illumination_refractive_index: f64Refractive index between illumination sources and the sample.
objective_medium_refractive_index: f64Refractive index in the objective-side medium.
defocus_distance: Option<f64>Axial sample displacement from the focal plane in metres.
pupil_aberration: Option<PupilAberration>Optional sampled-pupil aberration model.
Coefficients are interpreted by crate::model::Pupil::circular as
crate-specific radial-polynomial weights in radians, not as normalized
Zernike coefficients.
Implementations§
Source§impl Optics
impl Optics
Sourcepub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Validates positive finite physical parameters, coherent-field sampling,
objective-medium compatibility, finite optional defocus, and the optional
PupilAberration.
Coherent-field sampling requires
camera_pixel_size / magnification < wavelength_vacuum_m / (2 * objective_na).
Equality is invalid because it places the pupil cutoff on the discrete
Nyquist boundary.
Sourcepub fn object_pixel_size(&self) -> f64
pub fn object_pixel_size(&self) -> f64
Returns the sample-plane pixel pitch camera_pixel_size / magnification, in metres.
Sourcepub fn illumination_wavenumber(&self) -> f64
pub fn illumination_wavenumber(&self) -> f64
Returns 2π n_illumination / wavelength_vacuum, in radians per metre.
Sourcepub fn objective_medium_wavenumber(&self) -> f64
pub fn objective_medium_wavenumber(&self) -> f64
Returns the objective-medium angular wavenumber in radians per metre.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Optics
impl<'de> Deserialize<'de> for Optics
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>,
Auto Trait Implementations§
impl Freeze for Optics
impl RefUnwindSafe for Optics
impl Send for Optics
impl Sync for Optics
impl Unpin for Optics
impl UnsafeUnpin for Optics
impl UnwindSafe for Optics
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