confocal_axial_response — OPTICS confocal 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.confocal_axial_response(z_min_um: 'float' = -40.0, z_max_um: 'float' = 40.0, n_points: 'int' = 401, wavelength_nm: 'float' = 550.0, numerical_aperture: 'float' = 0.2, n_medium: 'float' = 1.0, longitudinal_sa_um: 'float' = 0.0, target: 'str' = 'mirror') -> 'np.ndarray' (to call the implementation directly, import chromconf; chromconf.confocal_axial_response(z_min_um: 'float' = -40.0, z_max_um: 'float' = 40.0, n_points: 'int' = 401, wavelength_nm: 'float' = 550.0, numerical_aperture: 'float' = 0.2, n_medium: 'float' = 1.0, longitudinal_sa_um: 'float' = 0.0, target: 'str' = 'mirror') -> 'np.ndarray'; from the registry, opsoptics.get("confocal_axial_response"))

Usage

Axial response I(z) of a confocal microscope (detected intensity against the defocus z [µm]) as pairs.

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

target="mirror"(平らな鏡面)は I = [sin(u/2)/(u/2)]²、"point"(点の散乱体・粗面の散乱成分)は I = [sin(u/4)/(u/4)]⁴、u = 8π n z sin²(α/2)/λ(Corle–Chou–Kino 1986、Wilson & Sheppard 1984)。瞳は cos θ で一様な重み(この重みで上の式は高 NA でも厳密)。鏡面の FWHM は FWHM_X_MIRROR λ / (π n (1 − cos α)) ≈ 0.886 n λ / NA²(近軸)—— λ/NA² に比例。

longitudinal_sa_um(縁の光線の焦点 − 近軸焦点、+ は遠い側)を与えると、3 次の球面収差 W ρ⁴(W = −n s² LSA/4)を瞳の位相に入れて Gauss–Legendre で積分する。応答のピークはおおよそ LSA/2 へずれ、高さは下がり幅は広がる。値は無収差のピークを 1 とした比(Strehl に相当)。

z_min_um / z_max_um / n_points: 評価する z の格子(z_min < z_max、n_points は 3〜65536)。

wavelength_nm: 波長。numerical_aperture: 媒質中の NA = n sin α(0 < NA < n_medium)。

n_medium: 焦点の側の媒質の屈折率(空気 1)。target: "mirror" か "point"。

返り値: pairs(z [µm], I)。Raises ValueError: 非有限・文字列・bool の数、NA ≤ 0 または NA ≥ n_medium、z_min ≥ z_max、未知の target。

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_chromatic_confocal — py -3.11 examples/poc_chromatic_confocal.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 (confocal)

chromatic_confocal_probe · chromatic_confocal_spectrum · chromatic_confocal_peaks · chromatic_confocal_readout · chromatic_confocal_limits


*Provenance: chromconf.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.