fullseye

lens_substitute_glasses — OPTICS lensglobal op

使い方

系のモデル硝材 (n_d, V_d) を、k 番目に近いカタログ硝材に置き換える(table)。

Every surface whose medium is a model glass (an (nd, vd) pair or a raytrace.glass dict) is replaced by the k-th nearest catalogue glass (k=1 the nearest; see :func:glass_nearest for the distance and the metric). Air, plain indices and glasses that are already named are kept. The result is rebuilt through raytrace.lens_system; a last surface with t None is refocused on the new glass. Returns {"system", "table", "n_substituted", "n_kept", "metric", "k", "tolerance"}; each table row is {"surface", "model_nd", "model_vd", "glass", "nd", "vd", "PgF", "distance", "rank", "d_nd", "d_vd"}.

Fail-closed: a model glass whose k-th neighbour is farther than tolerance (in the distance of the metric) raises ValueError naming the surface; nothing is swapped partially. The input is not modified. None uses a crown/flint pair as the example.

Example::

r = lens_substitute_glasses(sys_with_model_glasses)
[(row["surface"], row["glass"], row["distance"]) for row in r["table"]]

ファミリ共通の入力契約(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

同カテゴリ(lensglobal)

glass_nearest · lens_global_search


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

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