Using AI for Wave-front Estimation with the Rubin Observatory Active Optics System

The Vera C. Rubin Observatory will, over a period of 10 yr, repeatedly survey the southern sky. To ensure that images generated by Rubin meet the quality requirements for precision science, the observatory will use an active-optics system ( AOS ) to correct for alignment and mirror surface perturbations introduced by gravity and temperature gradients in the optical system. To accomplish this, Rubin will use out-of-focus images from sensors located at the edge of the focal plane to learn and correct for perturbations to the wave front. We have designed and integrated a deep-learning ( DL ) model for wave-front estimation into the AOS pipeline. In this paper, we compare the performance of this DL approach to Rubin ’ s baseline algorithm when applied to images from two different simulations of the Rubin optical system. We show the DL approach is faster and more accurate, achieving the atmospheric error ﬂ oor both for high-quality images and low-quality images with heavy blending and vignetting. Compared to the baseline algorithm, the DL model is 40 × faster, the median error 2 × better under ideal conditions, 5 × better in the presence of vignetting by the Rubin camera, and 14 × better in the presence of blending in crowded ﬁ elds. In addition, the DL model surpasses the required optical quality in simulations of the AOS closed loop. This system promises to increase the survey area useful for precision science by up to 8%. We discuss how this system might be deployed when commissioning and operating Rubin.


INTRODUCTION
The Vera C. Rubin Observatory's Legacy Survey of Space and Time (LSST) will spend ten years imaging the entire southern sky to unprecedented depth (Ivezić et al. 2019).LSST promises to improve cosmological constraints by an order of magnitude (The LSST Dark Energy Science Collaboration et al. 2018), dramatically expand our understanding of galaxy evolution (Robertson et al. 2017)

, unveil the transient and variable sky
Corresponding author: John Franklin Crenshaw jfc20@uw.edu(Hambleton et al. 2022), and provide an inventory of the Solar System of unprecedented completeness (Schwamb et al. 2018).
To enable the wide variety of science undertaken by LSST, the Rubin Observatory must deliver high and consistent optical quality across the entire 3.5 degree field of view (FoV).The median seeing at Rubin's site on Cerro Panchón is 0.65" (Ivezić et al. 2019), and Rubin's optical system is required to degrade this value by no more than 0.4" (see Appendix A).To meet this requirement, the Rubin Observatory will use an active optics system (AOS) to provide real-time corrections to the optical alignment and mirror figure, which are perturbed by gravity and temperature gradients (Thomas et al. 2017;Neill et al. 2014).The AOS uses 228 actuators to control the surface figure of the mirrors (156 actuators on the joint primary/tertiary mirror, called M1M3, and 72 actuators on the secondary mirror, called M2), and 2 hexapods to adjust the positions and rotations of M2 and the camera.A position-and temperaturedependent lookup table (LUT) is used in an open-loop to apply optimal mean corrections before each exposure.These mean corrections are, however, unable to account for hysteresis, dome seeing, small-scale temperature gradients, and temperature uncertainties.
The Rubin AOS will use a closed-loop to detect and correct these residual errors.At each corner of the focal plane, there are curvature wavefront sensors (CWFSs) consisting of an offset pair of CCDs: one 1.5 mm inside of focus (intra-focal) and one 1.5 mm outside of focus (extra-focal), corresponding to 24 µm RMS of wavefront defocus.These out-of-focus images are used to infer perturbations to the optical wavefront, from which actuator and hexapod corrections are determined.Due to the fast cadence of LSST, wavefront inference and correction of the optical system must be completed in less than 12 seconds, and this whole process must be repeated every 36 seconds for the duration of an observing run.To deliver the optical quality required for LSST, the AOS must limit the PSF (Point Spread Function) FWHM (Full Width Half Maximum) contribution of optical aberrations to no more than 0.09", including only 0.079" due to misestimation of the wavefront -less than 10% of the total error budget (see Appendix A).
There are several features of Rubin's design that make wavefront estimation difficult: (i) the primary mirror has a large central obscuration (R inner /R outer = 0.61), which results in a large loss of information about the wavefront; (ii) the optical beam is very fast (f /1.23), which results in a non-linear projection of the reference sphere onto the pupil; (iii) the CWFSs are at the edge of Rubin's wide field of view, generating pupil distortion and vignetting of the out-of-focus images; (iv) the images from the intra-and extra-focal sensors are of different sources, which have different intrinsic properties and field-dependent wavefront variations that must be accounted for.
The baseline algorithm for wavefront inference is an iterative solver of the transport of intensity equation (TIE), described in Xin et al. (2015).This algorithm has been implemented and tested in the Rubin AOS pipeline (Thomas et al. 2022b), but there are several limitations that could be improved upon, including degradation of wavefront estimation in the presence of vignetting from the camera body and blending in crowded fields, and slow evaluation times.The vignetting and blending limitations constrain source selection for wavefront estimation, and in the densest 8% of fields it is expected that there will be no sources available for reliable wavefront estimation with the TIE.The limitation on time reduces the number of sources that can be used to constrain the wavefront.
In this paper, we build, integrate, and test a deep learning (DL) wavefront estimator that uses convolutional neural nets (CNNs) to learn a mapping from individual out-of-focus images and metadata to the optical wavefront.Previous papers have built prototype CNNs for wavefront estimation with Rubin (Thomas et al. 2020(Thomas et al. , 2021)), but this is the first time such a system has been integrated into the Rubin AOS pipeline, and validated against the baseline algorithm.In addition, Yin et al. (2021) built a prototype network that directly estimates control parameters, without the need for first estimating the wavefront.In this paper, we focus on estimating the wavefront, as this allows direct comparison to the baseline Rubin algorithm.We show that our system outperforms the baseline algorithm on simulations of Rubin images, including dramatic improvements in the case of vignetting and blending, and faster evaluation times.
In Section 2 we describe the simulations we use to train and test our system.In Section 3 we describe the baseline wavefront estimation algorithm, and the details of our deep learning approach.In Section 4 we compare the performance of our deep learning system to the baseline algorithm.We discuss these results and conclude in Section 5.

SIMULATED DATA
In this section, we describe the simulations used to train and test the deep learning model.In particular, we train the network on 256 000 donuts simulated with the Batoid (Meyers et al. 2019) package, and simulate validation and test sets each containing 32 000 donuts.The validation set is used to avoid overfitting during training, and the test set is used for computing metrics for comparison to the baseline wavefront estimation algorithm.We also simulate the AOS closed loop using an independent raytracing package PhoSim (Peterson et al. 2015), which allows us to test whether the network has overfit on details specific to the Batoid simulation.

Batoid simulations
The network training data and the test data for the metrics in Section 4.1 were generated using the Batoid (Meyers et al. 2019) raytracer to simulate the Rubin optical system.The atmosphere, photometric bandpasses, and image sensors were simulated using GalSim (Rowe et al. 2015).The components of these simulations are detailed below: 1. We select a set of observing conditions from the baseline LSST OpSim simulation (LSST Science Collaboration et al. 2017).This includes the photometric band, the airmass, the 500 nm seeing at zenith, and the sky brightness.For details on the simulated atmosphere, see Appendix D.
2. From the baseline OpSim simulation, we select a random astronomical pointing, and query the Gaia (Gaia Collaboration et al. 2016) DR2 (Gaia Collaboration et al. 2018) reference catalog for stars at this pointing that fall on the CWFSs.For each star, we retrieve the position, and the apparent Gaia magnitudes (G, G BP , G RP ).We use the following equation from Chapter 5 of the Gaia DR2 documentation (Busso et al. 2018) to estimate the equivalent magnitude in the SDSS r band: where x = G BP −G RP .We then assume the LSST r magnitude is the same as SDSS, sample a random temperature in the range 4 • 10 3 K < T < 10 4 K, and use a blackbody spectrum to calculate the observed magnitude in the given LSST band.We clip bright magnitudes at 14 to save computational time during photon raytracing.
3. We generate a random set of perturbations to the Rubin optical state, and extract the Zernike coefficients of the corresponding wavefront perturbation.This is detailed in Appendix B.
4. Given the set of stars and the estimated sky background we simulate these sources using Batoid and Galsim, with an exposure time of 15 seconds.
5. We select the 8 brightest sources per CWFS and cut out stamps of 160x160 pixels, yielding 32 donuts per simulation.
The slowest step is the atmosphere generation, so for each atmosphere generated in step 1, we repeat steps two through five 100 times.We generate 100 different atmospheres, resulting in a total of 320 000 donut stamps, which we split 80%/10%/10% into training/validation/test sets.Each of these sets have distinct sets of atmospheres and optical perturbations.Fig. 1 shows eight example donut stamps.The shape of the donuts is due to their position at the far edge of the field of view, resulting in pupil distortion and vignetting of rays by the telescope and camera bodies.For example, the left two donuts in the top row have soft vignetting from the edges of the telescope mirrors, while the top right and bottom left donuts have sharp vignetting from the camera body.Some of these donuts have bright blends, which we define as an overlapping donut within 2 magnitudes of the central donut.Others have faint blends.The impact of these donut features on wavefront estimation will be explored in Section 4.1.

PhoSim
To provide a test of the robustness of the neural network to the properties of the training sample (prior to real data being obtained by Rubin), we evaluate our Batoid-trained network on simulations from PhoSim (Peterson et al. 2015), an independent raytracing simulation.PhoSim simulates the atmosphere, telescope, camera, and detector, and was developed for the Rubin Observatory to model the expected images from the telescope.PhoSim uses different simulation strategies from Batoid and GalSim, and produces donut images that are not identical to the Batoid donuts, both in their shapes and intensity patterns.In addition, the PhoSim simulations we use have some features, such as mirror print through, that are not present in our Batoid simulations.These features make the PhoSim simulations a good candidate for testing how well our model adapts to other data sets.In Section 4.2, we use our deep learning model to estimate wavefronts as a part of the AOS closed loop simulated with PhoSim.

WAVEFRONT ESTIMATION
The Rubin AOS uses out-of-focus images of stars, which appear as donuts, to estimate the wavefront of the telescope.The wavefront, φ, is expressed as a linear combination of annular Zernike polynomials (Mahajan 1981), Z i , with expansion coefficients (2) A is the area of the pupil, which implicitly defines the normalization of Z i , and ρ is a 2D position vector on the pupil.The goal of wavefront estimation is to estimate the values of the coefficients α i .Only coefficients 4-22 (numbered according to Noll's convention (Noll 1976)) are currently used to define perturbations in Rubin's optical system (Xin et al. 2015).
Note that even with perfect alignment and mirror figure, every telescope has non-zero off-axis optical aberrations, i.e. α 0 i ̸ = 0. Since we do not aim to "correct" these intrinsic aberrations from the design of the telescope, we seek to instead estimate α i − α 0 i .We will continue using the symbol α i and the term "wavefront", leaving the subtraction of the intrinsic aberrations implicit.Furthermore, as the wavefront varies across the focal plane, we aim to estimate the wavefront at the center of the boundary between the intra-and extra-focal chip of each CWFS pair.After estimating the wavefront, we scale each coefficient α i by a factor s i , such that |s i α i | is approximately the degradation of the PSF FWHM due to the excitation of Zernike mode Z i (see Appendix C for details).For the rest of this paper, we use this scaling to express Zernike amplitudes and wavefront estimation errors in terms of the equivalent PSF FWHM degradation.
The baseline wavefront estimation algorithm of the Rubin AOS is explained in Section 3.1.In Section 3.2, we discuss our deep learning model, including the design and training of the neural network.

Baseline wavefront estimation with the transport of intensity equation
The baseline wavefront estimation algorithm of the Rubin AOS uses the transport of intensity equation (TIE), I(ρ, 0) is the intensity pattern on the pupil, which is located at z = 0.The TIE is essentially a conservation of energy equation in the paraxial limit, and relates the z-derivative of the intensity to the curvature of the wavefront.The AOS uses a pair of intra-and extrafocal images to approximate the intensity at the pupil and the z-derivative across the pupil.The TIE is then solved using an expansion of the wavefront in annular Zernike polynomials1 .The Rubin AOS does not take images of the same stars on both sides of focus, but rather relies on simultaneous images of different stars on distinct intra-and extrafocal sensors.This formally violates the assumptions of the TIE, and requires additional steps to mitigate problems including different pupil masks and intensities, and variations of the wavefront across the focal plane.The fast f -number, and the location of the CWFSs at the very edge of the field of view add additional complications.Xin et al. (2015) explains the algorithm in detail.The existing implementation of this TIE solver in the Rubin AOS pipeline will serve as the baseline against which our deep learning model is compared.

Deep learning wavefront estimation
The deep learning (DL) wavefront estimator is summarized in Fig. 2. A convolutional neural network (CNN) extracts information from a single donut image, and produces a set of image features.These features, along with some metadata, are fed into a set of fully connected layers that estimate the Zernike coefficients of the wavefront.The metadata consists of: (i) a flag indicating whether the image is intra-or extra-focal; (ii) the field angle of the star; (iii) the effective wavelength of the photometric band in which the donut was imaged.
We test two different architectures, both of which have the structure presented in Fig. 2, but differ in the details of the network layers contained inside the CNN and fully connected stages.The first is the architecture designed for wavefront estimation by Thomas et al. (2021).The second uses ResNet-18 (He et al. 2016) (with the final prediction layer removed) as the CNN, plus three fully connected layers to predict Zernike coefficients from the image features and metadata.ResNet-18 is a network that was trained on image classification for the ImageNet Large Scale Visual Recognition Challenge (ILSVRC).We initialize ResNet-18 with its pretrained parameters, and test versions where those parameters are frozen during training, and where those parameters are free to change with the rest of the network parameters.For the fully connected layers, we use three layers of size (171,57,19), the first two of which are followed by batch normalization and ReLU activation.The output dimension 19 corresponds to the 19 Zernike coefficients we are estimating.The former two dimensions were chosen to be equally spaced logarithmically between 516 (512 image features output by ResNet-18 + 4 items of metadata) and the output dimension (19).
For both network architectures, we apply the same preprocessing to the data.We rescale each image so that all pixel values are between 0 and 1.We then calculate the mean and variance of all pixels in the training images, and whiten the pixels We also calculated the training-set mean and variance of each item of metadata, and whitened them as well.
Note that these same transformations are applied to the test set before network evaluation, using the means and variances calculated from the training set.
We train the networks to minimize the residual sum of squares (RSS) of the estimated Zernike coefficients and the true coefficients, including the weighting for the PSF FWHM degradation.In other words, the network is trained to minimize the PSF width.We begin training using Adam (Kingma & Ba 2015) with a learning rate of 3 × 10 −4 , and decrease the learning rate by a factor of 10 whenever the validation loss does not decrease for 10 epochs.We stop training whenever the validation loss has not improved for 20 epochs.
When training the network whose CNN is the pretrained ResNet-18, we have a choice to make about how to handle the pre-trained parameters.We can keep the pre-trained parameters fixed during training, and only allow the fully connected layers to adjust their parameters, or we can unfreeze ResNet-18, and allow its parameters to be tweaked during training as well.We found that unfreezing the ResNet-18 parameters resulted in a much better validation loss.
Both the network from Thomas et al. ( 2021) and ResNet-18 with unfrozen parameters achieved good validation losses, plateauing near the atmospheric error floor (see Section 4.1.1 and Appendix D).However, the network from Thomas et al. (2021) did not achieve as high of an optical quality as the unfrozen ResNet-18 when tested in the simulated AOS closed loop (see Section 4.2).This suggests it is not as adept at domain adaptation as ResNet-18.For the rest of this paper, we consider only the model that uses ResNet-18 with unfrozen parameters.We note that Yin et al. (2021) tested a wider variety of neural network architectures for a similar AOS task, and also found that ResNet-18 achieved the best results.

RESULTS
In this section we compare the performance of the deep learning (DL) model to the baseline wavefront estimator (TIE).First, we evaluate performance on the Batoid test set.Then, we test both algorithms on the AOS closed loop simulated with PhoSim.For both of these sections, we use the DL algorithm to estimate the wavefront from pairs of intra-and extra-focal donuts, and average the wavefront estimation from each.This is because the TIE solver must operate on intra-/extrafocal pairs.Averaging DL estimates for the same pairs of donuts allows an apples-to-apples comparison of the two algorithms.In the final section, we evaluate the DL model on individual donuts, and discuss the trade-offs with estimation using pairs of donuts.
For all sections below, we define the error as the sum in quadrature of the PSF-weighted wavefront residuals, where αi is the estimated coefficient, and α i is the truth from the simulation.Due to the weights s i , this error is approximately the degradation of the PSF FWHM in arcseconds due to the misestimation of the wavefront (see Appendix C).We note that it takes about 70 ms for the AOS pipeline to return a wavefront estimate when using our DL model, while it takes more than three seconds when using the TIE solver.Thus the DL algorithm is about 40 times faster than the baseline algorithm when estimating the wavefront from a single pair of donuts.Even more substantial speed-ups are possible if you do not constrain the neural network to operate on pairs one-ata-time like the TIE solver does, as neural networks are very efficient at massive, parallel evaluation.In other words, the DL model enables vectorized wavefront estimation.2This speed comes at the up-front computational cost of simulations and network training, but given the goal is to design an algorithm that is able to operate quickly during real-time operations, this tradeoff is worthwhile.

Performance on Batoid test set
In this section, we evaluate the performance of the DL and baseline algorithms on pairs of donuts from the Batoid test set, first under ideal conditions, then with varying SNR, vignetting, and blending.

Performance in ideal conditions & comparison to expected atmospheric error
First, we evaluate the performance on an idealized sample that contains no camera vignetting and no bright blends.An example is shown in Fig. 3.An intraand extra-focal donut are fed into the AOS pipeline, and both the DL and TIE algorithms are used to estimate the Zernike coefficients.The estimates from each method are shown, along with the true wavefront from the simulations.The error bars on the true wavefront are the median errors expected from the atmosphere (see Appendix D).In ideal conditions, an optimal estimator should be consistent with the truth, within the uncertainty from the atmosphere.In this example, the DL estimate is consistent with the truth within this uncertainty (p-value ∼ 0.89), while the TIE estimate is not (p-value ∼ 0).
To get a sense of how these methods perform on average, we plot the error distributions for each in Fig. 4. The DL model systematically outperforms the TIE: the TIE median error is 2 times greater than the DL median, and the low-error tail of the TIE is still on the high-error side of the DL distribution.The expected error distribution from the atmosphere alone is plotted in gray.This distribution is very close to the DL error distribution, suggesting the DL errors are dominated by the irreducible atmospheric errors.The TIE error distribution, on the the other hand, is shifted to significantly greater errors, indicating a model bias.This is not surprising, as our TIE solver violates several assumptions of the basic TIE method (see Section 3.1).
The AOS wavefront estimation error requirement (Thomas et al. 2022a; Sebag & LSST Systems Engineering Integrated Project Team 2016) of 0.079" is also marked by a vertical black line in Fig. 4. The DL model is able to meet this requirement 57% of the time using only a single pair of donuts.In contrast, the TIE solver virtually never meets this requirement using only a single pair.Note that you still need a wavefront solution from at least three of the CWFSs in order to interpolate the wavefront solution across the focal plane.This carries the added benefit of averaging over the atmospheric errors that are correlated across any individual CWFS.

Varying SNR
To assess the impact of the image signal-to-noise ratio (SNR), we simulate pairs of stars (isolated, with no cam-  era vignetting) imaged in the Rubin r band with SNR ranging from 10 to 600.We define the total SNR as the total source flux divided by the noise, where the noise includes both the Poisson uncertainty in the source flux and the sky background: where ) is the number of pixels in a donut.For Rubin, R d ≈ 66 pixels is approximately the radius of a donut, and ϵ = 0.61 is the fractional obscuration of the primary mirror.
Fig. 5 shows the median wavefront estimation error as a function of the SNR, along with the current minimum SNR specified by the Rubin AOS pipeline.The top axis shows the corresponding source magnitude for the median r band sky brightness of 21.20 AB mag arcsec −2 (Ivezić et al. 2019).Both methods plateau at high SNR, corresponding to the medians of the distributions in Fig. 4.Both methods begin to degrade once the total SNR drops below 200.The DL model degrades more slowly, however, and its performance near the AOS SNR limit is similar to the performance of the TIE in the high-SNR regime.

Camera vignetting
In this section, we investigate the impact of camera vignetting on wavefront estimation.All of our donuts experience some amount of vignetting.For donuts at a field angle less than about 1.74°, this is a soft vignetting by the mirror edges.For donuts at a greater field angle, there is sharp vignetting from the body of the Rubin camera.This sharp vignetting impacts 43% of the intrafocal CWFSs, which are farther from the center of the focal plane than the extra-focal CWFSs.
In Fig. 6, you can see the wavefront estimation errors as a function the field angle of the intra-focal donut.Above the scatter plot, you can see donut stamps characteristic of the given field angle.Below a field angle of 1.74°, there is soft vignetting from the mirror edges, and beyond this point there is sharp vignetting from the camera body.This transition is associated with a dramatic decline in the accuracy of wavefront estimation with the TIE solver.On the other hand, the DL model is not appreciably impacted by camera vignetting.
This effect can also be seen in Fig 7, which shows the wavefront error distributions for these two regimes.For the TIE, the camera-vignetted distribution is shifted towards higher errors, while for the DL model, the two distributions are indistinguishable.For camera vignettes, the TIE median error is 5 times worse than the DL median.

Blending
In this section, we evaluate the impact of blending on wavefront estimation.First, we investigate bright blends, which we define as blends where the overlapping star is within 2 magnitudes of the central star.
Considering only donuts with a single bright blend, in Fig. 8 we plot the wavefront estimation error vs the  distance between the centroids of the central donut and the blending donut.It is evident that the performance of the TIE solver degrades substantially once the blending donut is within approximately 88 pixels of the central donut (for reference, the donut radius is approximately 62 pixels).The left panel of Fig. 8 shows a blended donut for which the TIE estimate is substantially degraded, with the corresponding TIE error marked with a red cross on the right.You can see the distance at which TIE performance substantially degrades roughly corresponds to the distance at which the central obscurations of the two donuts begin to overlap.Whether the central obscurations for any specific pair of donuts actually overlap at this distance, however, is a function of field angle, orientation of the blend, and the optical perturbations.Interestingly, whether or not the central obscurations actually overlap is not a deterministic predictor of whether the TIE catastrophically fails.Regardless, the DL model appears robust to this transition, with similar performance in both regimes.
After removing donuts with bright blends at a distance less than 88 pixels, we compare the performance as a function of the number of bright blends.In Fig. 9, you can see the TIE solver is significantly worse with a single bright blend.With 2 or more bright blends, the TIE solver typically fails catastrophically, because the TIE solver masks blended pixels, and with more than a single blend, too much information is lost.This results in the noisy distribution in Fig. 9, which has far fewer samples than the unblended and single blend cases.For the DL model, on the other hand, the single blend distribution overlaps the unblended distribution, and the 2+ blend distribution is only slightly degraded.This demonstrates the robustness of the DL model to blending.For single blends where the TIE is relatively successful, the TIE median error is still 14 times worse than the DL median.
Previously, we have only considered bright blends, which were defined as blends within 2 magnitudes of the central star.However, fainter blends essentially modulate the background of the donut, and can also impact wavefront estimation.We define ∆m to be the difference between the magnitude of the blending star and the central star, and divide the faint blends into two groups: those where the faint blends are at most 1 magnitude beyond the bright blend cut (2 < ∆m < 3), and those where the faint blends are more than 1 magnitude beyond the bright blend cut (∆m > 3).
Fig. 10 plots the median wavefront estimation error as a function of the number of both kinds of faint blends.Both methods are robust to the presence of faint blends that are greater than 3 magnitudes fainter than the central star.However, the TIE method degrades as you add blends between 2 and 3 magnitudes fainter than the central star (these are blends less than 1 magnitude past the bright blend cut).The DL model also experiences some degradation, although to a lesser extent and with more faint blends.
These results indicate the DL model has the potential to dramatically improve AOS performance in very crowded fields where significant blending is unavoidable.These results also provide information that can be used to improve the donut selection criteria for the TIE algorithm.

Performance on PhoSim closed loop
We wish to understand how the DL wavefront estimator performs when integrated into the full AOS pipeline, including the optical controller that takes the wavefront estimate as an input, and outputs commands to the actuators and hexapods.We also wish to understand how the method performs on data sets not generated with Batoid, to ensure the DL model has not overfit on details specific to Batoid that do not translate to real data.As we do not yet have real images from Rubin, we will perform this test on PhoSim simulations (see Section 2.2 for details).
We use PhoSim to simulate the AOS closed loop.That is, we start with a simulated telescope with random optical perturbations, and simulate unblended, unvignetted, high-SNR donut images on the intra-and extra-focal The PSF FWHM and PSSN as a function of closed loop iteration, when using the DL and TIE methods for wavefront estimation.The AOS requirements are marked by the horizontal dashed lines.The PSF FWHM must be below this limit, and the PSSN must be above this limit.For both metrics, there is an inset that zooms into the last two iterations, where you can see the DL method slightly outperforms the TIE.
chips of each CWFS.We cut out a 160x160 postage stamp of each donut, and use the DL algorithm to estimate the wavefront for each.This information is fed into the optical feedback controller, which uses the wavefronts to derive optimal forces to apply to each actuator and hexapod, and these commands are applied to the simulated telescope.The updated telescope model is then used to re-simulate images of the same stars, and this process is repeated in a loop.If the estimated wavefront is close to the true wavefront, the optical quality will improve, and on the next iteration, the true wavefront will have smaller perturbations.The estimate of the wavefront perturbations is expected to decrease with each iteration, until the simulated telescope is near perfect alignment and mirror figure.It is important to test whether our DL estimator is capable of estimating wavefronts that drive the system towards and maintains the required optical quality.
The two metrics we track here are the PSF FWHM and the PSSN (Normalized Point Source Sensitivity).The PSF FWHM represents the resolution of imaging, and PSSN is related to the relative SNR of observations and therefore represents the efficiency loss in telescope observing time (Seo et al. 2009).The AOS closed loop is required to converge to a FWHM of less than 0.19" and a PSSN greater than 0.91 (see Appendix A).
The PSF FWHM and PSSN as a function of closed loop iteration are plotted in Fig. 11 for the DL and TIE algorithms.In these simulations, both algorithms meet the requirements, which are plotted in gray.Furthermore, after reaching their optimal values, both algorithms maintain the same optical quality on subsequent iterations, demonstrating the robustness of the DL model to atmospheric noise and the stability of the system when working together with the optical controller.In the inset zoom-in's, you can see the DL model slightly outperforms the TIE on both metrics.This improvement is modest, however, indicating the real strength of the DL method will not be in the case where you have an unblended, unvignetted, high-SNR donut on every wavefront sensor, but rather in the cases where one or multiple of these optimistic assumptions are broken.Testing closed loop convergence in less optimal conditions is a future goal of the Rubin active optics team.
This test also demonstrates the robustness of the DL model to the differences between PhoSim and Batoid that are described in Section 2.2, and provides a check that training the DL model to optimize the PSF FWHM does not come at the expense of the PSSN (there is more discussion of this in Appendix E).However, while both algorithms converge to almost the same optical quality, the DL algorithm requires an extra iteration to converge.The implications of this extra step are discussed in Section 5.

Estimating the wavefront using a single donut
In the preceding sections, we used the DL model to estimate the wavefront using a pair of intra-and extrafocal donuts, enabling an apples-to-apples comparison with the TIE solver.The DL model, however, can estimate the wavefront using only a single donut, meaning it does not need information from both sides of focus.To evaluate DL performance on one side of focus, we calculate wavefront estimation errors while averaging the wavefront from pairs of donuts on the same side of focus.We do this pairing to make sure we are still getting the benefit of noise reduction from averaging a pair of wavefronts, while only using information from one side of focus.You can see in Fig. 12 the DL model does well with only intra-focal or extra-focal images.Interestingly, it appears that averaging two wavefronts only reduces the noise by a factor of ∼ 1.2, 15% less than the factor of √ 2 ∼ 1.41 expected for uncorrelated Gaussian error.This is due to correlation of atmospheric errors across individual CWFSs due to low-altitude turbulence.
The ability to estimate the wavefront using only images from one side of focus has several advantages.For example, in crowded fields, you may not be able to find an intra-/extra-focal pair where each donut is sufficiently bright, and is not too heavily blended or vignetted.It removes the need to compensate for differences between the two sources in a pair, which the baseline algorithm must do in order to apply the TIE.It can also provide more localized wavefront estimates across each CWFS, which provides more leverage when interpolating the wavefront across the full focal plane.We note that the methods of Tokovinin & Heathcote (2006), Janish (2012), andRoodman et al. (2014) are all also capable of estimating the wavefront using an image from only one side of focus.
There may also be downsides, however, to using information from a single side of focus.Distortion of the pupil, attenuation of the mirror, and differential chromatic refraction (DCR) all have effects that are independent of the side of focus on which a donut is imaged.Wavefront aberrations, on the other hand, change parity as they pass through focus.For example, astigmatism and DCR both elongate sources, but the former rotates by 90°when you pass through focus while the latter is always oriented towards zenith.Using information from both sides of focus allows you to distinguish these effects.We tested the impact of DCR by simulating very blue stars at airmass 4, imaged in the Rubin g band, while toggling the simulated DCR on and off.We find that in this extreme case, DCR increases the median wavefront estimation error by 7% when using information from only one side of focus, while the median only increases by 5% when averaging estimates from both sides of focus.This is only a modest increase, even in a situation where DCR will be the most severe.Furthermore, if this does become a limiting factor in certain circumstances, the effects of DCR can be predicted and separately modeled.

DISCUSSION & CONCLUSION
In this paper, we have built a deep learning (DL) model for wavefront estimation.Previous works have built prototypes for this application (Thomas et al. 2020(Thomas et al. , 2021;;Yin et al. 2021), but this is the first time such a system has been integrated into the Rubin AOS pipeline, and validated against the baseline algorithm.We have demonstrated that under ideal conditions, where the images do not have bright blends and are not vignetted by the camera, the DL system outperforms the baseline model, improving the median wavefront estimation error by a factor of 2. In fact, the estimation error for the DL model is comparable to the expected minimum error due to random phase fluctuations from the atmosphere.This indicates that the DL system is performing as good as can be expected when given high-quality data.
Furthermore, the DL system is far more robust than the baseline algorithm when presented with less ideal data.When the intra-focal donut is too far from the center of the focal plane, its edge is sharply vignetted by the camera body.This results in an exponential decrease in accuracy for the baseline algorithm, while the DL model is unaffected.Furthermore, blending of the central source with neighboring sources greatly diminishes the accuracy of the baseline method, and often causes catastrophic failures.Again, the DL model is largely unimpacted, improving the median wavefront estimation error by a factor of 14.Both algorithms begin to degrade when the total SNR of the source drops below 200, but the degradation of the DL algorithm is less severe.
In addition to the strengths listed above, the DL model can accurately estimate the wavefront using only a single image, whereas the baseline algorithm requires a pair of intra-and extra-focal images.The DL model is also approximately 40 times faster when, like the baseline algorithm, it is applied to pairs one-at-a-time, but much greater speed-ups are achievable if the DL model is applied to many images simultaneously.
These strengths make the DL model a valuable addition to the Rubin AOS.It will allow the AOS closed loop to operate in the densest 8% of fields where the baseline algorithm fails due to the inability to select a pair of unvignetted and unblended sources.This will expand by 1400 deg 2 the area useful for precision galactic science that targets the crowded plane of the Milky Way.Higher performance with degraded data and the ability to estimate the wavefront given a single source from each CWFS also increases the robustness of the AOS to a wide variety of conditions, such as satellite trails and failing CCDs.
The one test where the baseline algorithm outperforms the DL model is the convergence rate of the AOS closed loop simulated with PhoSim.PhoSim is a different raytracer than that used to simulate the training data for the DL model.The DL model still meets the closed loop requirements and converges to the same optical quality, but requires an additional closed loop iteration to do so.This might be due to chance, and simulating many more closed loops in a wide variety of conditions may show that the DL model exceeds the baseline on this test as well.However, these results might also indicate a need to simulate a wider range of wavefront perturbations, as the initial perturbation in the closed loop might lie outside the area of parameter space covered by our training set.
To prepare for commissioning, we plan to generate a larger library of simulations.These simulations will more densely and expansively sample the space of potential optical perturbations, as well as include a larger number of independently simulated atmospheres.This will reduce the dangers of overfitting and network extrapolation.We also plan to include more realistic estimates for stellar temperatures in order to test for chromatic effects, and to upgrade our simulations to include more image effects, such as mirror print through, diffraction from the telescope support structure, cosmic rays, and bad pixels.
We expect that domain adaptation, the technique of adapting a model trained on one data set so that it performs well on a different target data set, will also be necessary for commissioning our deep learning system.This is because real data is always messy in ways not captured by simulations, and deep learning systems need to develop robustness to these differences in order to perform accurate inference on real data.This task will be difficult for the Rubin AOS, since the vast majority of Rubin images will be "unlabeled" in the sense that the true wavefront will not be known3 .For this reason, we expect strategies such as domain adversarial training ( Ćiprijanović et al. 2021, 2022) will be valuable when commissioning this system on real data.Domain adversarial training uses a discriminator network that takes the CNN image features as input, and tries to guess whether the original image was real or simulated.By training the CNN to outsmart the discriminator, the CNN learns to ignore artifacts and features that are unique to the real images, and instead focus on the physical information present in both the real images and the simulated training set.
It may also be advantageous to further optimize the network architecture for domain adaptation, since two of our architectures achieved similar performance on the Batoid test set, but differing performance in the PhoSim closed loop.Overcoming the obstacle of domain adaptation will be the greatest challenge during commissioning.We have begun working towards these goals using data from the Rubin Observatory Auxiliary Telescope (Aux-Tel), which is a simpler system and is already producing data.
Finally, the results presented in Section 4.1 will also be useful in improving the baseline wavefront estimation algorithm.Using the wavefront estimation error as a function of SNR, vignetting, blend distance, and the number of faint blends will help refine the donut selection criteria.The evidence of a model bias compared to the atmospheric uncertainty and the DL performance motivates additional investigation into the modeling assumptions of the baseline algorithm.

ACKNOWLEDGMENTS
We would like to thank David Thomas who provided some scaffolding for early stages of this project, Tamás Budavári and Yashil Sukurdeep for helpful feedback throughout, Aaron Roodman for feedback on a proposal related to this work, Aleksandra Ćiprijanović for discussions related to domain adaptation and commissioning, Will Sutherland for his insights on atmospheric noise correlations, and Chris Stubbs for reviewing the manuscript.
J.F.C is supported by the U.S. Department of Energy, Office of Science, under Award DE-SC0011665.J.E.M. was supported by the U.S. Department of Energy under contract number DE-AC02-76SF00515.This material is based upon work supported in part by the National Science Foundation through Cooperative Agreement AST-1258333 and Cooperative Support Agreement AST-1202910 managed by the Association of Universities for Research in Astronomy (AURA), and the Department of Energy under Contract No. DE-AC02-76SF00515 with the SLAC National Accelerator Laboratory managed by Stanford University.Additional Rubin Observatory funding comes from private donations, grants to universities, and in-kind support from LSSTC Institutional Members.
This work has made use of data from the European Space Agency (ESA) mission Gaia processed by the Gaia Data Processing and Analysis Consortium (DPAC).Funding for the DPAC has been provided by national institutions, in particular the institutions participating in the Gaia Multilateral Agreement.

SOFTWARE
The simulation (Crenshaw 2023a) and neural network (Crenshaw 2023b) code is stored on GitHub and Zenodo.The data and trained model are also stored on Zenodo (Crenshaw 2023c).Wavefront estimation was performed with the Rubin Wavefront Estimation Pipeline, on GitHub at https://github.com/lsst-ts/tswep.The Rubin Active Optics closed loop was simulated using code stored on GitHub at https://github.com/lsst-ts/ts phosim.This repository depends on the software for the Rubin Optical Feedback Controller, on GitHub at https://github.com/lsst-ts/tsofc.The plots in this paper were created using the code on GitHub at https: //github.com/jfcrenshaw/aosnotebooks.

APPENDIX
A. CLARIFYING THE LSST OPTICAL ERROR BUDGET Throughout this paper, there are several references to the LSST error budget.The numbers cited are closely related, but subtly different.In this section we clarify the relationship between these numbers.Note that when combining errors from multiple sources, PSF FWHM values are meant to be added in quadrature and PSSN values are meant to be multiplied.
In Section 1, we state: The median seeing at Rubin's site on Cerro Panchón is 0.65" (Ivezić et al. 2019), and Rubin's optical system is required to degrade this value by no more than 0.4".This 0.4" requirement, from Claver & LSST Systems Engineering Integrated Project Team (2022), is for the entire optical system, including all contributions from both the telescope and camera.In particular, of this 0.4" requirement, 0.25" is allocated to the telescope, 0.3" is allocated to the camera, and 0.08" is allocated to the optical design.Later in this same section, we state: To deliver the optical quality required for LSST, the AOS must limit the PSF (Point Spread Function) FWHM (Full Width Half Maximum) contribution of optical aberrations to no more than 0.09", including only 0.079" due to misestimation of the wavefront -less than 10% of the total error budget.
The 0.09" requirement is the portion of the telescope error budget allocated to the active optics system, and of this, 0.079" is allocated to optical errors due to misestimation of the wavefront.These numbers sourced from Thomas et al. (2022a) and Sebag & LSST Systems Engineering Integrated Project Team (2016).
In Section 4.2, we state: The AOS closed loop is required to converge to a FWHM of less than 0.19" and a PSSN greater than 0.91.
The 0.19" requirement cited here contains the 0.09" allocated to the active optics, plus additional errors of 0.167" allocated to M1M3 and 0.032" allocated to M2 (which are also captured by the closed loop simulation).The quoted PSSN (0.91) is similarly the product of the PSSN specified for the active optics (0.981), M1M3 (0.933), and M2 (0.998).These numbers are also sourced from Sebag & LSST Systems Engineering Integrated Project Team (2016).

B. SAMPLING RUBIN OPTICAL PERTURBATIONS
For each simulated telescope pointing, we randomly perturb the 50 parameters that specify the optical alignment and the figure of the mirror.Parameters 1-5 and 6-10 describe the rigid body motions of M2 and the camera, respectively.These include translations along all three axes (in microns), and rotations about the x and y axes (in arcseconds).Parameters 11-30 and 31-50 are the bending mode amplitudes in microns for M1M3 and M2, respectively.
To perturb these parameters, we first sample a PSF FWHM degradation from a folded Gaussian distribution whose standard deviation is equal to its mean (i.e., σ = µ).This distribution was heuristically chosen to yield a distribution that emphasizes small degradations, but has a tail towards much larger degradations.The PDF of this distribution is where ε is the PSF FWHM degradation in arcseconds.This distribution is plotted in Fig. 13.The parameter µ is chosen such that ⟨ε⟩ = 0.3", using the formula In other words, we sample ε from a Gaussian with mean and standard deviation equal to µ, then take the absolute value.This determines the total PSF FWHM degradation associated with the perturbation.We then determine what portion of this PSF degradation to assign to each telescope parameter by sampling from the 50-dimensional hypersphere with radius ε.Finally, we use the values of ∆PSF/∆perturbation determined in Appendix C convert these PSF degradations to parameter perturbations in the appropriate unit.We use Batoid to simulate images from telescopes with these simulated perturbations.For each simulation, we use Batoid to extract the wavefront and calculate the corresponding Zernike coefficients.As described in Section 3, these wavefronts are at the center of each CWFS, for a fiducial wavelength of 1 µm, and have the intrinsic aberrations of the telescope design subtracted.

C. ESTIMATING PSF FWHM DEGRADATION
It is useful to express wavefront estimation errors in a unit that is readily interpretable in terms of the optical quality.In this appendix, we derive a set of scaling factors, s i , such that a given wavefront perturbation φ = i α i Z i results in an increase of the PSF FWHM by the amount To derive these factors, recall that the gradient of the wavefront provides a map from pupil position to focal plane position (e.g., Roddier & Roddier 1993).We can express the gradients of the wavefront with two more Zernike expansions: the coefficients of which can be determined analytically from the expansion coefficients of φ (Noll 1976;Zhao & Burge 2007;Stephenson 2014) or calculated using the Galsim Zernike library (Rowe et al. 2015).The variance of the x position of photons on the focal plane is then Comparing the increase in PSF FWHM due to wavefront aberrations for 1000 simulated stars with random Zernike amplitudes.The x-axis is the increase in FWHM as measured from the simulated images, while the y-axis is the value estimated from our weighted Zernike scheme.The dashed line indicates perfect correspondence.The two methods agree for FWHM increases below 0.25".Above this level, the weighted Zernike scheme overestimates the increase in FWHM.
where ρ is a 2D position vector on the pupil and we use the Zernike normalization defined in Eq. 2. The variance in y positions is calculated analogously.Fitting an isotropic Gaussian to the photon positions on the focal plane yields the variance Finally, the FWHM can be calculated with the regular scaling for a Gaussian: Scale factor s i can be calculated in units of arcseconds per micron by applying the above formulae to the wavefront φ = α i Z i , where α i = 1 µm.The values of s i for the Rubin Observatory are shown in Fig. 14.All of the scale factors are of O(1).Note that the values of these scale factors depend on the geometry of the pupil, and are therefore telescope specific.
We used simulations to validate our Zernike-to-PSF-FWHM conversion scheme.First we simulated a pair of infocus stars: one with an unaberrated wavefront, and one with random aberrations in Zernikes 4 to 23.The random aberrations were independently drawn from a Gaussian distribution -i.e. the aberrations in each mode have identical variance, but no covariance between different Zernike modes.For each pair of stars, we used Galsim to measure the PSF FWHM, and took the difference to estimate the increase to the FWHM due to the wavefront aberrations.We then calculated the expected FWHM increase from the Zernike amplitudes, using the method described above.
The results of this experiment are shown in Fig. 15.For FWHM degradations ≲ 0.25 arcsecs, the Zernike conversion scheme described in this appendix is a good match to the degradations measured from image simulations.Above this level, our scheme mildly overestimates the FWHM degradation, likely due to degeneracies (and therefore cancellations) in the way each Zernike mode impacts the PSF FWHM, which are not captured by our method.This is not a significant problem as Fig. 4 shows the majority of our wavefront errors correspond to PSF FWHM degradations below the 0.25 arcsecond level.It can be assumed that the errors in the high error tail of Fig. 4 are slightly over estimated.This caveat, however, does not change the conclusions of the main text.
Note that while the majority of Zernike estimation errors lie below the 0.25 arcsecond level, the same is not necessarily true of the Zernike amplitudes themselves.It is still useful to plot Zernike amplitudes in units of PSF FWHM contribution, however, as this enables a by-eye estimate of how the Zernike estimation residuals impacts the PSF of the telescope.
Similarly to the Zernike amplitude conversions described above, you can calculate PSF FWHM degradation for each of the optical parameters discussed in Appendix B. We perturb each parameter 1 unit, use Batoid raytracing to retrieve the corresponding wavefront, and then proceed as above.

D. SIMULATING THE ATMOSPHERE
In addition to distortions from misalignment and mirror deformation, the Rubin optical wavefront is distorted by atmospheric turbulence.Because Rubin's field of view is so large, we cannot correct for this turbulence.In effect, the atmosphere adds a random Zernike series to the Zernike series we are trying to estimate.These random phase variations from the atmosphere are an irreducible noise floor for wavefront estimation, so it is useful to understand their statistics.
Using Eq. 2, we can write the covariance of the coefficients α i as We assume the von Kármán turbulence model (von Kármán 1948), in which turbulence begins at an upper scale L 0 and cascades down to the viscous dissipation scale ℓ 0 .The phase covariance for von Kármán turbulence is (Carlsten et al. 2018) We assume individual turbulent cells do not evolve during the 15 second exposures, and so the coherence time of turbulence is determined by the wind speed, which moves new turbulent cells across the field of view during an exposure.The coherence time is approximately τ 0 = 0.31 r 0 /v e , where v e is the average wind speed, weighted by the strength of turbulence in each layer (Roddier 1981).Thus, during a 15 second exposure, the phase covariance is reduced by a factor of N = 15 s/τ 0 .
We use GalSim (Rowe et al. 2015) to simulate an atmosphere with von Kármán turbulence in 6 layers.We use the turbulence profile measured on Cerro Armazones (Ellerbroek & Andersen 2008) (with 10% Gaussian noise).Outer scales L 0 are randomly drawn from a log-normal distribution with mean 30 m and standard deviation 20 m, truncated between 10 and 100 m.Wind speeds are isotropically sampled with a uniform distribution between 0 and 20 m/s.We assume constant air pressure of 69 kPa, H 2 0 pressure of 1 kPa, and temperature of 293 K.
To estimate the impact of turbulence on Zernike estimation, we numerically evaluate Eq.D9 while sampling the PSF FWHM and wavelength from the baseline LSST OpSim simulation, and L 0 and v e from the distributions described above.The median standard deviation of each Zernike coefficient is shown in Fig. 16.The sum in quadrature of these values is 0.072".For a comparison of the wavefront estimation algorithm errors to the atmospheric error, see Section 4.1.1.Noll (1976) studied the projection of atmospheric statistics onto Zernike coefficients for a circular aperture (i.e., no central obscuration) and Kolmogorov turbulence (the L 0 → ∞ limit of Eq.D10; Fried 1965).Their study found that for each coefficient, the variance scales like r −5/3 0 , and that the total variance contained by all coefficients greater than Noll index j scales like j − √ 3/2 for large values of j.Despite studying von Kármán turbulence for an aperture with a large central obscuration, we find the same scaling relations (for fixed L 0 , before dividing by N ).We note that the variance averaged over a 15 second exposure scales like r −2/3 0 , as this entails a division by N ∝ r −1 0 .

E. ADDITIONAL WAVEFRONT ESTIMATION METRICS
In this appendix, we provide a few more figures to check that the conclusions of this paper do not depend on the choice of PSF FWHM as the metric for wavefront estimation, as well as a few figures that check the consistency of our results when selecting different subsets of the test set.
Fig. 17 is a near duplicate of Fig. 4, except that the wavefront residuals are measured in nanometers.This provides a check on our conversion to PSF FWHM by showing that even without this weighting scheme, the DL method outperforms the TIE.The shapes of the histograms in these two plots are nearly identical, indicating that the PSF   FWHM carries nearly the same information as the residual in nanometers, with the benefit of having a unit that is more readily interpretable in terms of optical quality.Fig. 18 is another histogram comparing the performance of the DL and TIE methods on pairs of stars (with no camera vignetting or bright blends).This figure shows PSSN values after correcting for simulated aberrations using the estimated wavefront from each method.Recall that PSSN ranges between zero and one, with greater values indicating better optical quality.This figure shows that the DL method also outperforms the TIE method on maximizing the PSSN, providing a check that training to optimize the PSF FWHM does not come at the expense of other optical quality metrics.Interestingly, both the DL and TIE methods achieve the PSSN required by the error budget (marked with the dashed line) using a single pair of donuts more often than they achieve the required PSF FWHM (cf.Fig. 4).
Fig. 19 provides a check that both methods have similar performance on each of the wavefront sensors.There is no reason to expect different performance on different sensors, so this plot provides a consistency check on the simulations and the training of the DL method.Fig. 20 shows the performance for each LSST filter.The errors are comparable between every band, with slightly worse performance for the u, z, and y bands.This is expected as the average SNR in these bands is slightly worse.
Fig. 21 compares the error distribution for each Zernike coefficient.This shows that the DL method outperforms the TIE method on wavefront estimation for every Zernike mode.In addition, compared to the TIE, the DL method has less variation in performance for different Zernike modes.

Figure 1 .
Figure 1.Example of donuts simulated with Batoid and Galsim.This set represents the diversity of the simulation: the simulated donuts have varying SNR, some are sharply vignetted by the Rubin camera (top right and bottom left), some are blended with a single other donut, and a small fraction are blended with many donuts.

Figure 2 .
Figure 2. Schematic of the network architecture.A single donut is passed through a convolutional neural network (CNN), generating a set of image features.These features are concatenated with a flag that indicates if the donut is intra-/extra-focal, the field angle of the source, and the effective wavelength of the observation.A dense neural network then estimates the Zernike coefficients associated with the optical wavefront.

Figure 3 .
Figure 3. Example of an intra-and extra-focal donut fed into the AOS pipeline, with the DL and TIE wavefront estimates compared to the truth from the simulation.The plotted amplitudes are the quantities siαi and si αi -i.e., the contribution of each Zernike mode to the PSF FWHM.The error bars on the truth are the expected median 1σ errors due to the atmosphere.

Figure 4 .Figure 5 .
Figure4.Distribution of wavefront estimation errors for the DL and TIE methods in ideal conditions (no camera vignetting and no bright blends).The distribution in gray is the expected distribution of wavefront estimation errors due to the phase variance of the atmosphere.The vertical black line is the AOS wavefront estimation error requirement of 0.079".
Figure 6.Wavefront estimation error as a function of intra-focal field angle.Above the scatter plot are donut stamps representative of the given field angle.Sharp vignetting from the camera body impacts field angles greater than about 1.74°.The data set plotted excludes donuts with bright blends.

Figure 7 .
Figure 7. Left: distribution of errors for the TIE solver, in the presence of mirror and camera vignetting.Right: same for the DL model.The data set plotted excludes donuts with bright blends.

Figure 8 .Figure 9 .
Figure 8. Left: a bright blend where the blending donut is at a distance of 82 pixels.Right: wavefront estimation error for donuts with a single bright blend, as a function of the centroid-to-centroid distance of the central and blending donut.The red cross denotes the distance and TIE error corresponding to the blend depicted on the left.The data set plotted excludes donuts vignetted by the camera.

Figure 10 .
Figure10.Median wavefront estimation error as a function of the number of faint blends.The faint blends are divided into two groups: those where the faint blends are at most 1 magnitude beyond the bright blend cut (2 < ∆m < 3), and those where the faint blends are more than 1 magnitude beyond the bright blend cut (∆m > 3).The data set plotted excludes donuts vignetted by the camera, and donuts with bright blends.
Figure11.The PSF FWHM and PSSN as a function of closed loop iteration, when using the DL and TIE methods for wavefront estimation.The AOS requirements are marked by the horizontal dashed lines.The PSF FWHM must be below this limit, and the PSSN must be above this limit.For both metrics, there is an inset that zooms into the last two iterations, where you can see the DL method slightly outperforms the TIE.

Figure 12 .
Figure12.Distribution of wavefront estimation errors for the DL model, using intra/extra, intra/intra, and extra/extra pairs.These distributions coincide, indicating that the DL model can accurately estimate the wavefront only using information from one side of focus.

Figure 13 .
Figure 13.The distribution of PSF FWHM degradations sampled for the simulations.

Figure 14 .
Figure 14.The PSF FWHM weighting factors, si for the Rubin Observatory.

Figure 16 .
Figure16.Median 1σ error due to the atmosphere for each Zernike coefficient αi.

Figure 17 .
Figure17.Distribution of wavefront estimation errors for the DL and TIE methods in ideal conditions (no camera vignetting and no bright blends), in units of nanometers.This is a near duplicate of Fig.4, except with a different unit on the x-axis.

Figure 18 .Figure 19 .
Figure18.Distribution of PSSN values after correcting for aberrations using the estimated wavefront from the DL and TIE methods.The vertical black line is the AOS wavefront estimation error requirement of 0.91.

Figure 20 .
Figure 20.Distribution of wavefront estimation errors for each of the LSST filters.The stars denote the median error.

Figure 21 .
Figure 21.Distribution of errors for each Zernike coefficient, αi.The stars denote the median error.