illumination op• Datenarten: keine → table (ein Operator, der allein durch seine Argumente bestimmt ist — er nimmt kein Bild und keine Daten entgegen)
• Aufruf: import illumdesign; illumdesign.illumination_design(surface='glossy', defect='topographic', slope_deg=10.0, part_size_mm=50.0, camera_height_mm=300.0) (oder opsoptics.get("illumination_design"))
Bewertet die Standard-Beleuchtungsfamilien für eine Oberflächen-/Defektpaarung (`table`).
> Die ausführliche Beschreibung unten ist der Originaltext — Zusammenfassung und Überschriften sind übersetzt.
Candidates: low-angle ring (dark field, elevation 20°), high-angle ring
(bright field, 70°), the elevation that :func:lighting_sweep finds best,
dome, coaxial and (for `defect="edge"`) backlight. Each is scored by the
simulated Michelson contrast of the stated defect — `topographic`: a
smooth facet of *slope_deg* (a dent wall, a bump); `scatter`: a rough
patch (chipped edge, pit, fine scratch); `pigment`: an albedo patch at
half the surround; `edge`: a silhouette — **multiplied by the uniformity
of the background radiance the camera sees** across the part (min/max over
the centre and the four edge midpoints). That second factor is what
separates a robust choice from a fragile one: coaxial light on a glossy
part gives a huge negative contrast exactly on axis (the glare) and almost
none a few millimetres away, so its background uniformity is poor and it
ranks below a dark field whose background is uniformly dark. Irradiance
uniformity is reported too. The result lists the candidates best first
with their numbers, the `recommended family, and rule_of_thumb` — the textbook
choice (a smooth facet → coaxial bright field on a glossy finish, else the
ring elevation that mirrors it into the camera; scatter → dark field; pigment →
dome; edge → backlight) so a disagreement between simulation and rule is
visible rather than hidden. Two things the numbers say that folklore does
not: a *smooth* 10° facet does not light up in dark field (it mirrors
the low light away from the camera) — the "dark field shows scratches"
rule is about their rough flanks, the `scatter` class here; and for that
class a large coaxial (bright-field) source often scores *higher* than
dark field because the rough patch appears dark on a uniform glare with
contrast near 1 (the wafer / glass inspection practice). The model does
not score sensor saturation or the glare's dependence on part flatness,
which is why the dark-field rule survives on the shop floor; the table
shows both so the choice is made with the numbers.
Jeder optics-Operator prüft seine Eingabe vor der Berechnung (nichts rutscht stillschweigend durch):
• Einheiten stecken im Argumentnamen — _mm / _um / _deg / _mrad. Eine Verwechslung von mm und µm stürzt nicht ab, sondern liefert eine plausibel aussehende falsche Antwort; der Name verhindert das. Aus der Größenordnung wird nie auf die Einheit geschlossen.
• **Strings lösen ValueError aus** — float('50') gelingt, sodass ein ungeparster Konfigurationswert als Länge durchrutschen würde (gemessen: thin_lens('50', '200') lieferte plausible 66,667 mm). bool wird als implizite Hochstufung True == 1 ebenfalls abgelehnt.
• **complex / Masked Arrays lösen ValueError aus (nur reelle Slots; das stille Verwerfen des Imaginärteils bzw. Abstreifen der Maske wird abgelehnt). NaN/Inf löst bei jeder Eingabe ValueError aus.**
• Division durch null und Verwandtes wird namentlich abgelehnt: Brennweite 0, Krümmungsradius 0, Brechzahl <= 0, undurchlässige Blende (alles 0, die Normierung wird 0/0), PSF mit Summe <= 0, Stokes-Vektor mit S0 = 0 und ein Objekt im vorderen Brennpunkt (Bild im Unendlichen).
• Nur zwei Operatoren liefern einen nicht-endlichen Wert, und beide halten das vertraglich fest: depth_of_field liefert jenseits der hyperfokalen Distanz far_mm = inf (genau das bedeutet die hyperfokale Distanz), und gaussian_beam liefert an der Taille wavefront_radius_mm = inf (der Krümmungsradius einer ebenen Wellenfront). Beide liefern zusätzlich einen endlichen Partner (far_is_infinite / curvature_per_mm). **Jedes andere stille NaN/Inf wird intern erkannt und löst ValueError aus** — "float64 ist übergelaufen" und "die Antwort ist unendlich" sind verschiedene Aussagen; die erste wird nie im Gewand der zweiten geliefert.
• Größenobergrenzen: erzeugte Gitter durch optics.MAX_GRID (4096), übergebene Felder/PSFs/Blenden durch optics.MAX_FIELD_ELEMENTS (2^24), ABCD-Elementketten durch optics.MAX_SYSTEM_ELEMENTS (1024), Zernike durch MAX_ZERNIKE_TERMS (512) / MAX_ZERNIKE_ORDER (40) / MAX_ZERNIKE_BASIS (2^25). Damit werden Pfade fail-closed geschlossen, in denen ein kleines Argument eine riesige interne Allokation auslöst (gemessen: n_max=40 × 4096² braucht 108 GB).
• Physikalisch unmögliche Zustände werden ebenfalls abgelehnt: Stokes-Vektor mit Polarisationsgrad > 1, negative Transmission, negative Intensität und ungültige Zernike-Indizes wie ungerades n-|m|.
• Leitfaden zur Familie optics_imaging
• mv_illumination_practice — 照明の実務知識 — 波長・偏光・点灯方式・外光・安全
• Katalog der Beispieldaten (Download-URLs / Lizenzen) — 2-D nutzt skimage.data (BSD/Public Domain) plus synthetische Bilder, 3-D nennt Download-URLs echter Datenquellen (Stanford, PDS, …).
• Herkunft und Literatur der Operatoren — die Quellen der Forschung/Verfahren, auf denen diese Operatorfamilie beruht.
• Der kanonische Algorithmus (Autor, Jahr) und seine Anwendungen stehen im Familienleitfaden oben.
• illumination_design_demo — py -3.11 examples/illumination_design_demo.py
table als Eingabe)abcd_matrix · wavefront_stats · paraxial_trace · seidel_coefficients · spot_stats · tolerance_analysis · wavefront_from_opd · spot_diagram
illumination)light_source · irradiance_map · illumination_uniformity · defect_contrast · lighting_sweep
*Provenance: illumdesign.py — OPTICS Operator-Registry. Diese Notiz wird von tools/opdocs.py md erzeugt (nicht von Hand bearbeiten).*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.