Model-Based Retrieval of Four Years of JWST/NIRCam Wavefronts
The fidelity of data recovered by the James Webb Space Telescope (JWST) depends on precise monitoring of the mirror segments' surfaces and alignment. To this end, every few days the observatory takes pairs of defocused images of a reference star with its NIRCam instrument; a closed-source phase retrieval package is then employed to infer the wavefront. We here present camino (Computational Aberration Modelling and Inference for NIRCam Observations), an open-source algorithm to model NIRCam built in JAX using the differentiable Fresnel optics code dLUX and regularised maximum likelihood inference that has been conditioned on the entire archive of NIRCam wavefront sensing data. We typically improve the reduced chi-squared in fits to the defocused data from 60-65 to 12-13. We reconstruct the wavefront history of JWST from the beginning of science operations to early 2026. This open source implementation operates in parallel to the current STScI phase retrieval algorithm, allowing access by the broader scientific community to high-accuracy wavefront estimation and enabling its direct integration into science-analysis workflows. This represents a major step towards the ultimate goal of predictive calibration methods based on physics-based forward modelling, obviating the need for time-consuming observation of contemporaneous dedicated reference stars.