Skip to main content
Sandbox Physics

Optics 064 · Diffraction, Fourier optics, and computational imaging

PSF–OTF–MTF Imaging Lab

Can a lens swap the bright and dark parts of stripes, and can pixels invent a stripe period that isn’t there? Both happen. With defocus, the optical transfer function turns negative over some range of stripe frequencies, and stripes there come out with bright and dark swapped. The MTF keeps only the size of that function, so it hides the flip. Pixels spaced too far apart for the stripes alias them into a false, longer period.

Follow light from the pupil to the image and see contrast reversal and false periods caused by sampling. The PSF, the signed OTF, the MTF and the sensor pixels all come from the same calculation.

Interactive modelPSF–OTF–MTF Imaging Lab
Incoherent optical cutoff / sensor Nyquist νcinc,νN\nu_c^{\rm inc},\nu_N0.500.50
On-axis Strehl / aperture throughput S0,ηpupilS_0,\eta_{\rm pupil}50%50\%
Signed incoherent transfer / magnitude ℜOTF,MTF\Re\mathrm{OTF},\mathrm{MTF}0.00π0.00\pi
Model regimevalid model regime\text{valid model regime}

Physics tutorial

Audit the physics of PSF–OTF–MTF Imaging Lab

BackgroundIn incoherent imaging, each object point produces an intensity pattern set by the complex pupil: PSF=∣F−1P∣2∫∣F−1P∣2 d2r\mathrm{PSF}=\frac{|\mathcal F^{-1}P|^2}{\int|\mathcal F^{-1}P|^2\,d^2r}. The pattern is normalized to unit integral, and the light lost at an obstruction is counted separately. A phase error moves energy around within the pattern; it does not dim every frequency by the same amount.

Why it mattersCan a lens swap the bright and dark parts of stripes, and can pixels invent a stripe period that isn’t there?

Start with the essentials

Focus question
Can a lens swap the bright and dark parts of stripes, and can pixels invent a stripe period that isn’t there?
One-sentence intuition
Both transfer functions come from the same point response: OTF=F{PSF},MTF=∣OTF∣\mathrm{OTF}=\mathcal F\{\mathrm{PSF}\},\qquad\mathrm{MTF}=|\mathrm{OTF}|. This pupil is symmetric under inversion through its center, so the OTF is real. Defocus can make it negative, which means bright and dark swap; the MTF is its magnitude and throws that sign away.

Core mathematical model

The complex pupil with defocus and astigmatism

P=1ϵ≤ρ≤1e2πiww=D ⁣(ρ2−1+ϵ22)+A(u2−v2)\begin{aligned}P&=\mathbf1_{\epsilon\le\rho\le1}e^{2\pi i w}\\w&=D\!\left(\rho^2-\frac{1+\epsilon^2}{2}\right)\\&\quad+A(u^2-v^2)\end{aligned}

The dimensionless pupil coordinates are frequency divided by the coherent cutoff. Defocus is given in waves from the pupil edge to its centre; astigmatism has opposite signs along the two perpendicular axes. The average phase (piston) over the ideal annulus is removed. The controls set phase at the selected wavelength, not a fixed thickness of glass.

Incoherent and coherent imaging

Iinc=η PSF∗IidealIcoh=∣F−1{PF[Iideal]}∣2\begin{aligned}I_{\rm inc}&=\eta\,\mathrm{PSF}*I_{\rm ideal}\\I_{\rm coh}&=\left|\mathcal F^{-1}\{P\mathcal F[\sqrt{I_{\rm ideal}}]\}\right|^2\end{aligned}

Both models image the same target, inverted. Incoherent object points add without cross terms; coherent points interfere. The open fraction of the pupil area sets the incoherent throughput, while coherent energy depends on the actual amplitude spectrum. The display applies a fixed linear gain and clipping only after the raw calculation.

Cutoffs, phase sign and sensor sampling

νccoh=NA/λνcinc=2NA/λνN=1/(2apixel)Δz=−2λD/NA2\begin{aligned}\nu_c^{\rm coh}&=\mathrm{NA}/\lambda\\\nu_c^{\rm inc}&=2\mathrm{NA}/\lambda\\\nu_N&=1/(2a_{\rm pixel})\\\Delta z&=-2\lambda D/\mathrm{NA}^2\end{aligned}

Frequencies are in cycles per micrometre, in image coordinates at nominal unit magnification. A positive defocus phase means the sensor sits closer to the second lens. The relay uses the paraxial focal-plane approximation, so moving the sensor ignores the tiny change in magnification. Frequencies above Nyquist can fold back to lower ones; what the optics pass is not automatically what the pixels record.

Normalized shape versus transmitted energy

OTF(0)=1η=NP/NclearS0=∣∑P∣2/NP2B=min⁡(1,GI/I0)\begin{aligned}\mathrm{OTF}(0)&=1\\\eta&=N_P/N_{\rm clear}\\S_0&=|\sum P|^2/N_P^2\\B&=\min(1,G I/I_0)\end{aligned}

The on-axis Strehl ratio, computed on the finite grid, compares the same aperture with and without the phase error. It is not a general ratio of maximum peaks, nor the exponential small-error approximation. The PSF map has its own labelled logarithmic scale, relative to the peak of the same aperture without aberration. The raw centre cut and the transfer curves never include display gain.

Common difficulties

A nonzero MTF does not guarantee a faithful image

Typical misconceptionThe Strehl ratio just scales the whole MTF down, and any stripe I can see is resolved correctly.

Better mental modelThe normalized OTF is one at zero frequency even when the on-axis peak of the point response drops. Contrast can reverse, and pixels can alias a pattern into a false period. Look at the signed curve, and compare the cuts through the raw input, the optical image and the detector record. In coherent mode the pupil filters the amplitude first and the result is squared afterwards, so an incoherent OTF cannot predict how intensity is transferred.

Run the experiment

  1. 01

    Scene 1: In focus: faithful contrast

    Compare the in-focus and reversal scenes. Then click the signed-transfer chart to tune the sinusoidal target, which always has a whole number of cycles. Home restores the default cycle count.

    What to observe: A narrowband source can still be spatially incoherent. Light of a single color does not make different object points coherent with each other.
  2. 02

    Scene 2: Defocus: bright becomes dark

    Switch to the real-aperture view and change the NA and the central obstruction. Then combine defocus with astigmatism and compare the horizontal and vertical signed curves.

    What to observe: The pupil is sampled on a finite grid, so the PSF and the image repeat periodically. The images are forward simulations of synthetic targets made for this Lab, not measured images or reconstructions.
  3. 03

    Scene 3: Pixels: false stripe period

    Choose the aliasing scene and make the pixels larger. Compare the sampled record with the optical image before sampling, then switch to coherent amplitude imaging.

    What to observe: A central obstruction lowers incoherent throughput. Under coherent on-axis illumination it also blocks the zero-frequency field, so a uniform target can go dark.
FeedbackSomething broken, confusing, or missing on this page?Tell us
What kind of feedback?

Sent with this page’s address, its Lab ID, the site language and your device type. Please leave out personal details. Feedback is kept for up to 12 months.Privacy policy