drawing op• Data kinds: table → table
• Call: import fullseye as fs; fs.ledger.lens_element_drawing(system, element=0, tolerances=None, outer_diameter_mm=None, clear_aperture_mm=None, chamfer_mm=0.2, irregularity_fringes=None, surface_imperfections=None, stress_birefringence=20.0, bubbles='1/3x0.16', inhomogeneity='2/1;1', trials=200, seed=0, radius_tolerance='radius', plane_power_fringes=2.0, scale=None, title=None) (to call the implementation directly, import optdraw; optdraw.lens_element_drawing(system, element=0, tolerances=None, outer_diameter_mm=None, clear_aperture_mm=None, chamfer_mm=0.2, irregularity_fringes=None, surface_imperfections=None, stress_birefringence=20.0, bubbles='1/3x0.16', inhomogeneity='2/1;1', trials=200, seed=0, radius_tolerance='radius', plane_power_fringes=2.0, scale=None, title=None); from the registry, opsoptics.get("lens_element_drawing"))
Manufacturing drawing of a single lens (table, a drawing dict) — ISO 10110 notation with a section view, the three-field data table and a title block.
> The detailed description below is the original text — the summary and the headings are translated.
*system* の *element* 番目のガラス(前から 0, 1, …)を描く。データ欄は左が第 1 面、右が第 2 面、中央が材料:
• 面: R(曲率半径、凸は CX・凹は CC、平面は ∞)と公差、⌀e(有効径)、3/A(B)(面形状の公差: A = 曲率の誤差による sag の誤差、B = 不規則性、どちらも λ = 546.07 nm の干渉縞の本数。R の公差を寸法で書くときは A を - にする —— ISO 10110-5 の慣行)、4/σ(面の傾き = 偏心の公差、分)、5/N×A (表面のきず)。
• 材料: n_d と ν_d(式で評価した値。社名の硝材名は書かない)と公差、0/(応力複屈折 nm/cm)、1/(泡と異物)、2/(不均質と脈理)。
• 図: 中心厚と公差、外径と公差、面取り(保護面取り)、光軸。
公差は raytrace.tolerance_analysis の公差の辞書(*tolerances*、既定は同じ既定値 radius_pct 0.5 / thickness_mm 0.05 / index 0.001 / tilt_deg 0.05)から写す: 中心厚 ±thickness_mm、n_d ±index、4/ = tilt_deg × 60 分、曲率の公差 radius_pct は R の ± と、有効径の縁での sag の差 |sag(R(1 ± p)) − sag(R)| を縞の本数(1 本 = λ/2)にする。*radius_tolerance* = "radius"(既定)は R の欄に ±ΔR を書いて 3/-(B) とし、縞の換算は注記に残す。"fringes" は R を公称値だけにして 3/A(B) の A に縞の本数を書く。B(不規則性、*irregularity_fringes*)の既定は "radius" で 1、"fringes" で A/4(最低 0.5)。平面は曲率の公差が無いので、A は *plane_power_fringes*(既定 2 本)。同じ公差で tolerance_analysis を回した EFL の 5〜95 % の幅を注記に入れる(*trials* 回、*seed*)—— 図の公差が光学系の何を動かすかを製作図に残すため。
返り値の values: R1 / R2 / center_thickness / outer_diameter / clear_aperture / nd / vd / fringes_power / tilt_arcmin / efl / efl_p5 / efl_p95。平面の R と、分散の無い媒質の vd は inf(非有限は契約、lens_system の規約どおり)。接合レンズ群(面が 3 つ以上のガラスの連続)は 1 枚の組図にする: 断面に各レンズと接合面、データ欄は面ごとの R・有効径と、レンズごとの材料(n_d・ν_d)と中心厚(values の R / center_thickness / nd / vd は列)。非球面・円錐面は ISO 10110-12 の sag の表(高さ h と sag z(h)、式と係数)を図に足し、values の sag_tables に同じ数を残す(門は図から読み戻して raytrace の sag の式と突き合わせる)。
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.
• 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.
• poc_optics_drawings — py -3.11 examples/poc_optics_drawings.py
table as input)abcd_matrix · wavefront_stats · sfr_from_edge · paraxial_trace · seidel_coefficients · spot_stats · tolerance_analysis · wavefront_from_opd
drawing)lens_section_drawing · vision_setup_drawing · drawing_svg · drawing_dxf · drawing_raster · svg_entities · dxf_entities · noncoaxial_drawing
*Provenance: optdraw.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.