Is a single spectral moment enough? Testing polychromatic wavefront correction on a physical bench

Many optical measurements quietly assume that the light spectrum is symmetric around its center wavelength. When it is, errors from the short-wavelength side cancel errors from the long-wavelength side, so treating broadband light as if it had one wavelength works. Real detectors break this assumption, because their sensitivity rises or falls across the band. The strongest published fix for wavefront sensing simulates every wavelength separately and averages the results. It has only ever been tested in simulation, and it runs nearly five times slower. We propose a simpler hypothesis and a physical test. Most of the damage from an asymmetric spectrum comes from using the wrong single wavelength. Replacing the band center with the detector-weighted mean wavelength should recover most of the accuracy of the full multi-wavelength method at single-wavelength cost. Whether that holds, and whether either method's simulated gains survive a real camera, can only be settled on hardware.

The setting is virtual Shack-Hartmann wavefront sensing. This is a technique that measures the optical field once and then numerically passes it through a simulated array of tiny lenses. The shift of each lens's focal spot reveals the local tilt of the wavefront, the shape of the light's phase front, and from these tilts the aberrations of an eye are reconstructed. The contribution is twofold. First, a short perturbation argument predicts which error terms matter. Second, a bench with controllable spectral asymmetry and an independent ground truth tests those predictions where simulation-only work cannot.

Core Claim

Accounting for Polychromatic Light in Virtual Shack-Hartmann Wavefront Sensing introduced Multiple-Wavelength Centroid-Weighting (MWCW). The method samples $n$ wavelengths across the source spectrum, propagates each through the virtual lenslets, and weights the resulting spot shifts by the measured spectral intensity. On 20 clinical aberration profiles it reports 2.0 nm RMS wavefront error versus 5.7 nm for the center-wavelength (CW) approximation under asymmetric spectra, and 5.8 nm versus 17.6 nm at 60 nm bandwidth. Its runtime is 4.8 s versus 1.0 s. That paper motivates our work, because it establishes the size of the problem. It also defines the method we must beat. Its limitation is that the diffraction, the detector integration and the spectral weights were all synthetic.

Our claim comes from expanding the per-wavelength spot shift $c(\lambda)$ around a chosen reference wavelength $\lambda_e$, with $w(\lambda)$ the normalized product of source spectrum and detector quantum efficiency:

$$\bar c=\int w(\lambda)\,c(\lambda)\,d\lambda \approx c(\lambda_e) + c'(\lambda_e)\,(\mu-\lambda_e) + \tfrac12 c''(\lambda_e)\,\sigma^2 ,$$

where $\mu$ and $\sigma^2$ are the mean and variance of $w$. CW sets $\lambda_e$ to the band center $\lambda_0$. Under an asymmetric $w$, the mean $\mu$ differs from $\lambda_0$, so CW pays a first-order error proportional to $\mu-\lambda_0$. Choosing $\lambda_e=\mu$, which we call moment-matched CW, removes that term exactly. Only a second-order residual proportional to $\sigma^2$ remains, plus skewness terms at third order.

This yields three falsifiable predictions. CW error should scale linearly with the mean offset $\mu-\lambda_0$. The moment-matched-CW error should scale with bandwidth squared. MWCW's advantage over moment-matched CW should be negligible at narrow bandwidth and appear only near the 60 nm regime. If MWCW's large gains at 60 nm are mostly second-order, the full method is justified there and nowhere else. If they are mostly first-order, a one-number correction makes real-time polychromatic correction available for free.

Research Program

The work has three parts.

Simulation sweep. We first reproduce the MWCW simulation pipeline and sweep spectral shape on a controlled grid. Mean offset and variance are varied independently, and skewness is varied at fixed mean and variance. Running CW, moment-matched CW, MWCW and a second-order-corrected variant on this grid tests the expansion's predictions in the regime where they should hold exactly.

Physical bench. We then build the bench. The light source is a broadband source shaped by interchangeable filters, which produces spectra with known, independently measured asymmetry. The camera's quantum efficiency is measured with a monochromator rather than taken from the datasheet. Aberrations are written by a deformable mirror or phase plates to reproduce the clinical Zernike profiles used by Yue et al. Ground truth comes from measuring the same aberration with narrowband filtered light at several wavelengths, where the polychromatic problem is absent. A scattering model-eye phantom adds a second condition that approaches the tissue scattering the original paper left out.

Reality-gap measurement. Finally, we build a digital twin of the bench, using the same simulation fed with the measured spectra and quantum efficiency. The reality gap is defined as the difference between simulated and measured error for identical inputs. It is decomposed by toggling, in simulation, three factors: detector read noise, scattering, and the error in the quantum-efficiency estimate.

Relation to Prior Work

The wider literature shows the same pattern: asymmetry is characterized physically, but its consequences are evaluated only in simulation.

Preflight Spectral Calibration of the Ozone Monitoring Suite-Nadir on FengYun 3F Satellite measured asymmetric central and secondary peaks in a satellite spectrometer's response. It then judged their effect (above 5% error at absorption-line centers) purely through radiative transfer simulation. Point spread function wavefront recovery from in-focus stellar observations recovers telescope wavefront errors from multi-spectral stars. It assumes known stellar spectra and Gaussian noise on 2,400 synthetic stars. Both motivate our physical evaluation, and our moment analysis applies directly to the WaveDiff question of how wrong a stellar spectrum may be before recovery degrades.

The counterexample is Measurement Improvement of Distributed Optical Fiber Sensor via Lorenz Local Single Peak Fitting Algorithm. It validated its asymmetry handling on hardware against an embedded fiber Bragg grating reference, reporting 4% versus 8% maximum temperature error. We borrow its validation design, an independent physical reference sensor, rather than its method.

The wider concern that simulator-tuned solutions break on transfer (The Reality Gap in Simulation Based Evaluation; Towards the targeted environment-specific evolution of robot components) constrains us. A method ranking established in simulation is treated as a hypothesis, not a result.

Baselines

Naive reference: CW reconstruction. The do-nothing baseline is CW reconstruction at the nominal band center, exactly as in Yue et al. It is the default practice, and its reported 5.7 nm and 17.6 nm errors anchor the simulation reproduction. Beating it is necessary but not interesting.

Strongest competitor: MWCW. The strongest existing method is MWCW as published. It is run with the same measured spectra, the same camera frames, and the same reconstruction code apart from the wavelength handling. Its sample count $n$ is swept so it is not handicapped by a poor discretization. The reported reference is 2.0 nm RMS (asymmetric spectra) and 5.8 nm at 60 nm bandwidth, against 1.0 s for CW and 4.8 s for MWCW, all from Yue et al. On hardware we have no reported number; no reported result found on Lacuna for MWCW on a physical bench.

Proposed method and what counts as success. Moment-matched CW "beats" MWCW in the practical sense if three conditions hold on the bench. Its error must be within the run-to-run noise floor of MWCW at bandwidths up to roughly 30 nm. It must retain at least most of MWCW's improvement over CW at 60 nm. Its runtime must match CW's. If MWCW is clearly better at all bandwidths on hardware, the hypothesis is refuted.

Ablations isolating the key ingredient. The key ingredient is the measured spectral weighting, so three ablations target it. The first is moment-matched CW using datasheet rather than measured quantum efficiency, which isolates calibration error. The second adds the $\sigma^2$ correction term, which tests whether the second-order residual is what MWCW buys. The third is MWCW with small $n$ of 2 to 3 wavelengths. Every method receives the same frames and the same reconstruction pipeline, and none is tuned on the test aberrations.

Why not just…?

Why not just use MWCW with only two or three wavelengths? This is a real threat. A coarse MWCW may capture both first- and second-order terms at roughly two to three times CW cost. We treat it as a competing endpoint in the $n$ sweep. If three samples match full MWCW on hardware while moment-matched CW does not, the conclusion becomes "coarse sampling, not moment matching." That would still be a useful, cheaper recipe.

Why not just add realistic noise to the simulator and skip the bench? The unknown is the error source nobody parameterized. Candidates include scattering, the mismatch between datasheet and true quantum efficiency, and nonlinear detector response. WaveDiff's authors explicitly list such effects as open. The digital-twin comparison measures exactly how much error the noise-augmented simulation fails to predict. If that gap is negligible, the result is itself evidence that simulation suffices for this problem.

Why not just narrow the bandwidth with a filter? Filtering removes the polychromatic problem by discarding photons. The resulting loss in signal-to-noise may cost more accuracy than asymmetry did. The bench measures this directly by comparing filtered-CW error at matched exposure against broadband moment-matched CW and MWCW.

Why not just learn a correction network from simulated data? Such a network would inherit the simulator's assumptions about spectrum and detector, which is the very gap at issue. Spectral Response Function Guided Deep Optimization-driven Network for Spectral Super-resolution found physics-guided reconstruction outperforming purely data-driven networks. That work was also validated only on static benchmarks with assumed-known response functions. We include no learned model, because it would not address the question of physical validity.

Proposed Experiments

The decisive checks follow from the expansion.

The first check is in simulation. Plotting CW error against $\mu-\lambda_0$ at fixed variance should give a line, and moment-matched-CW error against bandwidth should give a quadratic. A failure here would mean the perturbation picture is wrong before any hardware is built.

The second check is on the bench, across spectra matching the asymmetric and 60 nm conditions of Yue et al. We report RMS wavefront error against the narrowband ground truth for all methods on the reproduced clinical profiles, with and without the scattering phantom, along with runtime.

The third check is the reality-gap decomposition: simulated minus measured error per method. This shows whether the simulated ranking of CW, moment-matched CW and MWCW is preserved. If MWCW's 2.0 nm advantage shrinks on hardware because detector noise dominates, the published case for its 4.8× overhead weakens. If it grows, the multi-wavelength approach is vindicated beyond what simulation showed.