multilayer_reflectance — OPTICS film op

• Data kinds: none → pairs (an op determined by its arguments alone — it takes no image or data input)

• Call: import fullseye as fs; fs.ledger.multilayer_reflectance(layers=(('SIO2', 100.0),), substrate='SI', wl_min_nm=400.0, wl_max_nm=800.0, n_points=201, angle_deg=0.0, polarization='unpolarized', na=0.0, roughness_nm=0.0, ambient=1.0, quantity='reflectance', wavelengths_nm=None) (to call the implementation directly, import filmoptics; filmoptics.multilayer_reflectance(layers=(('SIO2', 100.0),), substrate='SI', wl_min_nm=400.0, wl_max_nm=800.0, n_points=201, angle_deg=0.0, polarization='unpolarized', na=0.0, roughness_nm=0.0, ambient=1.0, quantity='reflectance', wavelengths_nm=None); from the registry, opsoptics.get("multilayer_reflectance"))

Usage

Spectral reflectance (or transmittance / absorptance) of a multilayer film as pairs (λ nm, value): the exact characteristic-matrix (transfer-matrix) solution.

> The detailed description below is the original text — the summary and the headings are translated.

layers: 入射側から順の [(材料, 厚さ nm), ...]。材料は材料表の鍵("SIO2" / "SI3N4" / "PMMA"

/ "TIO2" …)・材料レコード・実数・複素数 n + ik。空にすると基板だけ(裸の面の Fresnel)。

substrate: 基板(半無限)。既定は材料表の Si(Green 2008、k つき)。

wl_min_nm / wl_max_nm / n_points: 波長の等間隔格子。wavelengths_nm を渡せばそちらを使う(昇順)。

angle_deg: 入射角(入射側の媒質の中)。

polarization: "unpolarized"(s と p の平均)/ "s" / "p"。

na: 集光の開口数(> 0 なら法線まわりの円錐で角度平均。瞳を一様に満たす照明 = 重みは sin²θ に一様)。

angle_deg と同時には指定できない。

roughness_nm: 共形な粗さの RMS σ。R に exp(−(4π n₀ σ cos θ₀ / λ)²)(Debye–Waller)が掛かる。

ambient: 入射側の媒質(実数か材料表の鍵、透明であること)。液浸なら "WATER"。

quantity: "reflectance" / "transmittance"(基板の中へ入る割合)/ "absorptance"(層での吸収 = 1 − R − T)。

粗さ > 0 では T と A を出さない(散乱光の行き先をこのモデルは持たない → ValueError)。

返り値: (K, 2) の pairs。

真値: 1 層なら Airy の閉じた式(テストと PoC に独立に書いた式)と一致する。膜厚 0 は裸の基板の Fresnel、λ/4 の AR 膜(n = √n_sub)は設計波長で R = 0、(HL)^N の鏡は閉形式 ((1 − q)/(1 + q))²、q = (n_s/n₀)(n_H/n_L)^{2N}(H が入射側)。吸収の無い積層では R + T = 1。

>>> p = multilayer_reflectance([("SIO2", 500.0)], "SI", 400.0, 800.0, 5)

>>> p.shape

(5, 2)

Family-wide input contract (fail-closed)

Every optics op validates its input before computing (nothing slips through silently):

• Units are baked into the argument name — _mm / _um / _deg / _mrad. Confusing mm with µm does not crash; it yields a plausible-looking wrong answer, so the name prevents it. Nothing here guesses the unit from the magnitude.

• Strings raise ValueError — float('50') succeeds, so an unparsed configuration value would slip through as a length (measured: thin_lens('50', '200') returned a plausible 66.667 mm). bool is refused too, as the implicit promotion True == 1.

• complex / masked arrays raise ValueError (real-valued slots only; silently dropping the imaginary part or peeling off the mask is refused). NaN/Inf raises ValueError on every input.

• Division by zero and its relatives are refused by name: focal length 0, radius of curvature 0, refractive index <= 0, a fully opaque aperture (all zeros, so the normalisation is 0/0), a PSF whose sum is <= 0, a Stokes vector with S0 = 0, and an object sitting at the front focal point (the image is at infinity).

• Only two ops return a non-finite value, and both state it as a contract: depth_of_field returns far_mm = inf beyond the hyperfocal distance (that is what the hyperfocal distance means), and gaussian_beam returns wavefront_radius_mm = inf at the waist (the radius of curvature of a plane wavefront). Both also return a finite companion (far_is_infinite / curvature_per_mm). Any other silent NaN/Inf is detected internally and raises ValueError — "float64 overflowed" and "the answer is infinite" are different claims, so the first is never returned wearing the face of the second.

• Size caps: generated grids are capped by optics.MAX_GRID (4096); supplied fields/PSFs/apertures by optics.MAX_FIELD_ELEMENTS (2^24); ABCD element chains by optics.MAX_SYSTEM_ELEMENTS (1024); Zernike by MAX_ZERNIKE_TERMS (512) / MAX_ZERNIKE_ORDER (40) / MAX_ZERNIKE_BASIS (2^25). This closes, fail-closed, the paths where a small argument triggers a huge internal allocation (measured: n_max=40 × 4096² needs 108 GB).

• Physically impossible states are refused too: a Stokes vector with degree of polarisation > 1, negative transmittance, negative intensity, and invalid Zernike indices such as n-|m| odd.

Detailed usage guide

• optics_imaging family guide

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• poc_simcal_thin_film — py -3.11 examples/poc_simcal_thin_film.py

• poc_thin_film_reflectometry — py -3.11 examples/poc_thin_film_reflectometry.py

Ops the type connects to (they accept pairs as input)

mtf50 · energy_to_photons · spectral_product · spectral_integral · spectral_stats · kubelka_munk_reflectance · hyperspectral_capture · film_thickness_fft

Same category (film)

film_color · film_thickness_fft · film_thickness_fit · film_thickness_map


*Provenance: filmoptics.py — OPTICS operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

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