---
title: 'Coded Wavefront Sensing: Methods & Applications'
url: https://www.emergentmind.com/topics/coded-wavefront-sensing-coded-wfs
type: topic
---

# Coded Wavefront Sensing: Methods & Applications

Coded wavefront sensing (Coded-WFS) denotes wavefront and phase-imaging methods in which a known optical modification encodes phase information into measured intensity patterns that are then inverted computationally. In one explicit usage, Coded-WFS is a snapshot quantitative phase imaging technique that places a random phase mask close to the image sensor and leverages the memory effect so that local speckle displacement is related to the gradient of the specimen phase; this formulation was experimentally benchmarked against digital holographic microscopy on static silica beads and dynamic HEK cells, with comparisons of simultaneous bright-field intensity and optical path delay [2508.17143]. The surveyed literature also suggests a broader Coded-WFS viewpoint in which asymmetric pupils, Fourier-plane filters, coded subapertures, coronagraph-integrated reference beams, propagation diversity, and programmable amplitude masks are all treated as engineered phase-to-intensity encoders [1303.6678, 2602.10998].

## 1. Definition and conceptual scope

In the narrow sense used for quantitative phase imaging, Coded-WFS is a **single-shot, non-interferometric wavefront sensing / phase imaging technique** that estimates specimen phase delay from the perturbation of a coded speckle pattern produced by a random phase mask near the sensor. The acquisition is “snapshot” only after calibration, because the method still requires two measurements overall: a reference image in the absence of the specimen and an object image once the specimen is inserted [2508.17143].

Related literature uses different names but shares the same organizing principle: phase information is deliberately coded into intensity by an optical transformation that is known or calibrated. This principle is stated explicitly in the pyramid-sensor literature as “The aim of a Wave Front Sensor (WFS) is to code the phase information using an incoming photon flux” [1507.07387]. In Fourier-filtering sensors, the code is the focal-plane mask; in coronagraph-integrated sensing, the code is the structured reference field created by the coronagraph; in image-domain sensing, the code is a non-centrosymmetric pupil; and in programmable computational sensing, the code is a sequence of binary amplitude masks [2210.12744, 2310.10892].

A useful conceptual distinction is between **static optical coding** and **sequential coding**. Static coding includes random phase masks, asymmetric pupils, flattened pyramids, Zernike-like phase masks, and coronagraphic reference holes. Sequential coding includes DMD-driven amplitude masks and, in a different sense, multi-plane propagation diversity, where the diversity is created by measurements at several axial planes rather than by a fabricated mask. This suggests that Coded-WFS is less a single instrument than a design pattern: recover the wavefront by inverting a known phase-to-intensity encoder.

## 2. Physical principles and forward models

The canonical Coded-WFS model for quantitative phase imaging represents the specimen by an exit wave
\[
e^{j\phi(r)},
\]
with \(\phi(r)\) the phase delay map. The key memory-effect approximation is
\[
I(r)=I_0\!\left(r-\frac{z}{k}\nabla\phi(r)\right),
\]
where \(I_0(r)\) is the reference coded image, \(I(r)\) is the object image, \(z\) is the distance between the phase mask and camera sensor, and \(k=2\pi/\lambda\). Equivalently, the local displacement field is
\[
u(r)=\frac{z}{k}\nabla\phi(r),
\]
so phase retrieval becomes optical-flow estimation followed by gradient integration [2508.17143]. The physical interpretation is directly analogous to Shack-Hartmann sensing, except that the motion field is continuous rather than lenslet-sampled.

A second major formulation is the small-aberration image-domain model used by the asymmetric pupil Fourier wavefront sensor. For a point source and a non-centrosymmetric pupil, the phase of the Fourier transform of a single direct image is linearized as
\[
\Phi=\mathbf{A}\,\varphi,
\]
or more generally
\[
\Phi=\Phi_0+\mathbf{A}\cdot\varphi,
\]
where \(\varphi\) is the discrete pupil phase vector, \(\Phi\) the sampled Fourier-phase vector, and \(\mathbf{A}\) the phase transfer matrix [1303.6678]. The decisive point is observability: with a symmetric pupil only odd modes appear in the measurable subspace, whereas a physically asymmetric pupil lifts that degeneracy.

A third formulation is coded diffraction phase retrieval. In the DMD-based architecture, the unknown field is
\[
u(x,y)=A(x,y)e^{i\phi(x,y)},
\]
the \(i\)-th binary amplitude mask is \(M_i(x,y)\in\{0,1\}\), and the measurements satisfy
\[
y_i[p]=\left|\mathcal F\{M_i\odot u\}(X_p,Y_p)\right|^2+n_i[p].
\]
Reconstruction is posed as the amplitude-flow objective
\[
\hat u=\arg\min_{\tilde u\in\mathbb C^N}\frac{1}{2m}\sum_{i=1}^m\left\|\left|\mathcal F\{M_i\odot \tilde u\}\right|-\sqrt{y_i}\right\|^2
\]
and solved with Reweighted Amplitude Flow with Optimal Spectral Initialization [2602.10998].

Propagation-diversity sensing fits the same template even though it uses no special coding mask. In multi-plane phase retrieval, the pupil field
\[
U_p(x,y)=A(x,y)e^{i\phi(x,y)}
\]
is propagated to several defocused planes,
\[
U_n(x,y)=\mathcal P_{z_n}\{U_p(x,y)\},\qquad I_n(x,y)=|U_n(x,y)|^2,
\]
and tip/tilt appears as plane-dependent lateral shifts
\[
\Delta x_n\approx z_n\theta_x,\qquad \Delta y_n\approx z_n\theta_y.
\]
This makes low-order pointing information directly observable in the same intensity data used for higher-order phase retrieval [2508.09256].

## 3. Optical architectures and coding modalities

| Approach | Optical code or diversity | Measurement domain |
|---|---|---|
| Coded-WFS QPI | Random phase mask close to the image sensor | Reference/object coded images; optical flow and phase integration |
| FPWFS | Reduced pyramid angle with 90% overlap rate | One recombined pupil intensity map |
| Coded SHWS | Array of phase-coded masks combined with lens transmittances | Correlation-peak displacement per subaperture |
| APF-WFS | Minor asymmetric obscuration of the pupil | Fourier phase of a single direct image |
| Optimized FFWFS | Numerically optimized focal-plane mask \(m=e^{i\Delta}\) | Re-imaged pupil intensity |
| PIAACMC-integrated sensing | \(\pi/2\) phase mask or Lyot-stop reference pinhole | Pupil-plane ZWFS intensity or focal-plane fringes |
| Multi-plane phase retrieval | Propagation to planes at \(\pm 1\) cm and \(\pm 5\) cm | Defocused intensities and centroid shifts |
| APUCAM | Sequential binary amplitude masks on a DMD | Multiple far-field intensity patterns |

The random-mask QPI implementation is optically close to a standard laboratory microscope except for the addition of a random phase mask near the image sensor. The phase object changes the incident wavefront, the mask converts that change into a local apparent displacement of a speckle-like coded intensity pattern, and the displacement field is related to the specimen phase gradient [2508.17143].

The flattened pyramid wavefront sensor changes the coding geometry rather than the detector or reconstruction class. By reducing the pyramid angle, the four pupil images are forced to overlap into a unique intensity, so phase information is recombined optically before detection instead of being recovered from four separated channels by differential combinations [1507.07387]. The coded Shack-Hartmann variant makes a different substitution: each lenslet is replaced by a phase-coded mask plus lens transmittance, so local tilt is estimated from the displacement of a nonlinear-correlation peak rather than from the centroid of a focused spot [2105.14509].

Image-domain sensing with APF-WFS moves the code to the pupil itself. A minor asymmetric obscuration makes the science image recoverably sensitive to high-order aberrations, enabling wavefront sensing and segmented-mirror phasing from a single aberrated PSF acquired with the science camera [1401.7566]. Fourier-filtering WFS instead treats the focal-plane mask as the design variable and optimizes it numerically to maximize phase-to-intensity conversion efficiency, so classical ZWFS and PWFS become particular points inside a larger coded-mask design space [2210.12744].

Coronagraph-integrated sensing embeds the code into the coronagraphic reference field. In the PIAACMC architecture, a \(\pi/2\)-shifted PSF core yields a Zernike wavefront sensor, while an off-axis pinhole in the Lyot stop yields Self-Coherent Camera fringes; the FAST-PIAACMC variant further engineers the focal-plane phase pattern
\[
\phi=\sum_i m_i a_i \cos\!\left(2\pi f_i x+\psi_i\right)
\]
to boost reference throughput for short-exposure sensing [2310.10892]. Sequential computational sensing with APUCAM places the code in a programmable DMD, enabling binary amplitude modulation and reference-free phase retrieval across multiple wavelengths [2602.10998].

## 4. Reconstruction pipelines and calibration

Reference-based Coded-WFS for QPI uses a compact but calibration-sensitive pipeline: record a reference coded image \(I_0(r)\), record an object coded image \(I(r)\), estimate apparent motion between them with optical flow, convert the motion field into the phase gradient, integrate the gradient to recover \(\phi(r)\), and simultaneously recover a speckle-free bright-field amplitude for weakly absorbing specimens. The reference is meaningful only if the optical system remains identical except for specimen insertion or removal, so calibration stability is a primary operational constraint [2508.17143].

Linearized adaptive-optics variants typically use calibrated interaction matrices. In FPWFS, the detector signal is converted to a meta-intensity
\[
mI(\delta)=\frac{I(\delta,n)-I(ref,n)}{I(ref,n)},
\]
the interaction matrix is defined on the first 24 Zernike radial orders corresponding to the first 299 Zernike modes, and the outgoing meta-intensity is inverted via the pseudo-inverse of the interaction matrix [1507.07387]. This is a classical small-signal framework: calibration defines the forward operator, and reconstruction is matrix inversion.

Correlation-based and image-domain methods occupy an intermediate position between direct geometric sensing and global inverse problems. The coded SHWS calibrates a reference coded response, cross-correlates each measured subaperture pattern with that reference using nonlinear cross-correlation, localizes the peak by a center-of-mass method, converts the displacement to local slopes, and reconstructs the full wavefront by a zonal reconstruction technique [2105.14509]. APF-WFS loads a single image, bias-subtracts it, re-centers it, computes its Fourier transform, samples Fourier phases at the baselines generated by the pupil model, applies the transfer-matrix pseudoinverse, subtracts an overall tip-tilt, and then estimates piston, tip, and tilt on each segment from the reconstructed pupil phase [1401.7566].

Iterative phase-retrieval methods use the coded intensities more directly. Multi-plane phase retrieval uses a modified Gerchberg-Saxton algorithm with up to five iterations and benefits substantially from pre-compensating tip/tilt using centroid estimates from the outer planes [2508.09256]. APUCAM uses Optimal Spectral Initialization followed by Reweighted Amplitude Flow, then extracts the wrapped phase from the reconstructed complex field and unwraps it by solving the Poisson equation using a discrete cosine transform [2602.10998]. In both cases, the forward model is simple but the inversion is computationally heavier than pseudo-inverse sensing.

## 5. Reported performance and application domains

| Approach | Reported result | Domain |
|---|---|---|
| Coded-WFS QPI [2508.17143] | Phase maps and bright-field intensity in agreement with DHM; compatibility with narrowband illumination and broadband white-light LED illumination | Static silica beads; dynamic HEK cells |
| FPWFS [1507.07387] | 98% used photons; 1.1 pixels versus 4 for PWFS at 90% overlap; mean linearity around 50 nm RMS; noise propagation almost as low as ZWFS for radial orders 10 to 20 | High-contrast AO |
| Coded SHWS [2105.14509] | Best full-field MSE 0.00075 versus 0.01089 for regular SHWS; best central-crop MSE 0.00045 versus 0.00705 | Subaperture slope sensing |
| APF-WFS hardware [1401.7566] | Residual wavefront errors of order \(\sim 10\) nm using 1600 nm light from a starting point of \(\sim 300\) nm in piston and \(\sim 0.3\) mrad in tip-tilt; \(0.97<S<0.99\) | Segmented-mirror fine phasing; non-common-path sensing |
| FAST-PIAACMC [2310.10892] | Post-processed sensitivity of \(\sim 10^{-7}\) with only several seconds of exposure time | High-contrast coronagraphy |
| Multi-plane jitter sensing [2508.09256] | Outer-plane weighted-average retrieval within approximately \(\pm 0.1\,\lambda/D\) for an unaberrated beam and better than \(\sim 0.5\,\lambda/D\) in aberrated conditions | Tip/tilt sensing for phase retrieval |
| APUCAM [2602.10998] | Initial RMSE \(1.66\lambda\) to \(0.22\lambda\) after five iterations and defocus removal; Strehl \(0.06\) to \(0.82\); 3–5 s reconstruction for 20 masks | Quasi-static laser-beam AO at 650 nm; sensing at 2116 nm |

These results span several distinct application regimes. In microscopy and QPI, the emphasis is snapshot operation, non-interferometric phase recovery, and compatibility with broadband biological illumination. In astronomical adaptive optics, the emphasis is photon efficiency, detector efficiency, non-common-path sensing, and segmented-aperture phasing. In laser-beam diagnostics, the emphasis is high spatial resolution, broad wavelength adaptability, and operation without wavelength-specific optical elements.

At the design level, optimized Fourier-filtering WFS pushes the coding problem toward a fundamental photon-efficiency viewpoint. The reported strategy designs focal-plane masks so that sensitivity approaches the upper bound \(s=s_\gamma=2\), which the paper treats as the fundamental limit, although the same work also states that the optimized masks inherit the very small dynamic range and strong chromaticity of ZWFS-like sensors [2210.12744]. This establishes an important theme across Coded-WFS research: coding can improve sensitivity and photon use, but it does not remove all system-level tradeoffs.

## 6. Limitations, misconceptions, and research directions

A recurring misconception is that “coded” implies either single-shot or reference-free operation. The literature shows that neither implication is universal. Random-mask Coded-WFS for QPI is snapshot only after a reference image has been acquired; APF-WFS uses a single conventional direct image but only in the high-Strehl / small-aberration regime and with an unresolved source; APUCAM is reference-free but requires 20–30 sequential coded measurements and 3–5 s reconstruction time [2508.17143, 1303.6678, 2602.10998].

A second misconception is that observability can be created purely in software. In APF-WFS the asymmetry must be physically present in the pupil: with a symmetric pupil, only odd modes are sensed, and using an asymmetric computational model without a real asymmetric obscuration showed no sign of improvement at all in the PSF [1401.7566]. The same general lesson applies to other coded architectures: the code must alter the optical transfer behavior, not merely the estimator.

A third misconception is that better coding automatically yields broad capture range or broadband robustness. The summarized literature consistently limits the strongest claims to specific regimes. APF-WFS is linearized around wavefront errors of the order of one radian or less; optimized Fourier-filtering WFS focuses on sensitivity in the linear regime and explicitly retains very small dynamic range and strong chromaticity; the multi-plane jitter-sensing paper demonstrates sensing and image-domain compensation but does not report closed-loop bandwidth or measured real-time residual jitter; the DMD-based sensor is particularly suited to slowly varying or quasi-static laser fields, where computational reconstruction speed is not of the primary concern [1303.6678, 2210.12744, 2508.09256, 2602.10998].

Current research directions in the surveyed work are correspondingly architectural. One direction is pupil-specific or PSF-specific code optimization in Fourier-filtering sensors. Another is integrated coronagraphy, where ZWFS and SCC telemetry are combined so that pupil-plane sensing and focal-plane truth sensing coexist within the same PIAACMC platform. A third is self-sensed low-order control, in which tip/tilt is estimated from the same propagation-diversity data used for higher-order retrieval. A fourth is wavelength-flexible programmable coding, where binary amplitude modulation and computational phase retrieval replace wavelength-specific wavefront-sensor optics [2210.12744, 2310.10892, 2508.09256, 2602.10998]. Taken together, these directions suggest that Coded-WFS is increasingly defined by co-design of optical encoder, calibration model, and inverse algorithm rather than by any single canonical sensor geometry.

Source: https://www.emergentmind.com/topics/coded-wavefront-sensing-coded-wfs