← Return to Analysis Dashboard

Notes

Optical Analysis Dashboard: Modeling Guide

A. Modeling Foundations

1. Sequential Ray Tracing Model

Coordinate System and Sign Conventions

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.

Conic Surface Geometry

Surface sag is computed for conic sections parameterized by radius of curvature $R$ and conic constant $K$:

Surface Sag
$$z(r) = \frac{cr^2}{1 + \sqrt{1 - (1+K)c^2 r^2}}$$

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:

Surface Derivative
$$\frac{\partial z}{\partial r} = \frac{cr}{\sqrt{1 - (1+K)c^2 r^2}}$$

The unit surface normal at point $(x, y, z)$:

Surface Normal
$$\hat{n} = \frac{1}{\sqrt{(\partial z/\partial x)^2 + (\partial z/\partial y)^2 + 1}} \begin{pmatrix} -\partial z/\partial x \\ -\partial z/\partial y \\ 1 \end{pmatrix}$$

Ray-Surface Intersection

A ray with origin $(x_0, y_0, z_0)$ and direction cosines $(L, M, N)$ intersects the conic surface at parameter $t$ satisfying:

Ray Equation
$$\vec{r}(t) = \vec{r}_0 + t\hat{d} = \begin{pmatrix} x_0 + tL \\ y_0 + tM \\ z_0 + tN \end{pmatrix}$$

Substituting into the conic equation yields a quadratic in $t$:

Intersection Quadratic
$$At^2 + Bt + C = 0$$

where, with $G = 1 + K$ and surface vertex at $z = z_v$:

$$A = c(L^2 + M^2) + cGN^2$$ $$B = 2c(x_0 L + y_0 M) + 2cG(z_0 - z_v)N - 2N$$ $$C = c(x_0^2 + y_0^2) + cG(z_0 - z_v)^2 - 2(z_0 - z_v)$$

The smallest positive root gives the intersection distance. Convergence threshold is $10^{-10}$ mm.

Refraction: Vector Snell's Law

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$:

Vector Snell's Law
$$\hat{d}' = \eta\hat{d} + \left(\eta\cos\theta_i - \cos\theta_t\right)\hat{n}$$

where:

$$\eta = \frac{n_1}{n_2}, \quad \cos\theta_i = -\hat{d}\cdot\hat{n}, \quad \cos\theta_t = \sqrt{1 - \eta^2(1 - \cos^2\theta_i)}$$

Total internal reflection occurs when $\eta^2(1 - \cos^2\theta_i) > 1$.

Reflection

For mirror surfaces:

Reflection
$$\hat{d}' = \hat{d} + 2\cos\theta_i \, \hat{n}$$

Dispersion Model

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$:

Abbe Number Definition
$$V_d = \frac{n_d - 1}{n_F - n_C}$$

The Cauchy dispersion formula:

Cauchy Dispersion
$$n(\lambda) = A + \frac{B}{\lambda^2}$$

Coefficients are determined by:

$$B = \frac{n_F - n_C}{\lambda_F^{-2} - \lambda_C^{-2}}, \quad A = n_d - B\lambda_d^{-2}$$

Standard Fraunhofer lines: $\lambda_F = 486.13$ nm, $\lambda_d = 587.56$ nm, $\lambda_C = 656.27$ nm.

2. Paraxial Ray Tracing

For first-order analysis, paraxial rays are traced using the matrix formalism. At each surface:

Paraxial Refraction
$$n_2 u_2 = n_1 u_1 - y\phi$$

where $\phi = c(n_2 - n_1)$ is the surface power and $u$ is the paraxial ray angle.

Paraxial Transfer
$$y_2 = y_1 + t \cdot u_1$$

where $t$ is the axial distance to the next surface.

First-Order Properties

From the marginal and chief ray traces:

Effective Focal Length
$$\text{EFL} = \frac{y_1}{-u_k'}$$

where $y_1$ is the entrance pupil semi-diameter and $u_k'$ is the final marginal ray angle.

Back Focal Length
$$\text{BFL} = \frac{-y_k}{u_k'}$$

where $y_k$ is the marginal ray height at the last surface.

F-Number and Numerical Aperture
$$F/\# = \frac{\text{EFL}}{D_{EP}}, \quad \text{NA} = n' \sin\theta' \approx |u_k'|$$

3. Wavefront and OPD Formulation

Optical Path Length

The optical path length along a ray is accumulated as:

Optical Path Length
$$\text{OPL} = \sum_i n_i \cdot d_i$$

where $n_i$ is the refractive index and $d_i$ is the geometric path length in each medium.

Reference Sphere

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).

OPD Computation

Optical Path Difference
$$W(x_p, y_p) = \frac{\text{OPL}(x_p, y_p) - \text{OPL}_{\text{chief}}}{\lambda}$$

expressed in waves at the reference wavelength. Here $(x_p, y_p)$ are normalized pupil coordinates.

RMS Wavefront Error

RMS Wavefront Error
$$\sigma_W = \sqrt{\frac{1}{N}\sum_{i=1}^{N} W_i^2}$$

computed after piston removal (mean subtraction).

Peak-to-Valley

Peak-to-Valley
$$\text{P-V} = W_{\max} - W_{\min}$$

4. Seidel Aberration Coefficients

Third-order aberrations are computed using the Hopkins-Welford formulation with Abbe invariants.

Abbe Invariants

Marginal Ray Invariant
$$A = n(u + cy)$$
Chief Ray Invariant
$$\bar{A} = n(\bar{u} + c\bar{y})$$

where $y, u$ are marginal ray height and angle; $\bar{y}, \bar{u}$ are chief ray height and angle.

Lagrange Invariant

Lagrange Invariant
$$H = n(y\bar{u} - \bar{y}u)$$

This quantity is conserved through the system.

Seidel Sums

The five Seidel aberration coefficients at each surface:

Spherical Aberration
$$S_I = -A^2 y \, \Delta\left(\frac{u}{n}\right)$$
Coma
$$S_{II} = -A\bar{A} y \, \Delta\left(\frac{u}{n}\right)$$
Astigmatism
$$S_{III} = -\bar{A}^2 y \, \Delta\left(\frac{u}{n}\right)$$
Petzval Field Curvature
$$S_{IV} = -H^2 c \frac{n' - n}{n' n}$$
Distortion
$$S_V = -\frac{\bar{A}}{A}\left(\bar{A}^2 y \, \Delta\left(\frac{u}{n}\right) + H^2 c \frac{n' - n}{n' n}\right)$$

where $\Delta(u/n) = u'/n' - u/n$ is the change in $u/n$ at the surface.

Chromatic Aberrations

Longitudinal Chromatic
$$C_L = \frac{y\phi}{V}$$
Lateral Chromatic
$$C_T = \frac{\bar{y}\phi}{V}$$

where $V$ is the Abbe number of the material.

Field Curvature Surfaces

Sagittal Field Curvature
$$\text{SFC} = S_{IV} + S_{III}$$
Tangential Field Curvature
$$\text{TFC} = S_{IV} + 3S_{III}$$

5. Zernike Polynomial Decomposition

The wavefront is decomposed into Zernike polynomials using Noll ordering with standard normalization.

Zernike Polynomial Definition

Zernike Polynomial
$$Z_j(\rho, \theta) = N_n^m R_n^{|m|}(\rho) \times \begin{cases} \cos(m\theta) & m \geq 0 \\ \sin(|m|\theta) & m < 0 \end{cases}$$

where $(n, m)$ are the radial and azimuthal indices corresponding to Noll index $j$.

Normalization Factor

Noll Normalization
$$N_n^m = \sqrt{\frac{2(n+1)}{1 + \delta_{m0}}}$$

where $\delta_{m0} = 1$ if $m = 0$, else $0$.

Radial Polynomial

Radial Polynomial
$$R_n^{|m|}(\rho) = \sum_{k=0}^{(n-|m|)/2} \frac{(-1)^k (n-k)!}{k! \left(\frac{n+|m|}{2}-k\right)! \left(\frac{n-|m|}{2}-k\right)!} \rho^{n-2k}$$

First Zernike Terms (Noll Ordering)

$j$$n$$m$Name$Z_j(\rho,\theta)$
100Piston$1$
211Tilt X$2\rho\cos\theta$
31-1Tilt Y$2\rho\sin\theta$
420Defocus$\sqrt{3}(2\rho^2 - 1)$
52-2Astigmatism 45°$\sqrt{6}\rho^2\sin 2\theta$
622Astigmatism 0°$\sqrt{6}\rho^2\cos 2\theta$
73-1Coma Y$\sqrt{8}(3\rho^3 - 2\rho)\sin\theta$
831Coma X$\sqrt{8}(3\rho^3 - 2\rho)\cos\theta$
1140Primary Spherical$\sqrt{5}(6\rho^4 - 6\rho^2 + 1)$
2260Secondary Spherical$\sqrt{7}(20\rho^6 - 30\rho^4 + 12\rho^2 - 1)$
3780Tertiary Spherical$3(70\rho^8 - 140\rho^6 + 90\rho^4 - 20\rho^2 + 1)$

Least-Squares Fitting

Coefficients $a_j$ are determined by minimizing:

Least Squares Objective
$$\min_{a_j} \sum_{i=1}^{N} \left[ W(\rho_i, \theta_i) - \sum_{j=1}^{M} a_j Z_j(\rho_i, \theta_i) \right]^2$$

Solved via the normal equations $(Z^T Z)\vec{a} = Z^T \vec{W}$.

RMS from Zernike Coefficients

Zernike RMS
$$\sigma_{\text{Zernike}} = \sqrt{\sum_{j=j_0}^{M} a_j^2}$$

where $j_0 = 4$ excludes piston and tilt (alignment terms).

6. Diffraction Analysis

Scalar Diffraction Assumptions

PSF computation assumes scalar Fraunhofer diffraction. The exit pupil field is modeled as uniform amplitude with phase determined by the OPD map.

Pupil Function

Complex Pupil Function
$$P(\xi, \eta) = A(\xi, \eta) \exp\left[i \cdot 2\pi W(\xi, \eta)\right]$$

where $A(\xi, \eta) = 1$ inside the pupil, $0$ outside, and $W$ is in waves.

Point Spread Function

PSF via Fourier Transform
$$\text{PSF}(x, y) = \left| \mathcal{F}\{P(\xi, \eta)\} \right|^2$$

computed using a 2D FFT with appropriate zero-padding.

Strehl Ratio

Strehl Ratio
$$S = \frac{I_{\text{peak}}}{I_{\text{peak, DL}}} = \frac{\max[\text{PSF}]}{\max[\text{PSF}_{\text{DL}}]}$$

For small aberrations, the Maréchal approximation:

Maréchal Approximation
$$S \approx \exp\left[-(2\pi\sigma_W)^2\right] \approx 1 - (2\pi\sigma_W)^2$$

where $\sigma_W$ is the RMS wavefront error in waves.

Airy Disk

Airy Disk Radius
$$r_{\text{Airy}} = 1.22 \lambda \cdot F/\# = \frac{0.61\lambda}{\text{NA}}$$

This is the radius to the first dark ring of the diffraction-limited PSF.

Optical Transfer Function

OTF Definition
$$\text{OTF}(f_x, f_y) = \mathcal{F}\{\text{PSF}(x, y)\}$$

Equivalently, the OTF is the autocorrelation of the pupil function:

$$\text{OTF}(f_x, f_y) = \frac{\int\!\!\int P(\xi, \eta) P^*(\xi - \lambda z f_x, \eta - \lambda z f_y) \, d\xi \, d\eta}{\int\!\!\int |P(\xi, \eta)|^2 \, d\xi \, d\eta}$$

Modulation Transfer Function

MTF
$$\text{MTF}(f) = |\text{OTF}(f)|$$

normalized such that $\text{MTF}(0) = 1$.

Diffraction-Limited MTF

For a circular pupil with no aberrations:

Diffraction-Limited MTF
$$\text{MTF}_{\text{DL}}(\nu) = \frac{2}{\pi}\left[\arccos(\nu) - \nu\sqrt{1-\nu^2}\right]$$

where $\nu = f/f_{\text{cutoff}}$ is the normalized spatial frequency.

Cutoff Frequency

Diffraction Cutoff
$$f_{\text{cutoff}} = \frac{1}{\lambda \cdot F/\#} = \frac{2\,\text{NA}}{\lambda}$$

in cycles per unit length (typically lp/mm).

B. How to Read Each Metric

Spot Diagram

Physical Question

Where do rays from a point source land on the image plane? The spot diagram answers this in geometric-optics terms, ignoring diffraction entirely.

Relevant Equations

The RMS spot radius is computed as:

$$r_{\text{RMS}} = \sqrt{\frac{1}{N}\sum_{i=1}^{N}\left[(x_i - \bar{x})^2 + (y_i - \bar{y})^2\right]}$$

The Airy disk reference circle has radius $r_{\text{Airy}} = 1.22\lambda F/\#$.

What It Hides

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.

Typical Misinterpretations

  • Assuming a spot smaller than the Airy disk guarantees diffraction-limited performance. It does not; ray density and OPD distribution matter.
  • Comparing RMS spot radii across field positions without accounting for defocus optimization. Best-focus shifts with field angle.
  • Reading asymmetry as purely coma. Spot asymmetry can arise from decentered pupils, field curvature, or mixed aberrations.

Architectural Use

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.

OPD / Wavefront Map

Physical Question

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.

Relevant Equations

The wavefront is characterized by:

$$W(\rho, \theta) = \sum_{j=1}^{M} a_j Z_j(\rho, \theta)$$

Key metrics derived from the OPD:

$$\text{RMS} = \sqrt{\frac{1}{A}\iint_{\text{pupil}} W^2 \, dA}, \quad \text{P-V} = W_{\max} - W_{\min}$$

What It Hides

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.

Typical Misinterpretations

  • Treating RMS wavefront error as a single figure of merit. Two systems with identical RMS can have vastly different PSF structure (e.g., spherical aberration vs. trefoil).
  • Assuming Zernike coefficients are independent. Balancing spherical with defocus improves RMS but may worsen MTF at specific frequencies.
  • Ignoring field variation. On-axis OPD may be excellent while field-edge OPD shows severe astigmatism.

Architectural Use

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).

Point Spread Function (PSF)

Physical Question

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.

Relevant Equations

The PSF is computed via:

$$\text{PSF}(x,y) = \left|\mathcal{F}\left\{e^{i2\pi W(\xi,\eta)}\right\}\right|^2$$

The Strehl ratio relates peak intensity to wavefront quality:

$$S \approx e^{-(2\pi\sigma_W)^2}$$

What It Hides

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.

Typical Misinterpretations

  • Equating Strehl ratio with image quality. Strehl measures peak intensity relative to diffraction limit; a high-Strehl system can still have problematic sidelobes or asymmetry that affect extended-object imaging.
  • Assuming PSF shape is wavelength-invariant. Chromatic aberration shifts PSF structure across the band; polychromatic PSF is the weighted sum.
  • Ignoring the PSF wings. For high-contrast applications, energy in the wings (beyond the core) dominates background and limits detection of faint companions.

Architectural Use

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.

Modulation Transfer Function (MTF)

Physical Question

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).

Relevant Equations

The MTF is the magnitude of the OTF:

$$\text{MTF}(f) = \left|\mathcal{F}\{\text{PSF}\}\right| / \left|\mathcal{F}\{\text{PSF}\}\right|_{f=0}$$

Key reference frequencies:

$$f_{\text{cutoff}} = \frac{1}{\lambda F/\#}, \quad f_{\text{Nyquist}} = \frac{1}{2p}$$

where $p$ is the detector pixel pitch.

What It Hides

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.

Typical Misinterpretations

  • Comparing MTF at a single frequency. System A may exceed System B at 50 lp/mm but fall below it at 100 lp/mm; the choice depends on application-specific weighting.
  • Assuming sagittal and tangential MTF can be averaged. Astigmatic systems have orientation-dependent resolution; the minimum of S and T often limits practical performance.
  • Ignoring the MTF falloff shape. A system that maintains 0.4 MTF to high frequencies may outperform one with higher MTF at low frequencies that collapses before cutoff.

Architectural Use

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.

C. System Thinking

Why No Single Plot Defines Image Quality

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.

The RMS-Strehl-MTF Connection

For small aberrations, these metrics are related:

$$\sigma_W \lesssim 0.1\lambda \implies S \approx 1 - (2\pi\sigma_W)^2 \implies \text{MTF} \approx \text{MTF}_{\text{DL}}$$

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.

Coupling Between Domains

Aberrations and Sampling

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.

Aberrations and Alignment

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.

Aberrations and Manufacturing

Surface figure errors and material inhomogeneity add to the design wavefront. As-built performance is the convolution of design OPD with fabrication OPD:

$$\sigma_{\text{system}}^2 \approx \sigma_{\text{design}}^2 + \sigma_{\text{fab}}^2 + \sigma_{\text{align}}^2$$

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.

When to Trust Geometric Optics vs. Diffraction Metrics

The transition criterion is the ratio of geometric blur to Airy disk diameter:

$$\text{Ratio} = \frac{r_{\text{RMS,geo}}}{r_{\text{Airy}}}$$

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.

D. Known Boundaries

What This Tool Intentionally Excludes

Regimes Where Results Become Misleading

High-NA systems (NA > 0.7): Scalar diffraction assumptions break down. Vector diffraction effects become significant, and the Airy pattern is no longer an accurate reference. The actual PSF develops polarization-dependent structure.
Extended spectral bands: Monochromatic analysis at the reference wavelength does not capture chromatic aberration. Polychromatic PSF and MTF require weighted integration: $$\text{PSF}_{\text{poly}}(x,y) = \int S(\lambda) \cdot \text{PSF}_\lambda(x,y) \, d\lambda$$
Severely vignetted pupils: The Zernike decomposition assumes a filled circular pupil. Central obscurations, kidney-shaped apertures, or field-dependent vignetting invalidate standard Zernike interpretation. Annular Zernike polynomials should be used for obscured systems.
Systems with significant PTF: Odd aberrations (coma, trefoil) produce phase transfer effects that shift edge positions. MTF alone does not characterize these systems; OTF phase should be examined for edge-sensitive applications.

Required Next Steps for Real Programs

  1. Independent verification. Results from this dashboard should be cross-checked against at least one established optical design code (Zemax, Code V, OSLO) before design release.
  2. Tolerance analysis. Nominal performance is necessary but not sufficient. Monte Carlo simulation with realistic fabrication distributions must confirm yield at specification.
  3. As-built prediction. Interferometric measurement of fabricated optics should be convolved with design wavefront to predict integrated system performance.
  4. Environmental modeling. Thermal, structural, and contamination effects must be analyzed in the operational environment, not assumed negligible.
  5. End-to-end simulation. For imaging systems, the optical PSF should be convolved with scene content, detector response, and signal processing chain to validate system-level requirements.