fullseye

abcd_matrix — OPTICS geometric op

使い方

Compose a paraxial system into one 2x2 ray-transfer (ABCD) matrix.

elements is a sequence of (kind, *params) in the order light meets them (the matrix product is formed right-to-left accordingly, so the list reads like the optical layout, not like the algebra):

("free", d_mm) free-space / homogeneous medium of length d >= 0 · ("lens", f_mm) thin lens of focal length f != 0 (negative = diverging) · ("mirror", r_mm) curved mirror of radius r in the unfolded system (power -2/r) · ("interface", n1, n2) flat refracting surface · ("curved", n1, n2, r_mm) curved refracting surface.

Returns a (2, 2) float64 matrix acting on the ray state [y_mm, theta_rad] — feed it to :func:abcd_trace, which handles the milliradian conversion at the API boundary.

Ground truth it reproduces exactly: a single free-space section is [[1, d], [0, 1]]; det(M) = n_in / n_out, hence exactly 1 for any system that starts and ends in the same medium (checked to ~1e-16 in the tests, and the cheapest correctness self-check you have); two thin lenses separated by d compose to the classical combined power 1/f = 1/f1 + 1/f2 - d/(f1*f2); a lens sandwiched between two free-space sections of length f gives the [[0, f], [-1/f, 0]] Fourier-transform geometry.

Raises ValueError: an empty system, more than :data:MAX_SYSTEM_ELEMENTS elements, an element that is not a sequence, an unknown kind, the wrong parameter count for a kind, a negative free-space distance (reverse the list instead of running light backwards), a zero focal length or radius, a non-positive refractive index, or any non-finite parameter.

HALCON: no equivalent (its optics stop at the pinhole camera model).

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

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

詳しい使い方ガイド

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

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

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

abcd_trace · mueller_apply

同カテゴリ(geometric)

thin_lens · abcd_trace · depth_of_field · relative_illumination


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

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