1use ndarray::{Array2, Array3};
2use num_complex::Complex64;
3use std::f64::consts::PI;
4
5#[derive(Clone, Debug)]
7pub struct PSF {
8 pub data: Array3<f64>,
10 pub spacing: [f64; 3],
12 pub wavelength: f64,
14 pub numerical_aperture: f64,
16}
17
18#[derive(Clone, Debug)]
20pub struct OpticalParameters {
21 pub na: f64,
23 pub wavelength: f64,
25 pub refractive_index: f64,
27}
28
29impl Default for OpticalParameters {
30 fn default() -> Self {
31 Self {
32 na: 1.4,
33 wavelength: 0.532, refractive_index: 1.518, }
36 }
37}
38
39pub type Wavefront = Array2<Complex64>;
41
42pub type Phase = Array2<f64>;
44
45pub mod constants {
47 use super::*;
48
49 pub const TWO_PI: f64 = 2.0 * PI;
50 pub const SQRT_2: f64 = std::f64::consts::SQRT_2;
51 pub const DEFAULT_GRID_SIZE: usize = 64;
52}