{'fraction_non_alphanumeric': 0.020913770913770915, 'fraction_numerical': 0.008794508794508795, 'mean_word_length': 4.486613709914681, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Using the generalised-optical differentiation wavefront sensor for laser guide star wavefront sensing

Laser guide stars (LGS) are used in many adaptive optics systems to extend sky coverage. The most common wavefront sensor used in combination with a LGS is a Shack-Hartmann wavefront sensor (SHWFS). The Shack-Hartmann has a major disadvantage for extended source wavefront sensing because it directly samples the image. In this proceeding we propose to use the generalized-Optical Differentation Wavefront Sensor (g-ODWFS) a wavefront sensor for wavefront sensing of LGS. The g-ODWFS uses only 4 pixels per sub-aperture, has little to no aliasing noise and therefore no spurious low-order errors and has no need for centroid gain calibrations. In this proceeding we show the results of simulations that compare the g-ODWFS with the SHWFS.


INTRODUCTION
One of the major limitations for ground-based telescopes is that these telescopes image through the Earth's atmosphere. Due to turbulence in the atmosphere the light entering our telescope is aberrated which severely degrades the spatial resolution of the telescope, which in turn reduces sensitivity and astrometric precision. To combat the Earth's atmosphere, we use adaptive optics (AO) where we actively control a deformable mirror to compensate for the effects of the turbulence. However, before we can correct the atmospheric turbulence we must first measure it. This is commonly done by a wavefront sensor. Because the atmosphere changes rapidly, we need to measure and correct at or above 1 kHz sample rate, limiting the technique to bright stars because those provide enough light at such speeds. To enable atmospheric correction on fainter stars, a bright artificial star can be created with a high-power laser. 1 Such a Laser Guide Star (LGS) uses a laser beam that back-scatters on certain atomic or molecular species high in the atmosphere which is then observed by the telescope. 2 In this work we consider sodium-based lasers that are in use at the Very Large Telescope (VLT). 3 However, the results in this work are equally valid for lower-altitude Rayleigh LGS's.
Adaptive optics systems with an LGS have larger sky coverage than that available with natural guide star wavefront sensing. 4 However, an LGS brings its own set of problems. 1,5,6 The sodium-based (Na) LGS take advantage of the high density sodium layer that is positioned roughly 90 km above the telescope. The sodium layer has a vertical extent of about 20 km. This thick layer creates an extended source if viewed off-axis. Currently, most LGS AO systems use a Shack-Hartmann wavefront sensor (SHWFS), which uses a micro-lens array in the pupil to segment the incoming wavefront into many sub-apertures. The slope of the wavefront in each sub-aperture can then be estimated from sub-aperture centroid motions and from integration of these slopes the full incoming wavefront can be reconstructed.
Focal plane mask +X gradient -Y gradient -X gradient +Y gradient X-gradient Y-gradient Figure 1. A schematic of the g-ODWFS. The collimated beam is split into two by the first Wollaston prism, which are then focused onto the focal plane mask. One beam has a filter for the x-gradient, while the other beam has a filter for the y-gradient. After the focal plane mask both beams are split again, but in an orthogonal direction to the first beam splitter, and collimated by the second lens. The final image has 4 output pupils that encode the wavefront information. and the LGS becomes better resolved, depending on other design choices. To keep the LGS well-sampled, a large number of pixels per measurement is necessary for the SHWFS. However, current technology limits the number of available pixels and therefore there is a trade-off between the pixel scale, the number of sub-apertures and the field-of-view. Increasing the pixel scale or truncation of the field-of-view leads to increased reconstruction errors. 5,7 The current design of the LGS system for the E-ELT uses an array of 80 by 80 sub-apertures each sampled by 10x10 pixels, which amounts to a total chip size of 800x800 pixels. 8 Such a detector also need to read out at sufficiently high speed so that the atmosphere has little time to evolve. This is technologically a very challenging detector and ESO has spent several years to develop such a detector. 8,9 The optimal detector size is actually larger with a 1600x1600 size, and is also under development. 10 However, all these novel large chip detectors have lower read out speeds and more detector noise than current state-of-the-art EMCCD sensors with smaller sensor sizes. 11 Here we propose to use the generalised Optical Differentiation wavefront sensor (ODWFS), 12, 13 which can circumvent many pixel sampling issues. The ODWFS is similar to Fourier-based sensors such as pyramid WFS but uses two modulating filters in the focal plane instead of a single mask. Each filter encodes either the xgradient or the y-gradient of the wavefront aberrations. A schematic of this setup can be seen in Figure 1. The proposed ODWFS use amplitude filters, which lose light by definition. In the past few years the generalised-Optical Differentiation Wavefront Sensor (g-ODWFS) was create. The g-ODWFS is a version of the ODWFS based on polarization optics which is 100% photon efficient. 14, 15 A Wollaston prism splits the collimated input beam into two polarized beams, which are focused onto the different focal plane filters. For the g-ODWFS the focal plane filters are half-wave plates with a spatially varying fast-axis orientation, therefore the angle of polarization of the input beams will rotate by an amount that depends on its spatial position in the focal plane. A second Wollaston prism that is rotated by 45 degrees with respect to the first Wollaston prism is used as a polarization analyzer that creates four output beams, two for each gradient. The intensity difference between the two output beams per gradient depends on the angle of polarization, and therefore on the orientation of the fast axis of the focal plane mask where the beam hit it. We can measure for each position in the pupil what the angle of polarization is and derive where the ray hit the focal plane mask. From this we can measure the local tilt of the wavefront and reconstruct the wavefront aberrations. The g-ODWFS has been demonstrated in the lab and recently at the telescope as a wavefront sensor for point sources that can be used for astronomical adaptive optics.

THE OPTICAL DIFFERENTIATION WAVEFRONT SENSOR FOR LGS
Mathematically the ODWFS can be described as a Fourier filter, Here E 0 is the input electric field, F is the Fourier transform operator, t is the focal plane transmission mask and E 1 is the output electric field. The ODWFS uses two tranmission masks, one that measures wavefront variations in the x direction and one that measures variations in the y direction. In the definition of the filter masks, k x is used as focal plane coordinate which is normalized by the extent of the filter k m . The normalized coordinates run from -1 to 1. For a single direction, we choose to describe the x-direction, the transmission mask creates two effective amplitude filters, and, Outside this range the filter has a transmission of zero. The filter transmission curves can be seen in Figure 2. We create the two perfectly mirrored focal plane transmission masks with the sine and cosine, which come from the projection onto the two polarization states. The normalized difference between the corresponding pupils can then be used to measure the wavefront. The Fourier transform of both the sine and cosine filter is, and F cos π respectively. Here δ is the Dirac δ-function. The corresponding output electric fields are For each filter t ± there is an output electric field E ± . We also used x 0 = π/4k m to simplify the equations. The corresponding pupil intensities are, Here I ± is the pupil intensity of the corresponding transmission mask t ± . The input electric field can be decomposed into its amplitude and phase, E 0 = Ae iφ , and again for clarification we use f ± = f (x ± x 0 ) to described a ±x 0 shifted version of the variable f . Substituting these two relations gives us, From this we can see that the response of the ODWFS with sinusoidal filters is similar to the response of a lateral shearing interferometer with a very small shear. This can be simply understood because the sine/cosine filters are just very low-frequency amplitude gratings. The two pupil images can be used to estimate both the phase and amplitude in an identical way as in. 14 The normalized difference is used to estimate the phase, which for the sinusoidal filters is, Here we assumed that the effects of amplitude variations and the pupil edges are negligible. The shifted phase difference can be related to its derivative by making use of a Taylor expansion, From this we can see that if the shift x 0 is small enough (x 0 1), the ODWFS with sinusoidal filters will measure the wavefront gradient. This is the case for all focal plane filters that are larger than 1 λ/D tel . The optical gain, 2x 0 , is, Here we used k m = 2π λ N λ 0 /D tel for the maximal spatial frequency with N the number of Airy rings the focal plane filter encompasses. The size of the filter is defined at a central wavelength λ 0 . Substituting the optical gain and the relation between phase and wavefront (φ = 2π λ W ), we get,

Extending the ODWFS to extended sources
The previous section described the response of the ODWFS for a point source. The situation for an extended source is slightly more complicated. If we assume the extended source is incoherent, the pupil intensities will add, Here the integral is over the full source S. This can be split into two parts, the pupil illumination and the wavefront information, If each of the incoherent source creates the same pupil illumination, we can take the amplitudes out of the average of the right term. And if the source ,including broadening due to turbulence, is small compared to the field of view of the filter, the normalised difference becomes, From this we can see that the ODWFS measures the source intensity weighted wavefront.

END-TO-END SIMULATIONS
In this section we will use end-to-end simulations to evaluate the performance of the ODWFS for LGS wavefront sensing. All simulations in this manuscript make use of the High Contrast Imaging for Python (HCIPy) library. 16 The main parameters of the simulation can be found in Table 1.

Calibration of the wavefront sensors
Both the ODWFS and the SHWFS are calibrated with a point source. This means that any error that is introduced because of the extended LGS will fold back into reconstruction errors of the wavefront. To calibrate the response of wavefront sensors, we used almost 4000 random patterns on the DM with a surface RMS of 200 nm. This data set was then divided into a training part (3000 samples) and a validation part (1000 samples). From the training data we derived the interaction matrix as, With A the reconstruction matrix, V T the applied commands of the training data, S T the measured slopes of the training data, and α the regularization parameter. The optimal regularization parameter is chosen as the α which minimizes the residuals of the reconstructed coefficients in the validation dataset, Here, V V and S V are the applied commands and measured slopes of the validation data set.

Using the ODWFS for LGS wavefront sensing
Simulating a full LGS system is a complicated task both the up and downlink have to be simulated. 17 During the uplink the LGS accumulates wavefront errors which create an aberrated illumination in the sodium layer. Because each part of the laser Point Spread Function (PSF) can excite a sodium atom in the sodium layer, each simulated pixel of the PSF should be regarded as an independent incoherent point source. Therefore, the laser PSF in the sodium layer can be seen as a probability density function of the emitting volume. Then during the downlink the LGS accumulates the wavefront errors of the atmosphere that are common with the science target.
For this manuscript we are interested in the performance of the ODWFS for wavefront sensing of an extended object. The LGS lateral extent caused by the PSF in the sodium layer is much smaller than the elongation.  LGS is more elongated as the viewing angle is increased. The LGS creates a butterfly pattern because each slice of the sodium layer will have an offset and a height difference that creates a focus offset. This butterfly effect scales with the diameter of the aperture.
Therefore, we decided to neglect the lateral extent and simulate the LGS as a line source. We have also ignored the propagation through a multi-layer atmosphere 17 and assumed that all wavefront errors occur in the telescope pupil. To simulate the line source we split the sodium layer up into 21 independent layers. Each layer is assigned a power according to the density profile that can be seen in Figure 3. We assumed that the LGS has an offset of 5 m with respect to the center of the pupil and the laser is shot perpendicular to the orientation of the pupil. The electric field of the each point source in the entrance pupil can be calculated from the impulse response function of free space propagation, Here r is the distance from the atoms that are excited by the laser to a position within the telescope pupil. Because r depends on the position of the point source and the telescope pupil coordinate we naturally get the correct tilt and defocus error. The focal plane image of the LGS based on the sodium profile of Figure 3 can be seen in Figure 4. The images were created with different viewing angles.
After the electric field of the LGS is created we pass it through a phase screen to create the atmospheric wavefront errors, Each wavefront is then propagated through the wavefront sensor. We use a fully physical optics based simulation, so there are no geometric approximations used in the wavefront sensor optics. An example of a reconstructed wavefront from the ODWFS with an LGS can be seen in Figure 5. This shows that the ODWFS can create high-quality wavefront measurements.

Comparison of the ODWFS and the SHWFS
The performance of the ODWFS was compared to that of the SHWFS by reconstructing 300 independent phase screen screens. The phase screens are generated from a Kolmogorov power spectrum with an r 0 of 15 cm and an L 0 of 25 m. To exclude the effects of spatial fitting errors, we project the phase screens onto the Fourier modes (Table 1) before propagating the phase through the system. The histogram of both the atmosphere rms and the reconstructed rms are shown in Figure 6. The median reconstruction rms of the ODWFS is 27 nm compared to 66 nm for the SHWFS for a median input rms of 1 µm. The first histogram shows the reconstructed rms that contains the errors from the gain variations due to the spot elongation, substructure in the sodium density, non-linearities due to the large input phase and aliasing errors. The results of the Monte Carlo trials show that the ODWFS is more robust against these errors. The robustness against aliasing errors was already anticipated because the pyramid wavefront sensor, which is optically very similar, also has small aliasing errors. 18 The photon noise sensitivity was also estimated by repeating the same numerical experiment but with the addition of photon noise. The results are shown in the middle histogram of Figure 6. The ODWFS still has a smaller total reconstruction error. The contribution of the photon noise can be estimated from, σ p = σ 2 − σ 2 r . Here σ p is the rms of the photon noise, σ the total noise and σ r the reconstruction noise. From this equation we estimate the photon noise for the ODWFS as 61 nm and that of the SHWFS as 45 nm. The ODWFS has a slightly worse photon noise sensitivity. The effects of read noise are not included, but these should be significantly smaller for the ODWFS than for the SHWFS because the ODWFS only uses 4 pixels per sub-aperture while the SHWFS uses 36 (6x6), and for the E-ELT this will increase even more to 100 (10x10). 8 The photon noise sensitivity of the ODWFS depends on the slope of the focal plane filter. 14 A smaller filter will decrease the field of view, but also decrease the effects of photon noise. While the photon noise will decrease, the smaller field of view will truncate the LGS which will increase the reconstruction errors. We repeated the Monte Carlo trials for several filter sizes of the ODWFS to estimate the effects of the truncation. The results are shown in Figure 7. The reconstruction quality with a filter size of 3" to 6" is quite similar to that of the SHWFS, there is only a trade-off between the reconstruction quality and the photon noise. For smaller field-of-views the reconstruction error dominates in the ODWFS's error budget. The reconstruction error depends of course on the size of the LGS. In these simulations the LGS was shot from outside the pupil, if the LGS is shot from the M2 instead the effective size of the LGS will become smaller and a smaller field-of-view can be used. This could increase the performance of the ODWFS.   . The residual wavefront error as function of filter field of view. The orange line shows the photon noise and the blue line shows the reconstruction error. The green line shows the total error of the ODWFS. Each errorbar represents the 90 % confidence interval derived from 300 Monte Carlo trials. The black line is the median reconstruction quality of the SHWFS with photon noise (same data as the middle panel of Figure 6). The gray shaded area is the 90 % confidence interval of the SHWFS.

DISCUSSION AND CONCLUSION
We have derived the response of a polarization based optical-differentiation wavefront sensor and showed that without any approximation on the input wavefront, we recover the wavefront derivative. For extended sources the response is more complicated and requires numerical simulations if the object is larger than the field of view of the wavefront sensor. If the extended object is smaller than the field of view, the sensor measures the source intensity averaged wavefront.
Numerical simulations show that the ODWFS performs equal or better than the SHWFS with an LGS. This shows there are no downsides to switch to an ODWFS for LGS wavefront sensing. The main advantage of the ODWFS is that it requires significantly less pixels, which enables E-ELT scale LGS wavefront sensing with current state-of-the-art EMCCD's such as the OCAM2K from First Light.