pub struct Beam {
pub nx: usize,
pub ny: usize,
pub dx: f64,
pub dy: f64,
pub x0: f64,
pub y0: f64,
pub wl: f64,
pub index: f64,
pub pilot: Pilot,
pub w: f64,
pub dir: f64,
pub u: Vec<C64>,
}Expand description
平面の上の複素振幅の場
Fields§
§nx: usize§ny: usize§dx: f64§dy: f64§x0: f64格子の中心(標本 i の x は x0 + (i − (nx − 1)/2)·dx)
y0: f64§wl: f64真空の波長 [mm]
index: f64媒質の屈折率
pilot: Pilot§w: f64パイロットの Gauss ビームの半径 [mm](出力のパイロットの曲率を決めるだけ)
dir: f64局所座標の z の向きに対する伝搬の向き(+1 / −1。鏡の後は −1)
u: Vec<C64>パイロットを除いた場(行優先: [iy·nx + ix])。伝搬の途中の作業用の形(間隔 dx・dy が伝搬で変わるので
座標は x0・dx から作る)。結果として渡すときは Beam::grid(座標の並びつきの lensbench_core::grid::Grid2)
Implementations§
Source§impl Beam
impl Beam
Sourcepub fn from_fn(
n: (usize, usize),
d: (f64, f64),
c: (f64, f64),
wl: f64,
index: f64,
pilot: Pilot,
f: impl Fn(f64, f64) -> C64,
) -> Beam
pub fn from_fn( n: (usize, usize), d: (f64, f64), c: (f64, f64), wl: f64, index: f64, pilot: Pilot, f: impl Fn(f64, f64) -> C64, ) -> Beam
関数 f(x, y)(パイロットを除いた場)から作る。w は Beam::rms_width で決める
pub fn x(&self, i: usize) -> f64
pub fn y(&self, j: usize) -> f64
Sourcepub fn pilot_phase(&self, x: f64, y: f64) -> f64
pub fn pilot_phase(&self, x: f64, y: f64) -> f64
パイロットの位相 [rad]
Sourcepub fn irradiance_grid(&self) -> Grid2
pub fn irradiance_grid(&self) -> Grid2
照度 |u|² を座標の並びつきの格子で
Sourcepub fn irradiance(&self) -> Vec<f64>
pub fn irradiance(&self) -> Vec<f64>
照度 |u|²(行優先)
Sourcepub fn phase_step(&self) -> f64
pub fn phase_step(&self) -> f64
格子の隣り合う標本の、パイロットを除いた位相の差の最大 [rad](照度が最大の 1e-3 倍以上の所だけ)。 π に近いと標本化が足りない
Sourcepub fn apply_aperture(&mut self, ap: Aperture, ss: usize)
pub fn apply_aperture(&mut self, ap: Aperture, ss: usize)
開口を掛ける(開口の外は 0。縁の画素は ss × ss の副標本で面積の割合を掛ける)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Beam
impl RefUnwindSafe for Beam
impl Send for Beam
impl Sync for Beam
impl Unpin for Beam
impl UnsafeUnpin for Beam
impl UnwindSafe for Beam
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
Converts
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> ⓘ
Converts
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