fullseye

merit_evaluate — OPTICS lensmerit op

使い方

オペランド表を処方に当てて、各行の値・目標・重み・寄与とその割合を返す(table)。

operands is a list of rows {"op": "EFFL", "target": 50.0, "weight": 1.0, ...arguments} (see :func:merit_operands_list), or the dict :func:merit_default returns. Each row contributes (weight (value - target))^2; a one-sided row (ETGT …) contributes 0 while the bound holds. A group row (TRAN, OPDW) contributes the sum over its rays. fields (default: on axis, or 0 / 0.7 / 1.0 of the system field) and wavelengths (default the system wavelength; the primary is the one equal to it) are what the rows’ field / wavelength indices point into; a row with "all" is expanded to one row per field and wavelength, its weight times sqrt(field_weight) and sqrt(wavelength_weight) (default 1).

Returns {"table", "merit", "n_operands", "n_residuals", "dominant", "fields", "wavelengths"}. Each table row has index op label value target weight sense margin contribution percent satisfied n_residuals source args (margin is the slack of a one-sided row, negative when violated). Fail-closed: an unknown operand, a missing or unknown argument, an index out of range, a lost ray, a value that is not finite and a table of zero weights are all ValueError.

Example::

t = merit_evaluate(lens, [{"op": "EFFL", "target": 50.0}, {"op": "ETGT", "surf": 0, "target": 1.0}])
t["merit"], t["dominant"]

ファミリ共通の入力契約(fail-closed)

optics の全 op は入力を検証してから計算する(黙って通さない):

詳しい使い方ガイド

参考(サンプルデータ・文献)

実行できる例(この op を実際に呼ぶ検証済みサンプル)

型が繋がる次の op(table を入力に取れる)

abcd_matrix · wavefront_stats · sfr_from_edge · paraxial_trace · seidel_coefficients · spot_stats · tolerance_analysis · wavefront_from_opd

同カテゴリ(lensmerit)

merit_operands_list · merit_default · merit_boundary_operands · optimize_lens_operands · merit_contributions


Provenance: lensmerit.py — OPTICS operator registry. この per-op ノートは tools/opdocs.py md が自動生成(手編集しない)。

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.