Optical Analysis Dashboard: Modeling Guide
The implementation follows a right-handed coordinate system with light propagating in the +Z direction. The optical axis lies along Z; heights are measured in Y (meridional plane) and X (sagittal plane). Surface vertices are located at positions $z_k$ along the axis.
Surface sag is computed for conic sections parameterized by radius of curvature $R$ and conic constant $K$:
where $c = 1/R$ is the curvature and $r = \sqrt{x^2 + y^2}$ is the radial distance from the axis. The conic constant determines surface type:
The surface gradient, required for normal computation:
The unit surface normal at point $(x, y, z)$:
A ray with origin $(x_0, y_0, z_0)$ and direction cosines $(L, M, N)$ intersects the conic surface at parameter $t$ satisfying:
Substituting into the conic equation yields a quadratic in $t$:
where, with $G = 1 + K$ and surface vertex at $z = z_v$:
The smallest positive root gives the intersection distance. Convergence threshold is $10^{-10}$ mm.
At each surface, the ray direction is updated according to Snell's law in vector form. Given incident direction $\hat{d}$, surface normal $\hat{n}$, and refractive indices $n_1, n_2$:
where:
Total internal reflection occurs when $\eta^2(1 - \cos^2\theta_i) > 1$.
For mirror surfaces:
Chromatic dispersion is modeled using the Cauchy approximation derived from the Abbe V-number. Given $n_d$ at the d-line (587.56 nm) and Abbe number $V_d$:
The Cauchy dispersion formula:
Coefficients are determined by:
Standard Fraunhofer lines: $\lambda_F = 486.13$ nm, $\lambda_d = 587.56$ nm, $\lambda_C = 656.27$ nm.
For first-order analysis, paraxial rays are traced using the matrix formalism. At each surface:
where $\phi = c(n_2 - n_1)$ is the surface power and $u$ is the paraxial ray angle.
where $t$ is the axial distance to the next surface.
From the marginal and chief ray traces:
where $y_1$ is the entrance pupil semi-diameter and $u_k'$ is the final marginal ray angle.
where $y_k$ is the marginal ray height at the last surface.
The optical path length along a ray is accumulated as:
where $n_i$ is the refractive index and $d_i$ is the geometric path length in each medium.
The optical path difference is computed relative to a reference sphere centered on the chief ray intersection with the image surface. The reference sphere passes through the center of the exit pupil (Welford convention).
expressed in waves at the reference wavelength. Here $(x_p, y_p)$ are normalized pupil coordinates.
computed after piston removal (mean subtraction).
Third-order aberrations are computed using the Hopkins-Welford formulation with Abbe invariants.
where $y, u$ are marginal ray height and angle; $\bar{y}, \bar{u}$ are chief ray height and angle.
This quantity is conserved through the system.
The five Seidel aberration coefficients at each surface:
where $\Delta(u/n) = u'/n' - u/n$ is the change in $u/n$ at the surface.
where $V$ is the Abbe number of the material.
The wavefront is decomposed into Zernike polynomials using Noll ordering with standard normalization.
where $(n, m)$ are the radial and azimuthal indices corresponding to Noll index $j$.
where $\delta_{m0} = 1$ if $m = 0$, else $0$.
| $j$ | $n$ | $m$ | Name | $Z_j(\rho,\theta)$ |
|---|---|---|---|---|
| 1 | 0 | 0 | Piston | $1$ |
| 2 | 1 | 1 | Tilt X | $2\rho\cos\theta$ |
| 3 | 1 | -1 | Tilt Y | $2\rho\sin\theta$ |
| 4 | 2 | 0 | Defocus | $\sqrt{3}(2\rho^2 - 1)$ |
| 5 | 2 | -2 | Astigmatism 45° | $\sqrt{6}\rho^2\sin 2\theta$ |
| 6 | 2 | 2 | Astigmatism 0° | $\sqrt{6}\rho^2\cos 2\theta$ |
| 7 | 3 | -1 | Coma Y | $\sqrt{8}(3\rho^3 - 2\rho)\sin\theta$ |
| 8 | 3 | 1 | Coma X | $\sqrt{8}(3\rho^3 - 2\rho)\cos\theta$ |
| 11 | 4 | 0 | Primary Spherical | $\sqrt{5}(6\rho^4 - 6\rho^2 + 1)$ |
| 22 | 6 | 0 | Secondary Spherical | $\sqrt{7}(20\rho^6 - 30\rho^4 + 12\rho^2 - 1)$ |
| 37 | 8 | 0 | Tertiary Spherical | $3(70\rho^8 - 140\rho^6 + 90\rho^4 - 20\rho^2 + 1)$ |
Coefficients $a_j$ are determined by minimizing:
Solved via the normal equations $(Z^T Z)\vec{a} = Z^T \vec{W}$.
where $j_0 = 4$ excludes piston and tilt (alignment terms).
PSF computation assumes scalar Fraunhofer diffraction. The exit pupil field is modeled as uniform amplitude with phase determined by the OPD map.
where $A(\xi, \eta) = 1$ inside the pupil, $0$ outside, and $W$ is in waves.
computed using a 2D FFT with appropriate zero-padding.
For small aberrations, the Maréchal approximation:
where $\sigma_W$ is the RMS wavefront error in waves.
This is the radius to the first dark ring of the diffraction-limited PSF.
Equivalently, the OTF is the autocorrelation of the pupil function:
normalized such that $\text{MTF}(0) = 1$.
For a circular pupil with no aberrations:
where $\nu = f/f_{\text{cutoff}}$ is the normalized spatial frequency.
in cycles per unit length (typically lp/mm).
Where do rays from a point source land on the image plane? The spot diagram answers this in geometric-optics terms, ignoring diffraction entirely.
The RMS spot radius is computed as:
The Airy disk reference circle has radius $r_{\text{Airy}} = 1.22\lambda F/\#$.
Energy distribution within the spot. The diagram shows ray intersections, not intensity. A tight cluster of rays at spot center may contain less energy than the sparse periphery if pupil apodization varies. The Airy disk overlay provides scale but does not indicate whether the system is diffraction-limited.
Spot diagrams are fast. Use them for initial sensitivity studies, tolerance allocation previews, and sanity checks during optimization. When the spot is more than $3\times$ the Airy disk, geometric metrics dominate; when it approaches the Airy disk, transition to PSF/MTF analysis.
What is the shape of the wavefront emerging from the exit pupil? The OPD map answers this as a height function over the pupil, in units of wavelength.
The wavefront is characterized by:
Key metrics derived from the OPD:
The pupil amplitude distribution. Standard OPD analysis assumes uniform illumination. Real systems with Gaussian beams, apodized pupils, or vignetting have amplitude variations that affect PSF shape independently of phase errors. The Zernike decomposition assumes a circular, uniformly-weighted pupil.
The OPD map is the bridge between geometric aberrations and diffraction performance. Use it to identify aberration type (Zernike decomposition), assess correction strategy (which terms are correctable in post-processing or by active optics), and predict alignment sensitivity (tip/tilt and coma are first-order alignment errors).
What is the intensity distribution in the image of a point source? The PSF answers this including diffraction effects, and is the true impulse response of the optical system.
The PSF is computed via:
The Strehl ratio relates peak intensity to wavefront quality:
Detector sampling effects. The displayed PSF assumes continuous irradiance; finite pixel size convolves this with a rect function. Nyquist considerations for the detector are separate from optical PSF quality. The logarithmic display compresses dynamic range but can obscure subtle sidelobe structure at linear scale.
PSF is the ground truth for resolved imaging. Compare the displayed PSF against application requirements: is the core symmetric? Are sidelobes below the noise floor? Does the encircled energy at a given radius meet spec? For laser systems, PSF peak and width directly determine focused spot performance.
What fraction of object contrast survives as a function of spatial frequency? The MTF answers this as a curve from DC (unity) to the diffraction cutoff (zero).
The MTF is the magnitude of the OTF:
Key reference frequencies:
where $p$ is the detector pixel pitch.
Phase transfer. MTF is the modulus of the optical transfer function; the phase component (PTF) describes spatial shifts that can produce edge ringing or asymmetric blur. Coma and other odd aberrations have significant PTF signatures that MTF alone does not reveal.
MTF is the preferred specification metric for imaging systems with well-defined spatial frequency requirements. Use MTF50 (frequency at 50% contrast) for general resolution comparisons, MTF at Nyquist for detector-matched systems, and area under the MTF curve for weighted sharpness. Always evaluate at multiple field positions.
Each visualization in this dashboard represents a partial projection of the system's optical state. The spot diagram shows geometric ray behavior without diffraction. The OPD map shows wavefront shape without amplitude. The PSF shows monochromatic response without spectral weighting. The MTF shows contrast transfer without phase.
The canonical example: correcting spherical aberration improves RMS wavefront error but introduces a characteristic MTF dip at mid-frequencies before recovering near cutoff. A system optimized purely for RMS may fail an MTF floor specification even though it exceeds an RMS ceiling specification. The plots must be read together.
For small aberrations, these metrics are related:
As aberrations grow beyond $\lambda/10$ RMS, this relationship breaks down and the specific aberration distribution matters. Spherical aberration, coma, and astigmatism with identical RMS produce very different MTF curves.
Aberration content determines how many resolution elements can be recovered across the field. Severe field curvature may require multiple focal planes or curved detectors. Distortion affects geometric fidelity but not local resolution. The sampling analysis must match the aberration regime: a system dominated by coma requires finer angular sampling than one dominated by defocus.
First-order alignment errors introduce specific aberration signatures:
An OPD map that shows unexpected coma at the center field position suggests alignment error, not design deficiency. The Zernike decomposition assists in distinguishing alignment-induced aberrations from residual design aberrations.
Surface figure errors and material inhomogeneity add to the design wavefront. As-built performance is the convolution of design OPD with fabrication OPD:
A design that consumes the entire wavefront error budget leaves no margin for manufacturing; typical practice reserves 50-70% of the budget for fabrication contributions. This dashboard shows design-only performance; system leads must apply appropriate margin.
The transition criterion is the ratio of geometric blur to Airy disk diameter:
In the transition regime, neither domain fully applies. Both geometric and diffraction analyses should be consulted, and specifications should be stated in terms of the metric that most directly maps to application requirements. For detector-limited systems, ensquared energy within a pixel may be more relevant than either spot size or Strehl.