---
title: 'Coded Diffraction Patterns: Models & Reconstruction'
url: https://www.emergentmind.com/topics/coded-diffraction-patterns-cdp
type: topic
---

# Coded Diffraction Patterns: Models & Reconstruction

Coded diffraction patterns (CDPs) are phaseless diffraction measurements acquired after a known modulation is applied to an object before Fourier or Fresnel propagation. In the canonical discrete formulation, for an unknown \(x\in\mathbb C^n\), DFT rows \(f_k^*\), and diagonal masks \(D_\ell\), the data take the form
\[
y_{\ell,k} = |f_k^* D_\ell^* x|^2,
\]
so each mask produces a distinct intensity-only diffraction pattern of a modulated object. This measurement design replaces a single highly ambiguous Fourier-magnitude observation by a structured family of quadratic measurements, and it underlies convex lifting, alternating-projection, spectral, learning-based, and photonic optimization approaches to phase retrieval [1310.3240].

## 1. Canonical model and principal variants

In the basic CDP model, one begins with a complex-valued object
\[
x=\{x[t]\}_{t=0}^{n-1}\in\mathbb C^n
\]
and modulates it by a known waveform \(d[t]\), or equivalently by a diagonal matrix \(D=\operatorname{diag}(d[0],\dots,d[n-1])\). A single coded diffraction pattern is then the Fourier magnitude of the modulated object,
\[
y_k=\left|\sum_{t=0}^{n-1} x[t]\bar d[t] e^{-i2\pi \omega_k t}\right|^2
   = |f_k^*D^*x|^2,
\]
and the multi-mask model used for theory and reconstruction is
\[
y_{\ell,k}=\left|\sum_{t=0}^{n-1}x[t]\bar d_\ell[t]e^{-i2\pi kt/n}\right|^2,\qquad
0\le k\le n-1,\ 1\le \ell\le L.
\]
The total number of scalar measurements is \(m=nL\). A single uncoded diffraction pattern is recovered as the special case \(d_\ell[t]\equiv 1\) [1310.3240].

A broader formulation replaces the raw intensities by distorted or nonlinear measurements,
\[
b_\ell=\theta\!\big(|F\operatorname{Diag}(w_\ell)x_0|^2\big)\in\mathbb R_+^n,
\]
where \(\theta:\mathbb R_+\to\mathbb R_+\) is a possibly unknown scalar nonlinearity. In the one-bit CDP model, masks are used in pairs, and only the sign of the difference between two coded patterns is retained:
\[
y_i=\operatorname{sign}(b_i^1-b_i^2)\in\{-1,1\}^n.
\]
This formulation preserves order statistics rather than intensity values and is central to robustness, super-resolution, and blind-deconvolution results derived for CDPs under nonlinear distortions and diffraction limits [1402.2255].

The term CDP also covers propagation models beyond the far-field DFT. In coherent diffractive imaging, randomly coded masks can be placed in a near-field Fresnel geometry, yielding measurements of the form
\[
y_k(\boldsymbol{\rho})=\big|\mathcal P_z\{m_k(\mathbf r)\,o(\mathbf r)\}(\boldsymbol{\rho})\big|^2,
\]
with \(\mathcal P_z\) the Fresnel propagator. By contrast, some learning-based formulations retain the same physical acquisition but optimize against Fourier amplitudes,
\[
y_t = |\mathcal F(d_t\odot x)|,
\]
because amplitude-based losses were found easier for recovery, while explicitly noting that the physical measurement is \(|\mathcal F(d_t\odot x)|^2\) [1509.03229], [2006.04199].

## 2. Identifiability and uniqueness

The motivation for CDP is the non-injectivity of single-pattern Fourier phase retrieval. Intensity-only Fourier data arise naturally in X-ray crystallography and coherent diffraction imaging, but with a single diffraction pattern the inverse problem is nonconvex and highly ambiguous. In the PhaseLift formulation of Candès, Li, and Soltanolkotabi, random masks make the feasible set
\[
\{X:X\succeq 0,\ \mathcal A(X)=y\}
\]
collapse to the unique point \(X=xx^*\) with high probability once the number of coded diffraction patterns obeys
\[
L\ge c\log^4 n,
\]
yielding exact recovery up to a global phase and total measurement complexity \(m=O(n\log^4 n)\) [1310.3240].

That polylogarithmic requirement was sharpened almost immediately. Gross, Krahmer, and Kueng proved that \(O(\log^2 d)\) independent diffraction patterns suffice for PhaseLift recovery in the same random-mask Fourier setting, improving the \(O(\log^4 d)\) bound. Their analysis relies on near-isotropicity of the CDP measurement ensemble, robust injectivity on the tangent space \(T=\{xy^*+yx^*:y\in\mathbb C^d\}\), and an improved golfing-scheme construction of dual certificates [1402.6286].

Uniqueness can also be expressed in nonconvex fixed-point language. For two oversampled coded diffraction patterns generated by independent random phase masks, Fannjiang and Strohmer showed that the corresponding Fourier-domain Difference Map family—encompassing Fourier-domain Hybrid-Projection-Reflection and Fourier-domain Douglas–Rachford—has a unique fixed point in the object domain, up to global phase, for generic complex objects in dimension \(d\ge 2\). In a related alternating-projection analysis, one oversampled coded diffraction pattern plus a real or nonnegative object constraint is sufficient for uniqueness almost surely, while two oversampled coded diffraction patterns suffice for generic complex objects without object-domain constraints [1406.2742], [1510.07379].

The same logic extends to tomography. Under the Born and projection approximations for a discrete \(n\times n\times n\) object, standard computed tomography with full projected field measurements requires \(n\) projections for uniqueness, while tomographic phase retrieval from coded projected diffraction patterns requires \(n+1\) projection directions for unique determination up to a global phase factor. The extra projection removes a residual degeneracy that survives after random-mask phase retrieval is reduced to projection consistency [2112.14726].

## 3. Reconstruction frameworks

The foundational convex framework is PhaseLift. By lifting \(x\) to
\[
X=xx^*\in\mathbb C^{n\times n},\qquad X\succeq 0,\ \operatorname{rank}(X)=1,
\]
one rewrites CDP measurements as linear functionals,
\[
y_{\ell,k}
 = \operatorname{tr}(A_{\ell,k}X),\qquad
A_{\ell,k}=D_\ell f_k f_k^*D_\ell^*.
\]
The nonconvex rank constraint is then relaxed through trace minimization,
\[
\begin{array}{ll}
\text{minimize}   & \operatorname{tr}(X) \\
\text{subject to} & X \succeq 0, \\
                  & \mathcal A(X)=y,
\end{array}
\]
or through regularized least squares
\[
\min_{X\succeq 0}\ \frac12\|\mathcal A(X)-b\|_2^2+\lambda\,\operatorname{tr}(X),
\]
which was implemented via an interior-type subgradient optimization method of Auslender and Teboulle (2006) in TFOCS for the original CDP numerics [1310.3240].

Convex relaxations were also used in the first experimental CDI demonstration with randomly coded masks. There, PhaseCut supplied an initial estimate and a variation on Fienup’s input-output algorithm refined it. The crucial point was that the algorithm no longer required the usual object-space phase constraints or support constraints; instead, it exploited consistency across multiple known masks and their associated diffraction measurements [1509.03229].

Projection-based and fixed-point methods form a second major family. In Fourier-domain Difference Map methods, one alternates between the projector onto the object-consistent Fourier subspace,
\[
P_Oy=\Psi\Psi^*y,
\]
and the projector onto the magnitude constraint,
\[
P_My=b\odot\frac{y}{|y|},
\]
through a three-parameter map
\[
\mathcal D = I + \beta\Delta,\qquad
\Delta=P_O\big((1+\gamma_2)P_M-\gamma_2I\big)-P_M\big

Source: https://www.emergentmind.com/topics/coded-diffraction-patterns-cdp