🌈

Digital Holography and Phase Retrieval

Record the intensity |Eobj + Eref|² of a synthetic object wave on a pixelated sensor, then recover the lost phase: off-axis Fourier filtering, in-line (Gabor) holography and its twin image, 4-step phase shifting, and Gerchberg–Saxton phase retrieval, all checked against the known complex ground truth.

P4 specialist extension Builds on aperture propagation (N5), Fourier optics (N6) and two-beam interference.

Pick an experiment • click the angle plot to set the reference tilt • click a map (or use arrow keys) to move the line cut
θReference tilt (snapped)
ΛFringe period
θmaxSampling limit asin(λ/2Δx)
±1Order separation
ρMatch to ground truth

Computing…

1 · Object o(x, y), ground truth |o|

Band-limited complex transmittance at z = 0 (unit plane-wave illumination). This is the truth every reconstruction is scored against.

2 · Sensor record intensity

What the camera stores: a real, non-negative intensity per pixel. No phase is measured directly.

3 · Hologram spectrum |FFT H| log, floor 10⁻⁶

Sampled spectrum over ±fN = ±1/(2Δx). Dashed grey: DC term |R|² + |O|² (radius 2B). Cyan: +1 order O·R* (radius B). Rose: −1 twin order O*·R. Gold dashed: filter window.

4 · Reconstruction

Back-propagated field at zr, global phase aligned to the truth. Same colour scale as panel 1.

5 · Line cut through the reconstruction y = 0

Solid: reconstruction; dashed: ground truth propagated to the same plane (after the same filter). Click either map or press ↑/↓ on it to move the cut.

6 · Order separation vs reference angle ρ, filtered +1

Correlation ρ of the Fourier-filtered off-axis reconstruction with the truth versus tilt (same sensor, no quantisation). Click or use ←/→ to set θ.

7 · Gerchberg–Saxton error 0 iterations

EM = ‖|G| − √I‖/‖√I‖ in the measurement plane (never increases) and the true error √(1 − ρ²) against the object (can stall).

Every reconstruction of the same recorded object, scored against the ground-truth complex field at the sensor (after the same filter). ρ = |⟨u, utrue⟩|/(‖u‖‖utrue‖); residual = √(1 − ρ²) after the best complex scale.
Method Exposures ρ Residual
💡 How to use

Learn with this tool

Learning objectives

  • Explain why a camera that records only intensity can still capture phase when a reference wave interferes with the object wave, and identify the four terms of |O + R|².
  • Predict the positions of the DC, +1 and −1 orders in the hologram spectrum from the reference angle and object bandwidth. Derive the separation condition |fc| ≥ 3B and the sampling limit sin θ ≤ λ/(2Δx).
  • Compare single-exposure in-line, off-axis, phase-shifting and iterative (Gerchberg–Saxton) phase recovery. Explain what each one needs and how each one fails.

Prerequisites (P4 specialist extension)

Model

A thin object with complex transmittance o(x, y) is lit by a unit plane wave. Its scalar field is band-limited to |f| ≤ B = NAo/λ and propagated a distance z to the sensor with the exact angular-spectrum transfer function, giving the object wave O(x, y). A plane reference wave R = A e e−i2πfc·r with sin θ = λ|fc| arrives at the same time. The sensor records only

H = |O + R|² = |R|² + |O|² + O R* + O* R

The first two terms carry no phase (the DC or zero order). The cross terms are the +1 order O R*, which holds the complex object wave shifted to +fc, and the −1 (twin) order O* R, its complex conjugate at −fc. Illuminating the hologram with R gives (H − |R|²)R/|R|² = O + O* R²/|R|² + |O|² R/|R|²: the original wave plus a conjugate (twin) wave and a DC halo. Back-propagating by −z refocuses O onto the object. The twin wave O* focuses at +z instead, so in the object plane it appears defocused by 2z.

O, R
complex object and reference waves at the sensor (peak phasors, same polarisation)
H
recorded intensity, in units of the unit illumination intensity (or ADU when quantised)
B
object bandwidth NAo/λ (cycles/m); orders have radius B, the DC term |O|² radius 2B
fc
carrier spatial frequency sin θ/λ; fringe period Λ = 1/|fc| = λ/sin θ
Δx, fN
pixel pitch and Nyquist frequency 1/(2Δx)
β
beam ratio |R|²/⟨|O|²⟩ over the sensor
ρ
normalised correlation |⟨u, utrue⟩|/(‖u‖‖utrue‖) between a reconstruction and the truth

Assumptions: scalar, monochromatic, fully coherent and co-polarised beams. The object is thin (multiplicative transmittance). The sensor is a square N × N array with a periodic window. Each pixel integrates intensity over an active square of width FF·Δx, which multiplies each term's spectrum by sinc(fxFFΔx) sinc(fyFFΔx) at its physical frequency before sampling. There is no noise other than optional quantisation. The reference tilt is snapped to a DFT bin. Back-propagation uses U(−z) = conj(Pz[conj U]) with the N5 angular-spectrum propagator.

Derivation: order positions, separation condition and the sampling limit

By the shift theorem, multiplying by e+i2πfc·r moves a spectrum by +fc. The spectrum of O occupies |f| ≤ B, so O R* occupies a disc of radius B at +fc and O* R a disc at −fc. The spectrum of |O|² is the autocorrelation of the spectrum of O and fills |f| ≤ 2B. The +1 disc clears the DC disc when |fc| − B ≥ 2B, that is |fc| ≥ 3B, or sin θ ≥ 3λB = 3NAo.

A sensor with pitch Δx resolves frequencies only up to fN = 1/(2Δx). The fringe period λ/sin θ must span at least two pixels, which gives sin θmax = λ/(2Δx). For the whole +1 disc to stay inside the band (no wrapping), |fc| + B ≤ fN. Together, 3B ≤ |fc| ≤ fN − B needs B ≤ fN/4: an off-axis hologram spends at least three quarters of the sensor bandwidth on separating the orders. A diagonal carrier gains a factor √2 in the carrier magnitude. Beyond fN the sampled carrier aliases to fc − 1/Δx. The orders then land somewhere else, possibly on the DC term. Pixel integration also reduces the fringe contrast by |sinc(fc·FF·Δx)|, which vanishes at fc = 1/Δx for FF = 1.

Phase shifting: recording Hk with the reference phase stepped by δk = kπ/2 gives Σk Hk ek = 4 O R0*. The DC terms cancel because Σ ek = 0, and the twin cancels because Σ e2iδk = 0. So O = Σ Hk ek R0/(4|R|²) exactly, even in-line.

Gerchberg–Saxton (error reduction): alternate between the object plane (impose the known amplitude |o|, keep the phase) and the measurement plane (impose √I, keep the phase), linked by a unitary transform T (FFT/N or the angular-spectrum propagator). Each step is a projection onto a set of fields that satisfy one constraint, so EM(k+1) ≤ EO(k) ≤ EM(k) (Fienup 1982). The error never increases, but the sets are not convex, so the iteration can stall in a wrong solution.

Exercise 1 — Choosing the reference angle

  1. With λ = 633 nm, Δx = 5 µm and NAo = 0.012, predict the smallest tilt that separates the +1 order from the DC term and the largest tilt that keeps the +1 order inside the Nyquist band.
  2. Load “Off-axis hologram”, then click along the angle plot (panel 6) from 0° to 8°.
  3. Read θ where ρ first exceeds 0.99 and where it falls again. Watch the orders move in panel 3.
  4. Relate both edges of the plateau to 3B and fN − B.
Show answer

B = 0.012/633 nm = 19.0 cycles/mm and fN = 100 cycles/mm. The separation needs sin θ ≥ 3NAo = 0.036 (θ ≥ 2.06°). The clean upper edge is sin θ ≤ λ(fN − B) = 0.0513 (θ ≤ 2.94°), and the fringe period reaches 2 px at θmax = asin(λ/2Δx) = 3.63°. The sweep has ρ ≈ 0.999 from about 1.8° to 2.9°. ρ first exceeds 0.99 near 1.65°, a little below the 2.06° estimate: with β ≈ 4 the |O|² halo is weak and fades towards its edge at 2B, so a slight overlap costs little. ρ falls below 0.99 again just above 3.0°, close to the 2.94° clean edge where the +1 and −1 orders start to meet across the Nyquist edge, and below ≈ 0.9 by about 3.25°. Below about 1.15° the +1 order sits on the bright part of the |O|² halo and ρ < 0.9.

Exercise 2 — The twin image in Gabor holography

  1. In an in-line hologram all three orders sit on top of each other. Predict what the twin looks like in the refocused image, and where it would be sharp.
  2. Load “Gabor twin image”, then “Focus the twin” (zr = −z). Finally switch the method to 4-step phase shifting.
  3. Compare ρ for the three cases in the method table and look at the line cut.
  4. Explain why the twin is a blurred copy at zr = z, and why four exposures remove it while a spatial filter cannot.
Show answer

Back-propagating O* by −z is the same as forward-propagating O by +z and conjugating, so the twin is the object defocused by 2z. At z = 12 mm it forms a ringing halo around “HOLO”, and ρ ≈ 0.77. At zr = −z the twin is in focus (a conjugate image) and the real image is blurred. The twin overlaps the image in frequency, so no Fourier filter can separate them. Phase shifting separates them by their dependence on the reference phase instead and gives ρ = 1.0000.

Exercise 3 — Limiting case: aliasing past θmax

  1. Take θ = 6° with the default sensor. Predict the true fringe period in pixels and where the +1 order appears in the sampled spectrum.
  2. Load “Beyond θmax”, zoom the sensor to 8×, then try θ = 5.0°.
  3. Read the fringe period, the aliased carrier and ρ at both angles. Note the pixel-MTF readout.
  4. Why is 6° catastrophic while 5° still reconstructs? Why is 5° still a bad design?
Show answer

At 6°, fc = sin 6°/λ ≈ 165 cycles/mm (1.21 px period). It aliases to 165 − 200 = −35 cycles/mm, within 3B = 57 cycles/mm of DC, so the order lands on the |O|² halo and ρ ≈ 0.58. At 5°, fc ≈ 138 cycles/mm aliases to −62 cycles/mm, which is outside the halo, and ρ ≈ 0.99. The sampled fringes then look like fringes at the wrong angle (a moiré), so the true θ cannot be inferred from the data. With FF = 1 the pixel MTF |sinc(fcΔx)| also cuts the fringe contrast to ≈ 0.38 (≈ 0.20 at 6°), so noise would dominate in a real camera.

Exercise 4 — Amplitude versus intensity, and phase retrieval

  1. For the phase-only object, what can a camera without a reference recover? Can Gerchberg–Saxton do better with the same single intensity image?
  2. Load “Intensity only”, then “Gerchberg–Saxton”, and run 150 iterations. Repeat with a random starting phase.
  3. Record ρ (intensity only), the final EM and the true error for both starts.
  4. Explain why EM keeps falling while the true error can stall.
Show answer

Back-propagating √|O|² with zero phase gives ρ ≈ 0.70: the defocus phase and the object phase are both lost. GS adds the object-plane amplitude constraint. From a flat start at z = 17 mm, EM falls to ≈ 0.02 and the true error to ≈ 0.3, so the phase features are recognisable but distorted. From a random start EM stalls near 0.2 and the true error stays ≈ 1. The algorithm is monotone but non-convex, so an intensity-only measurement plus a support constraint does not guarantee a unique or reachable solution. A reference wave removes that ambiguity.

Worked example — designing an off-axis digital holography microscope

A camera has 3.45 µm pixels (fN = 145 cycles/mm) and λ = 532 nm. The largest object bandwidth that still allows an off-axis hologram is B = fN/4 = 36.2 cycles/mm. So the object beam must be limited to NAo = λB = 0.0193. After a 20× objective the lateral resolution at the sample is about λ/(2NAo)/20 ≈ 0.69 µm, which corresponds to a sample-side NA of 20 × 0.0193 ≈ 0.39. The carrier must sit at |fc| = 3B = 108.7 cycles/mm, so sin θ = λ|fc| = 0.0578 (θ = 3.32°). The fringe period is 9.2 µm = 2.67 pixels, which is above the 2-pixel limit θmax = asin(λ/2Δx) = 4.42°. With FF = 1 the fringe contrast is reduced by sinc(0.375) = 0.79. A diagonal carrier raises the usable bandwidth to B = √2 fN/(3 + √2) ≈ 0.32 fN. Check the scaling in the tool with the nearest slider values: set Δx = 3.5 µm (fN = 142.9 cycles/mm), λ = 532 nm, NAo = 0.019 (B = 35.7 cycles/mm = fN/4), θ = 3.27° (|fc| = 3B) and z = 9 mm (so the object wave still fits on the smaller sensor). The spectrum shows the three orders exactly touching, no overlap warning appears, and ρ ≈ 0.998. At θ = 3.30° the +1 disc already crosses the Nyquist edge into the twin; at 3.25° it touches the DC halo.

When the model fails

  • Coherence: the tool assumes perfectly coherent, co-polarised beams. Finite temporal coherence limits the path difference across the sensor, and partial spatial coherence or a polarisation mismatch lowers the fringe visibility.
  • Noise: only quantisation is modelled. Shot noise, read noise, speckle, vibration during the exposure and reference-phase drift between phase-shifted frames dominate real systems.
  • Thin, band-limited object: real objects are not sharply band-limited. Energy outside B leaks into the neighbouring orders. Thick or multiply scattering objects are not a single multiplicative transmittance.
  • Periodic window and snapping: the FFT treats the sensor as periodic, so light leaving one edge re-enters at the other (a warning appears). The carrier is snapped to a DFT bin, whereas a real tilt leaves leakage and a residual linear phase that must be compensated.
  • Phase retrieval: error-reduction GS is the simplest algorithm and stalls easily. Practical phase retrieval uses hybrid input–output, multiple distances, or ptychography.
  • Pixel model: a uniform square pixel response ignores microlenses, crosstalk and nonlinearity. Automatic exposure never saturates, but real sensors clip.

References

  • D. Gabor, “A new microscopic principle,” Nature 161, 777 (1948).
  • E. N. Leith and J. Upatnieks, “Reconstructed wavefronts and communication theory,” J. Opt. Soc. Am. 52, 1123 (1962).
  • I. Yamaguchi and T. Zhang, “Phase-shifting digital holography,” Opt. Lett. 22, 1268 (1997).
  • E. Cuche, P. Marquet and C. Depeursinge, “Spatial filtering for zero-order and twin-image elimination in digital off-axis holography,” Appl. Opt. 39, 4070 (2000).
  • R. W. Gerchberg and W. O. Saxton, Optik 35, 237 (1972); J. R. Fienup, “Phase retrieval algorithms: a comparison,” Appl. Opt. 21, 2758 (1982).
  • J. W. Goodman, Introduction to Fourier Optics, 4th ed., W. H. Freeman (2017), chapter 11 (holography).
  • M. K. Kim, Digital Holographic Microscopy, Springer (2011), chapters 4–6.