Skip to main content

PupilFunction

Struct PupilFunction 

Source
pub struct PupilFunction {
    pub field: FieldSel,
    pub wave: usize,
    pub ref_primary: bool,
    pub grid: PupilGrid,
    pub samples: PupilSamples,
    pub opd: Vec<f64>,
    pub mask: Vec<bool>,
    pub rays: RayBuf,
    pub chief: Trace,
    pub reference: RefSurface,
    pub amp: Vec<f64>,
}
Expand description

1 つの視野・波長の瞳関数: 格子の標本ごとの光線と OPD [波]

Fields§

§field: FieldSel§wave: usize

波長の番号

§ref_primary: bool

参照球の中心が主波長の主光線か(false なら波長 wave 自身の主光線)

§grid: PupilGrid§samples: PupilSamples§opd: Vec<f64>

標本ごとの OPD [波]((参照の主光線の光路 − 光線の光路) / λ。使えない標本の値は意味を持たない。Self::mask)

§mask: Vec<bool>

使える標本(像面に届き、OPD が有限)

§rays: RayBuf

標本の光線の列(波長 wave、crate::system::Cols::WAVE)

§chief: Trace

参照球の中心に使った主光線の追跡(ref_primary なら主波長、でなければ波長 wave)

§reference: RefSurface

OPD の基準の面

§amp: Vec<f64>

標本ごとの振幅(系のアポダイゼーション × 選んだ膜・偏光の振幅、WaveAmp。どこでも 1 なら全部 1.0)。 区間の面積の割合などの重み(samples.wt)は含まない

Implementations§

Source§

impl PupilFunction

Source

pub fn trace( s: &System, field: FieldSel, wave: Option<usize>, grid: PupilGrid, ref_primary: bool, ) -> Result<Arc<PupilFunction>>

視野 field・波長 wave(None で主波長)の格子 grid の光線を追い、OPD を求める。解析が瞳の格子の光線を追うのは ここだけ。結果は系の中にしまい([PupilCache])、同じ系・同じ引数ならもう 1 度は追わない(系を直すと捨てる)

Source

pub fn trace_amp( s: &System, field: FieldSel, wave: Option<usize>, grid: PupilGrid, ref_primary: bool, extra: Option<&dyn PupilAmp>, ) -> Result<Arc<PupilFunction>>

Self::trace に、膜・偏光の振幅 extra(PupilAmp)を足す。extra があるときはしまわない

Source

pub fn len(&self) -> usize

標本の数

Source

pub fn is_empty(&self) -> bool

Source

pub fn get(&self, q: usize) -> Option<f64>

使える標本の OPD(使えなければ None)

Source

pub fn map(&self) -> Vec<Vec<f64>>

格子の上の OPD [iy][ix](瞳の外・使えない標本は NaN)。Gauss の格子では空

Trait Implementations§

Source§

impl Debug for PupilFunction

Source§

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

Formats the value using the given formatter. Read more

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> 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, 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.