Skip to main content

PupilGrid

Enum PupilGrid 

Source
pub enum PupilGrid {
    WavefrontMap(usize),
    Interferogram(usize),
    Linear {
        n: usize,
        rim: Rim,
    },
    Cells(usize),
    Sheared {
        n: usize,
        q: [[f64; 2]; 2],
    },
    Gauss {
        rings: usize,
        arms: Option<usize>,
    },
}
Expand description

瞳の格子の種類(正規化瞳の座標)

Variants§

§

WavefrontMap(usize)

OpticStudio の Wavefront Map・Zernike の格子 p_i = (i − n/2)/(n/2 − 1)(n は 4 以上の偶数、Rim::Closed)

§

Interferogram(usize)

OpticStudio の Interferogram の格子 p_i = (i − n/2 + 1)/(n/2 − 1)(n は 4 以上の偶数、Rim::Closed)。 Wavefront Map の格子とは 1 点ずれる(OpticStudio 2026 R1 で確認)

§

Linear

−1〜1 を n − 1 等分した p_i = −1 + 2i/(n − 1)(n は 2 以上)

Fields

§rim: Rim
§

Cells(usize)

直径を n 区間に分けた区間の中心 c_i = −1 + h(i + 0.5)、h = 2/n(FFT PSF・Huygens PSF)。単位円にかかる区間だけを 使い、光線は区間の円内の部分の中心(近似)で追う。重みは区間の円内の面積の割合 ([crate::psf::cell_frac]、8×8 の小区間で数える)

§

Sheared

PupilGrid::Cells の区間の中心 c を p = q c で写した格子(像面の上の FFT PSF で、J に非対角の項があるとき。 [crate::psf::image_shear])。重みは写した区間の円内の面積の割合

Fields

§q: [[f64; 2]; 2]
§

Gauss

瞳のガウス求積: r² に Gauss-Legendre(rings)× 等間隔の角度(arms、None で 4 rings + 2)。重みの和は 1

Fields

§rings: usize

Implementations§

Source§

impl PupilGrid

Source

pub fn side(&self) -> Option<usize>

一辺の点の数(Gauss は None)

Source

pub fn check(&self) -> Result<()>

大きさを確かめる(WavefrontMap・Interferogram は 4 以上の偶数、Linear は 2 以上、Cells・Gauss は 1 以上)

Source

pub fn axis(&self) -> Option<Vec<f64>>

格子の x・y 共通の座標(番号 i の点、Cells・Sheared は区間の中心 c。Gauss は None)

Source

pub fn samples(&self) -> PupilSamples

単位円内の標本

Trait Implementations§

Source§

impl Clone for PupilGrid

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for PupilGrid

Source§

impl Debug for PupilGrid

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for PupilGrid

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for PupilGrid

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.