Skip to main content
Sandbox Physics

Optics 068 · Diffraction, Fourier optics, and computational imaging

Phase Retrieval Challenge

Can you recover the phase of light from brightness measurements alone? Only with extra constraints, and never completely. Knowing where the object can be nonzero, or measuring at several planes, is enough to recover the phase. A single focal-plane pattern still cannot tell the object from its conjugate twin, the same object rotated half a turn with its phase reversed. And no intensity data can fix an overall constant phase.

Recover an invisible phase plate from simulated intensity records. Move one CCD through defocus positions, run into the twin-image ambiguity, replay iterations that start without the answer and test what a wrong support assumption does.

Interactive modelPhase Retrieval Challenge
Recorded-amplitude residual εA\varepsilon_A0.500.50
Simulation-only phase score / missing area σϕ,m\sigma_\phi,m50%50\%
Iteration / acquired record count k,Nzk,N_z0.00π0.00\pi
Model regimevalid model regime\text{valid model regime}

Physics tutorial

Audit the physics of Phase Retrieval Challenge

BackgroundThe CCD records the squared amplitude, and the optical phase is lost: Ij=∣Fu{djU}∣2I_j=|\mathcal F_u\{d_j U\}|^2. Each known defocus position changes the same object field in a known way before the Fourier transform.

Why it mattersCan you recover the phase of light from brightness measurements alone?

Start with the essentials

Focus question
Can you recover the phase of light from brightness measurements alone?
One-sentence intuition
At focus, the object and its conjugated, point-inverted twin give identical data: ∣FuU∣2=∣Fu{U∗(−r)}∣2|\mathcal F_u U|^2=|\mathcal F_u\{U^*(-\mathbf r)\}|^2. An exact alternative answer is not the same as a reconstruction that stalled in a mixture of the two. Several known planes can rule out the twin, but they never fix the global piston.

Core mathematical model

Moving the camera adds a known defocus phase

Mj=(−δj/ff−1/f0)dj(r)=e−iπδjr2/(λf2)ΔxD=λfNΔxO\begin{aligned}M_j&=\begin{pmatrix}-\delta_j/f&f\\-1/f&0\end{pmatrix}\\d_j(\mathbf r)&=e^{-i\pi\delta_j r^2/(\lambda f^2)}\\\Delta x_D&=\frac{\lambda f}{N\Delta x_O}\end{aligned}

The object sits one focal length in front of the lens, and the camera sits one focal length plus a signed defocus behind it. No extra phase plate is inserted. Coordinates are in millimetres, and positive defocus means the camera is farther from the lens.

Projecting onto the measured amplitudes

gj=Fu(djUk)hj=Ijeiarg⁡gjUk+1=PS ⁣[1Nz∑jdj∗Fu−1hj]\begin{aligned}g_j&=\mathcal F_u(d_j U_k)\\h_j&=\sqrt{I_j}e^{i\arg g_j}\\U_{k+1}&=\mathcal P_S\!\left[\frac1{N_z}\sum_j d_j^*\mathcal F_u^{-1}h_j\right]\end{aligned}

The measured magnitudes replace the predicted ones. Each plane is propagated back to the object and the results are averaged. Then the amplitude is set to one inside the assumed circular support and to zero outside. This is a GS-like parallel projection; it is not HIO and does not guarantee a global optimum.

Fit and truth are different tests

εA2=∑j∥ ∣gj∣−Ij ∥2∑j∥Ij∥2σϕ2=⟨wrap⁡(ϕk−ϕtrue−c)2⟩\begin{aligned}\varepsilon_A^2&=\frac{\sum_j\|\,|g_j|-\sqrt{I_j}\,\|^2}{\sum_j\|\sqrt{I_j}\|^2}\\\sigma_\phi^2&=\langle\operatorname{wrap}(\phi_k-\phi_{\rm true}-c)^2\rangle\end{aligned}

The residual uses only the acquired data. The phase score exists only in simulation: it removes the best-fitting global piston and uses the pixels where the supports overlap. The part of the true object that falls outside the support is reported separately, and a twin is never quietly counted as correct.

Additive read noise, clipped at zero

Ijrec=max⁡(0,Ijideal+nj)nj∼N(0,η2Iclear2)\begin{aligned}I_j^{\rm rec}&=\max(0,I_j^{\rm ideal}+n_j)\\n_j&\sim\mathcal N(0,\eta^2 I_{\rm clear}^2)\end{aligned}

The read noise is additive, uses a fixed seed and is scaled to one shared reference: the peak of the clear-aperture pattern. Clipping at zero pushes dark pixels upward. The model does not treat shot noise or photon numbers. The fixed logarithmic display does not rescale each picture separately.

Common difficulties

Does a small data error mean the phase is right?

Typical misconceptionRun enough iterations and the algorithm always finds the one physical phase.

Better mental modelNo. With nonconvex constraints the iteration can stall, and the Fourier twin fits the data exactly. A wrong support throws away real object pixels. The synthetic true object is kept from the algorithm and used only to evaluate the result.

Run the experiment

  1. 01

    Scene 1: One image, two valid phases

    Compare a single in-focus record with three defocused records, keeping the specimen, seed, aperture and iteration count the same.

    What to observe: In this example, the defocused planes rule out the twin that fits at focus. The global piston still cannot be observed.
  2. 02

    Scene 2: Scan three planes, recover phase

    Replay the error curve. Change the blind seed and compare the fit error with the phase score, which is labelled separately.

    What to observe: The support is a constraint inside the software, not a physical stop in the light path. Only the camera moves, and the detector records stay the same when you change the reconstruction seed.
  3. 03

    Scene 3: Wrong prior and noisy data

    Drag the assumed support circle inward and add noise. Then watch the CCD move in the overview, side and detail views.

    What to observe: A small residual does not prove the phase is right. A wrong support, or read noise clipped at zero, can bias the reconstruction.
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