Four-step phase retrieval (source code)

= Four-step phase retrieval
{title2=$\widehat\phi$}

\b[<Four-step phase retrieval>] estimates relative <wave phase> from four <wave interference> frames separated by quarter-cycle <wave phase> steps. Use the explicit signal-arm convention
$$
I_\delta=C+A\cos(\phi+\delta),\qquad
\delta=0,\pi/2,\pi,3\pi/2,
$$
with a common background $C$ and modulation amplitude $A>0$. Opposite-frame differences give
$$
X=I_0-I_\pi=2A\cos\phi,\qquad
Y=I_{3\pi/2}-I_{\pi/2}=2A\sin\phi,
$$
so \b[$\widehat\phi=\operatorname{atan2}(Y,X)$]. The order of the subtractions fixes the sign. Changing which arm receives the <wave phase> step requires a correspondingly changed convention.

The same data estimate $C=(I_0+I_{\pi/2}+I_\pi+I_{3\pi/2})/4$ and $A=\sqrt{X^2+Y^2}/2$. A simple model-consistency residual is $(I_0+I_\pi)-(I_{\pi/2}+I_{3\pi/2})$, which is zero for the exact stated model. It does not detect every possible systematic error.

For an original example, let $C=3$, $A=2$ and $\phi=\pi/3$. The four <light intensities> are $4$, $3-\sqrt3$, $2$ and $3+\sqrt3$. Then $X=2$, $Y=2\sqrt3$, and the recovered <wave phase> is $\pi/3$. Common background cancels, whereas changing background separately between frames need not cancel.

If independent additive errors in the four <light intensities> have common <variance> $\sigma_I^2$, first-order propagation gives
$$
\operatorname{Var}(\widehat\phi)\simeq\frac{\sigma_I^2}{2A^2}.
$$
This follows from $d\phi=(X\,dY-Y\,dX)/(X^2+Y^2)$ and difference variances $2\sigma_I^2$. It applies away from vanishing modulation and assumes the specified independent equal-noise model. <wave phase> uncertainty grows when <interference visibility> is weak.

The method is a discrete instance of <phase-shifting interferometry>, whose early digital apparatus used controlled reference-path modulation and synchronous <wave phase> extraction.<Digital Wavefront Measuring Interferometer for Testing Optical Surfaces and Lenses by J. H. Bruning and others>[Abstract, reference-arm modulation and Fourier-series detection; the four-frame derivation here is separate]{ref} The result is still a principal <wave phase>; <phase unwrapping> cannot be replaced by choosing a different arctangent branch at each pixel without a consistency rule.