Skip to main content

TermKind

Enum TermKind 

Source
pub enum TermKind {
Show 30 variants Spot { field: FieldSel, wave: Option<usize>, rings: usize, reference: RmsRef, quad: Quad, axis: SpotAxis, }, Wavefront { field: FieldSel, wave: Option<usize>, rings: usize, reference: RmsRef, quad: Quad, }, Mtf { field: FieldSel, wave: Option<usize>, n: Option<usize>, freq: f64, dir: MtfDir, kind: MtfKind, target: f64, }, Paraxial { q: ParaxQ, wave: Option<usize>, target: f64, }, Centroid { field: FieldSel, wave: Option<usize>, rings: usize, y: bool, target: f64, }, Ray { field: FieldSel, wave: Option<usize>, px: f64, py: f64, surf: Option<usize>, q: RayQ, target: f64, }, ParaxRay { field: FieldSel, wave: Option<usize>, px: f64, py: f64, surf: usize, q: RayQ, target: f64, }, RayPath { field: FieldSel, wave: Option<usize>, px: f64, py: f64, surf: usize, to: usize, q: RayQ, upper: Option<bool>, target: f64, }, Opd { field: FieldSel, wave: Option<usize>, px: f64, py: f64, target: f64, }, Zernike { field: FieldSel, wave: Option<usize>, kind: ZernKind, term: usize, fit: Option<usize>, n: usize, target: f64, }, Energy { field: FieldSel, wave: Option<usize>, n: Option<usize>, method: EnergyMethod, shape: EnergyShape, center: EnergyCenter, q: EnergyQ, target: f64, }, Spread { term: Box<TermKind>, target: f64, }, Diff { a: usize, b: usize, term: Box<TermKind>, target: f64, }, Param { param: Param, target: f64, }, Strehl { field: FieldSel, wave: Option<usize>, n: Option<usize>, target: f64, }, Illum { field: FieldSel, wave: Option<usize>, n: Option<usize>, relative: bool, target: f64, }, Coupling { wave: Option<usize>, opts: FiberOpts, target: f64, }, Thickness { surf: usize, to: usize, target: f64, edge: Option<f64>, clear: bool, axis: EdgeAxis, each: Option<Each>, }, Surface { surf: usize, q: SurfQ, x: f64, y: f64, wave: Option<usize>, target: f64, }, Cardinal { from: usize, to: usize, q: CardQ, wave: Option<usize>, target: f64, }, FNum { field: FieldSel, wave: Option<usize>, sag: bool, target: f64, }, Seidel { surf: usize, q: SeidelQ, wave: Option<usize>, target: f64, }, Distortion { wave: Option<usize>, absolute: bool, field: Option<FieldSel>, reference: Option<FieldSel>, mode: DistMode, abcd: Option<[f64; 4]>, component: DistComp, target: f64, }, Longitudinal { wave: Option<usize>, wave2: Option<usize>, zone: f64, target: f64, }, LateralColor { wave: Option<usize>, wave2: usize, target: f64, }, SurfEach { q: SurfQ, surf: usize, to: usize, upper: bool, target: f64, }, Shape { surf: usize, q: ShapeQ, target: f64, }, Volume { surf: usize, to: usize, mass: bool, clear: bool, cylinder: bool, target: f64, }, Calc { op: CalcOp, args: Vec<CalcArg>, target: f64, }, User(UserTermRef),
}
Expand description

項の種類

Variants§

§

Spot

RMS スポット半径 [レンズ単位]。wave None なら重みのある全波長。quad は瞳の求積の点の置き方、axis は測る向き

Fields

§field: FieldSel
§rings: usize
§reference: RmsRef
§quad: Quad
§

Wavefront

RMS 波面収差 [波]。wave None なら重みのある全波長(波長ごとの分散を波長の重みで平均)

Fields

§field: FieldSel
§rings: usize
§reference: RmsRef
§quad: Quad
§

Mtf

周波数 freq [cycles/mm] の MTF − target(n は瞳の標本数、kind は求め方 MtfKind)

Fields

§field: FieldSel
§freq: f64
§kind: MtfKind
§target: f64
§

Paraxial

近軸量 − target(System::paraxial)。ズーム軌跡の焦点距離・倍率の条件。wave(0 始まり)は efl・pimh だけに 書け、その波長を主波長にした系の値(OpticStudio の EFFL・PIMH の Wave)。None は主波長

Fields

§target: f64
§

Centroid

像面の光束の重心の x(y が false)か y − target [レンズ単位]。光線・重みはスポットの項と同じ(ガウス求積、 rings、wave None なら重みのある全波長)。けられた光線は除く。鏡で像点を合わせる補償など

Fields

§field: FieldSel
§rings: usize
§target: f64
§

Ray

1 本の実光線の量 − target。視野 field・正規化瞳座標 (px, py)・波長 wave(None なら主波長)の光線を 面 surf(None なら像面)まで追い、その面の局所座標での値(RayQ)。光線が止まると評価できない

Fields

§field: FieldSel
§px: f64
§py: f64
§target: f64
§

ParaxRay

1 本の近軸光線の面 surf での量 − target(q は x・y・z・l・m・n・r・nl・nm・nn・tanx・tany。OpticStudio の PARX〜PATY)。微分は差分

Fields

§field: FieldSel
§px: f64
§py: f64
§surf: usize
§target: f64
§

RayPath

1 本の光線の面 surf から to までの量 − target(微分は差分)。q は opth(面の間の光路長、OpticStudio の PLEN)か、 aoi・aoe(面ごとの入射角・射出角 [度] を target と比べ、はみ出しの和 + target。upper は上限か。MXRI・MNRI・ MXRE・MNRE)

Fields

§field: FieldSel
§px: f64
§py: f64
§surf: usize
§upper: Option<bool>
§target: f64
§

Opd

1 本の光線の OPD [波] − target(lensbench_analysis::analysis::opd、参照球の中心は主波長の主光線。OpticStudio の OPDC)

Fields

§field: FieldSel
§px: f64
§py: f64
§target: f64
§

Zernike

Zernike 係数 [波] − target(lensbench_analysis::analysis::zernike、自波長の主光線基準、格子 n × n)。term は 1 始まり。 fit は当てはめる項の数(term 以上。None は term と 37 の大きい方)

Fields

§field: FieldSel
§term: usize
§target: f64
§

Energy

包囲エネルギー(lensbench_analysis::energy)の量 q − target。形 shape・中心 center、光量の分布は method、 wave None なら重みのある全波長(OpticStudio の GENC・GENF・DENC・DENF)

§

Spread

1 つの値の項 term の、問題のすべての構成での値の最大 − 最小 − target(term の目標は使わない。OpticStudio の ZTHI は 厚みの項の広がりの max)。微分は差分(変数ごとにすべての構成の系をずらす)

Fields

§target: f64
§

Diff

1 つの値の項 term の、構成 a の値 − 構成 b の値 − target(0 始まり。光束の間の光路長の差など。term の目標は使わない)。 微分は差分(変数ごとにすべての構成の系をずらす)

Fields

§target: f64
§

Param

系のパラメータ(System::get_param、面の厚み・曲率・多重構成の値など)の値 − target。項の構成の系で求めるので、 多重構成の値は構成ごとの項になる(OpticStudio の MCOV・MCOG・MCOL)。微分は差分

Fields

§param: Param
§target: f64
§

Strehl

ストレール比 − target(lensbench_analysis::energy::strehl、wave None なら重みのある全波長、n は瞳の格子で None は 自動。OpticStudio の STRH)

Fields

§field: FieldSel
§target: f64
§

Illum

視野 field の像点の照度の量 − target(lensbench_analysis::illum、波長 wave、None は主波長、n は瞳の縁の点の数)。 relative なら軸上の像点に対する相対照度、でなければ実効 F ナンバー(OpticStudio の RELI・EFNO)

Fields

§field: FieldSel
§relative: bool
§target: f64
§

Coupling

単一モードファイバへの結合効率(偏光なし)− target(lensbench_analysis::fiber::fiber_coupling、有限物体の系)

Fields

§target: f64
§

Thickness

面 surf から to までの中心の厚みの和 [レンズ単位] − target(surf == to なら 1 面の厚み。OpticStudio の CTVA・TTHI)。 edge が Some(z) なら縁の厚み(面 i と i + 1 の矢高を、それぞれの面の形が終わる半径(クリア半径 + チップゾーン)× z の高さで。OpticStudio の ETVA の Mode 0)。clear なら矢高をクリア半径 × z で測る(ETVA の Mode 1)。axis は矢高を 測る向き(面の局所座標、ETVA の Code)。each なら面ごとの厚みを target と比べたはみ出しの和(Each)。面の番号は System の面の番号(物体面 0)

Fields

§surf: usize
§target: f64
§edge: Option<f64>
§clear: bool
§each: Option<Each>
§

Surface

面 surf の量 − target(SurfQ。(x, y) は矢高・厚みを測る点 [レンズ単位])。微分は差分

Fields

§surf: usize
§wave: Option<usize>

波長(power・ynip・index だけ。None は主波長)

§target: f64
§

Cardinal

面 from から to(1 始まり、to は像面の手前まで)の近軸の系の基点・焦点距離 − target(CardQ、波長 wave、 None は主波長)。微分は差分

Fields

§from: usize
§target: f64
§

FNum

視野 field・波長 wave(None は主波長)の実光線の F ナンバー − target(tan は瞳の y の縁、sag は x の縁の光線。 OpticStudio の TFNO・SFNO)。微分は差分

Fields

§field: FieldSel
§sag: bool
§target: f64
§

Seidel

面 surf(0 は全部の面の和)のザイデル収差係数 [波] − target(SeidelQ、波長 wave、None は主波長。 OpticStudio の SPHA・COMA・ASTI・FCUR・DIST(面の寄与))。微分は差分

Fields

§surf: usize
§target: f64
§

Distortion

主光線の実光線の歪曲 − target(absolute なら長さ [レンズ単位]、でなければ予測の像高に対する %)。微分は差分。 DistMode::At は視野 field(None は正規化視野 (0, 1))の、基準の視野 reference(None は軸上、近軸主光線の倍率) からの一般の歪曲(lensbench_core::seidel::distortion_at。OpticStudio の DIST の Surf 0 と Absolute、DISG)。 DistMode::Max は軸上から field までの絶対値の最大(DIMX)、DistMode::FTheta は校正した f-θ 歪曲(DISC)、 DistMode::Coef は基準の視野でのグリッド歪曲の A〜D(ABCD)。abcd を与えると基準での J の代わりに使い、 component で動径・x・y を選ぶ(DISA)

Fields

§absolute: bool
§reference: Option<FieldSel>
§abcd: Option<[f64; 4]>
§component: DistComp
§target: f64
§

Longitudinal

軸上の光線(zone 0 は近軸周辺光線、ほかは正規化瞳座標 (0, zone) の実光線)が光軸を横切る点の、像面からの距離 [レンズ単位] − target(波長 wave、None は主波長。OpticStudio の LONA)。wave2 があればその波長の距離との差 (wave2 − wave、AXCL)。微分は差分

Fields

§wave2: Option<usize>
§zone: f64
§target: f64
§

LateralColor

最大の視野の近軸主光線の像面での高さの、波長 wave2 と wave(None は主波長)の差 [レンズ単位] − target (OpticStudio の LACL)。微分は差分

Fields

§wave2: usize
§target: f64
§

SurfEach

面 surf から to までの量 q(半直径 SurfQ::Semi か、面の後のガラスの nd・νd・ΔPgF・価格・熱膨張係数)を面ごとに target と比べ、はみ出しを足した値 − target(upper なら上限、でなければ下限。値は target ± Σ はみ出し。ガラスの量は ガラスの面だけ。OpticStudio の MXSD・MNSD・MNIN・MXIN・MNAB・MXAB・MNPD・MXPD)。微分は差分

Fields

§surf: usize
§upper: bool
§target: f64
§

Shape

面 surf の形の量 − target(ShapeQ: 傾けた向きの矢高・最適球。OpticStudio の TSAG・BFSD)。微分は差分

Fields

§surf: usize
§target: f64
§

Volume

面 surf から to までの要素の体積 [cm³](mass なら硝材の要素だけの質量 [g]、密度はカタログ)− target。面 i の要素は 面 i と i + 1 の間(空気の間も含む)。外径は 2 面の半径の大きい方(clear ならクリア半径、でなければ玉の半径 SurfQ::MechDiam の半分)で、面はクリア半径の外で縁の高さのまま平ら。面の局所座標で数値積分(OpticStudio の VOLU・TMAS)。微分は差分

Fields

§surf: usize
§mass: bool
§clear: bool
§cylinder: bool

面 surf から to + 1 を包む最小の円柱(頂点の間の厚みの和 × π 半径の最大²、OpticStudio の CVOL)

§target: f64
§

Calc

計算の項: 引数(1 つの値の項の値か定数)の op − target(OpticStudio の SUMM・OSUM・DIFF・PROD・DIVI・ABSO・SQRT・RECI、 CONS は定数の引数)。引数の項の target は使わない(値そのもの)。微分は差分

Fields

§args: Vec<CalcArg>
§target: f64
§

User(UserTermRef)

利用者の項(残差はそのまま。目標との差は利用者の関数の中でとる)

Implementations§

Source§

impl TermKind

Source

pub fn target(&self) -> Option<f64>

1 つの値と目標の差を残差にする項の目標

Trait Implementations§

Source§

impl Clone for TermKind

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 Debug for TermKind

Source§

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

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

impl PartialEq for TermKind

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 TermKind

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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,