Phase unwrapping (source code)

= Phase unwrapping

\b[<Phase unwrapping>] reconstructs a <wave phase> field from measurements that determine only its value modulo $2\pi$. If a detector or complex-argument calculation returns $\theta_j=\operatorname{Arg}(e^{i\phi_j})$, then all values $\phi_j+2\pi n_j$ with integers $n_j$ give the same wrapped observation. Recovering a continuous <wave phase> therefore requires information beyond each isolated value. A primary 1982 analysis discusses this problem in <wave phase> curves obtained from image <Fourier transforms> before averaging them.<Analysis of the phase unwrapping algorithm by Kazuyoshi Itoh>[Primary abstract, phase ambiguities and tracking motivation]{ref}

Define $W(a)=\operatorname{Arg}(e^{ia})$ with principal interval $(-\pi,\pi]$. If adjacent true differences satisfy $|\phi_{j+1}-\phi_j|<\pi$, then
$$
W(\theta_{j+1}-\theta_j)=\phi_{j+1}-\phi_j.
$$
Starting from one reference <wave phase>, adding these wrapped differences reconstructs the sampled <wave phase> up to a global multiple of $2\pi$. The proof is direct: wrapping the two endpoint phases changes their difference only by an integer multiple of $2\pi$, and the strict bound selects its unique representative.

For an original example, true phases $0,0.8\pi,1.6\pi,2.4\pi$ wrap to $0,0.8\pi,-0.4\pi,0.4\pi$. Their wrapped increments are all $0.8\pi$, so reconstruction succeeds. But true increments $1.5\pi$ produce exactly the same wrapped samples as increments $-0.5\pi$. No algorithm can distinguish those two possibilities from the samples alone without a further assumption. Increasing <sampling (signal processing)> density can restore the bound only when the field's variation and noise allow it.

In two dimensions, different integration paths introduce a consistency test. A nonzero integer multiple of $2\pi$ in the sum of wrapped increments around a closed <sampling (signal processing)> loop is a <phase-unwrapping residue>. Noise, undersampling or true <wave phase> singularities can obstruct a single consistent smooth reconstruction. Choosing an integration path is therefore part of the inference.

For <interferometry>, low <interference visibility> can make the <wave phase> poorly determined even before unwrapping. Unwrapping does not recover information lost where the measured <complex amplitude> vanishes, nor does it distinguish an actual discontinuity from a smooth but insufficiently sampled change. Report the <wave phase> reference, principal interval, <sampling (signal processing)> and any continuity assumptions alongside the reconstructed field.