## Abstract

The plenoptic wavefront sensor (PlWFS) has been proposed as being suitable for operating on extended objects in adaptive optics (AO) systems. We propose a new self-referencing method that uses the cell image of PlWFS as a correlation reference and enables the simultaneous measurement of high-order aberrations and tilt. Simulations have been performed for different operating conditions to verify the feasibility of the proposed method. These show that using the cell image results in better AO performance compared to existing reference generation techniques and allows stable wavefront tilt control with a small residual variance.

Published by The Optical Society under the terms of the Creative Commons Attribution 4.0 License. Further distribution of this work must maintain attribution to the author(s) and the published article's title, journal citation, and DOI.

## 1. INTRODUCTION

The imaging performance of ground-based telescopes is always constrained by the atmosphere that causes degradation of the image quality. Adaptive optics (AO) has been widely used to compensate the effect of the atmosphere. Generally, AO systems consist of three important components: the wavefront sensor, the wavefront distortion corrector, and the control system [1]. AO system performance is highly affected by the sensitivity and measurement accuracy of the wavefront sensor. Many different types of wavefront sensors have been proposed for different applications, and lots of work has been carried out to improve the measurement precision. The plenoptic camera has been proposed as an alternative wavefront sensor suitable for use in AO systems in recent years [2]. In widefield wavefront sensing, a field stop is placed before the lenslet array in a correlating Shack–Hartmann wavefront sensor (WFS) [3] such that the images of neighboring subapertures do not overlap. As for the pyramid sensor, observing extended object would cause a reduction in sensitivity [4]. The plenoptic camera can be designed to avoid any overlap between subaperture images regardless of object size [5], which is a significant advantage when wavefront sensing on extended objects. Clare and Lane [6] first described how to use the plenoptic camera for point source slope measurement. The CAFADIS wavefront sensor camera [7] has since been proposed for extended-object wavefront sensing for laser guide star and solar adaptive optics systems [8–10]. To wavefront sense using information from a plenoptic camera, the plenoptic images are processed to reconstruct Shack–Hartmann WFS subaperture images using a geometric model of the system. From here, the wavefront gradient across subapertures in the pupil can be measured. This approach can also reconstruct subaperture images for extended objects, after which a correlation algorithm can then be used to determine the image shift within each subaperture, which corresponds to the local wavefront gradient. In a Shack–Hartmann WFS, the reference subaperture image for correlation can only be derived from subaperture images. In a plenoptic wavefront sensor (PlWFS), the lenslet array at the focal plane samples the full aperture image, and we can derive an alternative correlation reference using the total intensity within each subaperture. We call this the cell image. PlWFS slope measurement accuracy as well as open- and closed-loop performance have been studied in several publications [11,12]; however, in most published works either only a single wavefront local slope estimation method is used, or the details of the algorithms used are not presented. For example, Rodríguez-Ramos *et al.* [8] proposed plenoptic sensor image recomposition for solar wavefront sensing and indicates that cross correlation with that quadratic interpolation method is applied during the measurement, but the details about quadratic interpolation are not presented. Jiang *et al.* [12] used cross correlation with 1D parabolic interpolation to estimate the location of the image cross correlation peak. This has been proven to not provide the best estimate of wavefront slope [13,14]. These prior studies have also assumed that global wavefront tilt has been corrected, underestimating the amount of image motion that may be present in an operational system. In this work we show that the PlWFS has the ability to detect the overall tilt and local atmosphere aberrations simultaneously when observing extended objects, and it is not necessary to introduce a dedicated tilt detector to the optical system.

In this paper, we investigate both PlWFS tilt and high-order wavefront sensing using different methods of generating the reference for the correlation algorithm. We investigate this performance in both open- and closed-loop AO systems. The layout of this paper is as follows. In Section 2, we described the basic principles of plenoptic wavefront sensing and the closed-loop control method. In Section 3, the shift estimation results and open-loop wavefront reconstruction accuracy are presented and analyzed. In Section 4, we study the closed-loop performance of the PlWFS.

## 2. PRINCIPLE OF PLWFS AND RECONSTRUCTION IN CLOSED-LOOP AO SYSTEMS

#### A. Estimating Local Wavefront Gradients Using a Recomposed Subaperture Image

Figure 1 shows a simplified layout of the PlWFS. The PlWFS uses a lenslet array placed at the focal plane of the telescope. A detector is placed a distance behind the lenslet array that is equal to the lenslet focal length such that an array of pupil images is formed on the detector plane.

Throughout this paper, a USAF resolution chart has been used as the object. The resulting PlWFS image of the USAF resolution chart is shown in Fig. 1. Each lenslet image is a reimaged low-resolution pupil image. When the F ratio of the lenslets matches the F ratio of the telescope, the reimaged pupil images have the same dimensions as the lenslet. This means that lenslet images cannot overlap each other irrespective of the angular diameter of the object. In the PlWFS image, every coordinate in each lenslet image corresponds to the certain position on pupil plane, while each lenslet image corresponds to a different incident angle of incoming light. The PlWFS image $I(i,j)$ can therefore be decomposed to a 4D discrete plenoptic function $I(u,v,x,y)$, where $(u,v)$ is the location of the lenslet within the lenslet array and $(x,y)$ are the relative coordinates of a pixel within a subaperture. By combining all the pixels with the same $(x,y)$ and ordering those pixels based on their $(u,v)$ coordinates, a recomposed subaperture image ${I_{x,y}}(u,v)$ is generated. The local aberration gradient across each recomposed subaperture can then be measured from ${I_{x,y}}(u,v)$ [8].

In AO systems, estimating the local wavefront gradient is equivalent to estimating the image shift. The image shift within a recomposed subaperture is related to the local wavefront gradient through

where ${S_x}$, ${S_y}$ are the local wavefront gradients, $\Delta x$, $\Delta y$ are the shifts of the recomposed subaperture images in pixels, $d$ is the lenslet pitch, and ${f_M}$ is the focal length of the main lens forming the image on the lenslet array.A correlation algorithm is widely used in AO systems to provide an estimate of image shift when observing extended objects. The algorithm can be divided into two steps. The first step is to generate the correlation map $C(u,v)$ of the recomposed subaperture image $I(x,y)$ and reference image ${I_r}(x + u,y + v)$:

The fast Fourier transform (FFT) can be applied to reduce the computation time cost. The image then has to be padded in a larger array to avoid aliasing effects [13]. The next step is to determine the location of the peak of $C(u,v)$. A thresholded and windowed center-of-mass (COM) algorithm is applied to obtain subpixel measurement accuracy. This method is a two-step process. First, a window mask is placed around the maximum value position $({u_m},{v_m})$ in $C(u,v)$, and then a thresholded COM is performed in the windowed area. We hereafter refer to this as the TW-COM method. The shift estimation can then be presented as

#### B. Correlation Reference Image Generation

When using the correlation algorithm, a reference image must first be generated. In practice, it is not possible to generate a reference that is noise-free and unaffected by turbulence. Any errors in the reference will lower the correlation peak in $C(u,v)$ and also introduce a constant unknown bias interpreted as a global image offset.

If an imperfect reference is used, the measured image shift ${S_{{\rm subap} {\text -} {\rm real}}}$ can be described as

For the Shack–Hartmann wavefront sensor, the simplest way to select a reference is to use one of the subaperture images. With limited flux, the SNR of subaperture images can be quite low and leads to a poor correlation accuracy. One way to improve the SNR of the reference image is to average multiple subaperture images. To generate the reference image from recomposed subaperture images we use a “shift and stack” method. Here we first determine the relative offset of each recomposed subaperture using the correlation technique presented in Section 2.A. Using these offsets, we then use linear interpolation to generate a series of tip-tilt-free subaperture images that are averaged to generate an unblurred high signal-to-noise reference image. The shift and stack approach taken in this paper is significantly less computationally efficient than techniques commonly used in widefield correlating Shack–Hartmann WFSs. Such systems typically use a single subaperture image or the shift measurements from a previous WFS frames to generate a high-signal-to-noise correlation reference image [15]. However, the shift-and-stack approach used here can provide a better reference if the object shows variation between WFS frames.

With the PlWFS, the lenslet array is placed at the (reimaged) focal plane of the telescope, and a low-resolution image of the extended object being observed can be derived by summing the flux within each subaperture pupil image. This low-resolution cell image has the same spatial resolution as the recomposed subaperture image and can therefore be directly used as a reference in the local gradient measurement. It can also be used to provide a measurement of global image motion. Figure 2 shows the PlWFS image, one recomposed subaperture image, and the cell image generated from the PlWFS image in the presence of atmospheric aberrations. When measuring the overall tilt, we also used the relative shift estimation method described in Eqs. (2) and (3). These are suitable for stabilizing global image motion; however, a zero reference point must still be defined. This could be the COM of the low-resolution image or a defined point on the object of interest.

#### C. Wavefront Reconstruction

The control system is the vital link between the wavefront sensor and the wavefront corrector in AO systems. The wavefront reconstructor is an important component in the control system. In PlWFS-based AO systems, the wavefront reconstructor converts the relative shift estimations from each subaperture to a vector of wavefront corrector control voltages that compensate the wavefront error.

There are several kinds of wavefront reconstructors in practical AO systems, such as zonal and modal algorithms. In this paper, a piezoelectric deformable mirror (DM) is simulated, and a mirror-eigenmode-based modal reconstructor is used.

The mirror eigenmodes can be derived from the system interaction matrix, which describes the linear dependencies between the wavefront gradient measurements and voltages applied on each DM actuator [16]. Using singular value decomposition, the interaction matrix ${I_M}$ can be expressed as

where the columns of $U$ are the left singular vectors, $\Sigma$ is a diagonal matrix whose diagonal elements are the singular values of ${I_M}$, and ${V^T}$ is the unitary matrix formed by the characteristic vector of ${I_M}$. We drive each of the DM actuators with unit voltage amplitude ${V_0}$ to generate the interaction matrix, and the relationship between control voltages and the DM eigenmode can be presented as where $M = {[{{m_1},{m_2}, \cdots ,{m_n}}]^T}$ is a matrix describing the coefficients of each eigenmode, $n$ is the number of DM actuators within the system, and ${m_i}$ is the normalized coefficient vector of the $ i $th eigenmode. The interaction vector of the $ i $th eigenmode can be obtained by poking the DM actuators using ${m_i}$ as the control voltage signal. Measuring the interaction vectors of all eigenmodes sequentially, we can then measure the system interaction matrix. The main characteristics of DM eigenmodes are as follows:- • The eigenmodes are orthogonal to each other;
- • the number of eigenmodes equals the number of actuators used in the system;
- • the eigenmodes are arranged based on the spatial frequency from lower to higher.

To reconstruct the wavefront the following procedure is followed. First, the interaction matrix ${I_M}$ is measured and the eigenmode coefficient matrix $M$ calculated. Then the new interaction matrix ${I_{{\rm EM}}}$ is generated from $M$. Then the control matrix ${C_M}$ is calculated by determining the pseudoinverse of matrix ${I_{{\rm EM}}}$ using singular value decomposition. Finally the DM control voltages vector ${V_{{\rm DM}}}$ can be derived from the wavefront sensor measurements $s$ by

Usually, ${V^T}$ and ${C_M}$ are constant matrices dependent on the system design and geometry. There is no need to regenerate these matrices, as this geometry does not vary.Tip-tilt (TT) correction was implemented using a separate TT mirror that recreated the second ($ x $-tilt) and third ($ y $-tilt) Zernike modes using Noll numbering [17]. The TT interaction matrix $I_M^{{\rm TT}}$ can be obtained using the same scheme outlined for higher-order modes. The reconstructed TT control signal can be presented as

${s_{{\rm cell}}}$ is the estimated shift using the PlWFS cell image. The $I_M^{{\rm TT}}$ is a $2 \times 2$ square matrix allowing the TT control matrix to be determined by direct inversion.#### D. AO Control

During this paper, we will first run simulations in open-loop AO working conditions to test the measurement accuracy of the proposed reference generation method and overall tilt measuring method. Open-loop AO is a technique in which the turbulent wavefront is measured before it hits the deformable mirror for correction. This means that an open-loop WFS must have sufficient dynamic range to measure the large amplitude uncorrected wavefront. However, closed-loop control is more widely used in real telescope AO systems. The most common closed-loop AO control scheme uses a negative feedback loop. Incoming light is first partially compensated by the wavefront corrector; in our case, the wavefront correction is achieved using both a piezoelectric deformable mirror and a separate TT mirror. The wavefront sensor measures the gradient of the residual phase error, and the resulting correction term is fed back to the wavefront correctors.

However, both high-order and TT loops use information from the same PlWFS in this paper, so we separate the AO control loop into two independent loops: one for overall tilt control and another for high-order aberration control. A proportional integral (PI) controller is used in both control loops. For the $ i $th closed-loop iteration, the control voltages can be determined by

## 3. WAVEFRONT MEASUREMENT RESULTS AND ANALYSIS

In this section, we perform several simulations under different observing conditions to compare the precision of using different reference images. Results are also presented that verify the feasibility of using a PlWFS cell image for overall TT measurement.

#### A. Basic Simulation Parameters

Table 1 lists the key parameters used in the simulation. The F ratio of the lenslet is set to 40 to avoid subaperture pupil images overlapping each other. The whole detector imaging area has $256 \times 256$ pixels. The full field of view (FoV) of the PlWFS is $14.5 \times 14.5$ arcseconds. The choice of the lenslet size is a trade-off between wavefront sensing angular resolution and wavefront spatial resolution. The wavefront spatial resolution is determined by the total number of recomposed subaperture images. This is equivalent to the number of detector pixels per subaperture in the PlWFS. In practice, for a detector with a finite number of pixels, increasing the number of pixels within each lenslet image also increases lenslet diameter, limiting the wavefront sensing angular resolution. In our simulation, we decide to use a lenslet array that has $16 \times 16$ lenslets, and each lenslet covers $16 \times 16$ pixels on the detector. The DM simulated in this paper is a piezoelectric stack-array actuator DM, where the influence function of each actuator is simulated by a Gaussian function. The DM surface is square, and there are 312 available actuators inside the pupil area. To investigate high-order performance, we generate PlWFS images in the presence of atmospheric aberrations modeled using the AOtools [18] software package, and then we consider the system working under a zero-latency open-loop mode. When investigating high-order errors, tilt was removed from the atmospheric aberration so that the high-order performance could be studied independently. The root-mean-square (RMS) error of the residual phase is used as the error function to describe wavefront measurement accuracy. For each simulation, several key system parameters were optimized by searching the whole parameter space and maximizing performance. This included optimizing the threshold factor and width of the window mask in TW-COM as well as the singular value decomposition conditioning parameter used when generating the reconstructor. Given a set of shifted subaperture images, it is possible to make multiple independent estimates of the image shift using different references. By comparing the spread of the shift estimates, we can get an estimate of the error on the shift measurement. Then the threshold factor and width of the window mask in TW-COM, which has the minimum standard deviation of estimated error, are the parameters that have the best performance under current observation conditions. The singular value decomposition conditioning parameter used in this paper is picked from experience. We finally compare simulated system performance when ideal correlation references can be determined using a noise-free camera not affected by any aberrations. The system performance when using the ideal reference defines the limitation of the system in optimal conditions.

#### B. Wavefront Measurement Results

In this subsection, we perform the zero-latency open-loop simulations to compare the wavefront measurement accuracy when using different correlation reference images.

Figure 3 depicts the residual phase RMS error within the telescope pupil under varying turbulence strength (as defined by the Fried parameter ${r_0}$) and different object brightness defined by photons per recomposed subaperture. Under each observation condition, the simulation has been performed 100 times with 100 independent realizations of turbulence, and the RMS value in the plot is the average of 100 results. Three reference generation methods were investigated:

- 1. Shift and stack recomposed subaperture images (black line in Fig. 3);
- 2. the usage of PlWFS cell image (red line in Fig. 3);
- 3. the PlWFS recomposed subaperture images without atmospheric aberrations and detector noise (blue line in Fig. 3), which is referred to as the ideal reference in this paper.

All three methods were tested on the same turbulence datasets. It can be seen clearly that using cell images has significant lower mean residual phase RMS error than using the average recomposed subaperture images under all conditions. This indicates that using cell images is a better option compared to using the average recomposed subaperture images from a statistical perspective. When we use the average subaperture image as a reference, although we can reduce the impact of noise via averaging multiple images and using optimized parameters in TW-COM, the accuracy is still limited. Figure 2 demonstrates this in that the average recomposed subaperture image does not provide as clean a representation of the object (the USAF target) as the cell image in the presence of atmospheric aberrations.

#### C. Overall Tilt Measurement

In this section we investigate the PlWFS performance when the cell image is used to measure global tip tilt. In a closed-loop system, the wavefront sensor is always sensing the phase residual. When we measure the overall tilt, the PlWFS cell image should be insensitive to high-spatial-frequency residuals and only have linear response to the overall tilt components. To investigate the impact of closed-loop operation on performance, we simulated performance before and after closed-loop correction. For the first situation, we simulated an uncorrected atmospheric turbulence with an ${r_0}$ of 10 cm and set the photons per subaperture to 400; in the second situation, we artificially subtract the first 60 Zernike modes to simulate an idealized closed-loop AO system and characterize the impact of high-spatial-frequency errors only on the PlWFS overall tilt measurement performance. Examples of PlWFS cell images are shown in Fig. 4.

Figure 5 shows the overall tilt measurement performance using different cell images. During the overall tilt estimation, we also need to select a reference cell image and perform the correlation shift estimation to estimate overall image motion. We first used a turbulence-free zero-noise PlWFS frame to generate the ideal cell image as the correlation reference.

Figure 5(a) depicts the measurements results using uncorrected PlWFS cell images, and we can easily see that the measured results vary around the actual input overall tilt. The uncorrected cell image in Fig. 4(b) is blurred compared to the ideal cell image shown in Fig. 4(a). When estimating the image shift using correlation method, both the overall tilt and this blur caused by atmospheric aberrations would contribute to the final results so that the measured overall tilt is always affected by the high-order aberrations. In Fig. 5(b), we remove the first 60 Zernike modes to simulate perfect AO correction and plot the performance when using either the ideal cell image or corrected cell reference. In this situation the red (ideal reference) and black (actual input tilt) match perfectly. This result indicates that the overall tilt measurement using corrected cell images can work well and will not be affected by the high-spatial-resolution residual phase. Figure 5(b) also shows performance is we randomly selected a PlWFS image from the image sequence and use its cell image as the correlation reference as plotted as the blue line. The RMS tilt error when using uncorrected cell reference was measured at $\pm0.15$ pixels. In closed-loop conditions, tilt errors were $\pm0.009$ pixels RMS and $\pm0.013$ pixels for the ideal and corrected cell references, respectively, once bias had been accounted for. We can draw a conclusion from these results that using the corrected cell image provides similar levels of performance to the ideal reference and greatly outperforms a system using the uncorrected cell image. Although using the corrected cell reference will introduce a constant bias, this will not affect the system operating stability and can be removed by redefining the center of area of interest. Furthermore, based on the simulation parameters listed in Table 1, the pixel size of the PlWFS cell image equals the lenslet size, which is 176 µm. For the image camera pixel size of 11 µm, the $\pm0.013$ pixels error in the WFS cell images is equivalent to only $\pm0.2$ pixels on the imaging camera.

Outside of simulations we are not able to obtain an ideal PlWFS frame for the target, so our strategy during closed-loop correction would be to pick one corrected PlWFS cell image as the reference and the redefine the zero position on the imaging camera. This allows a bias control signal to be sent to the TT mirror to compensate for the image shift caused by the imperfect reference.

## 4. CLOSED-LOOP RESULTS

The main simulation parameters of the PlWFS and DM are the same as in Section 3. The temporal evolution of turbulence is simulated by translating the turbulence phase screen with a 8 m/s wind speed. A noise-free science camera with 20 ms exposure time is added in the system to capture object image and observe the improvement of the image quality.

#### A. Closed-Loop Simulation with Artificial Tip/Tilt Removal

In this subsection, we focus on the performance when using the cell image as the reference during high-order aberration measurement. We therefore remove the TT components in the atmospheric aberrations artificially to emulate an ideal global tilt correction. Three methods for selecting the reference are employed in this section to compare their impact on closed-loop AO system performance, including an ideal reference to present the performance of the AO system in the absence of reference-image-related effects.

Figure 6 shows the closed-loop correction performance using two kinds of references when ${r_0}$ is 10 cm and photons per subaperture equal 400. It can be seen that the science camera image quality is significantly improved after closed-loop correction no matter which kind of reference is used. The mean RMS residual phase error for the system when using the cell image reference is $61 \pm 3\; {\rm nm}$, and the mean RMS error when using averaged recomposed subaperture images is around $72 \pm 5\; {\rm nm}$, proving that the performance of using the cell image is better than that of the averaged image. The same conclusion can also be drawn from the science camera image. Simulations have been performed under different observing conditions to test the performance of different reference image generation techniques in closed-loop AO operation. The results are shown in Fig. 7. Unlike the open-loop results shown in Fig. 3, the closed-loop RMS results remains relatively stable when the photon numbers vary. With the number of photons per subaperture decreased from 1000 to 200, the mean RMS error of using cell image increases around by only 5 nm. However, when ${r_0} = 5\; {\rm cm}$, the performance when using averaging recomposed subaperture images degrades quickly. Investigations showed that this is because the energy is very dispersed when turbulence is strong, and the image registration accuracy in “shift-and-stack” process is severely affected by the noise. This results in the averaged recomposed subaperture becoming significantly blurred and adding extra errors to the local gradient measurement.

It is also very clear that the mean RMS wavefront error of the system when using the cell image reference is always lower than averaging recomposed subaperture images under all presented observing conditions. For example, under high-flux conditions (1000 photons/subaperture/frame), the mean RMS wavefront error of using cell image is 5, 8, and 12 nm lower than using averaged images when ${r_0}$ is 20, 10, and 5 cm, respectively. The cell image is an image of object at telescope focal plane captured with very low resolution. In closed-loop operation, the cell image is captured after AO correction and therefore has higher image quality. Within a subaperture, only image tilt can be corrected by the AO system, so the recomposed subaperture images are still blurred, causing the local wavefront gradient measurement accuracy to decrease. The degradation of images within subapertures is related to the AO system design and turbulence conditions. We also note that the performance of a system using a recomposed subaperture reference will approach that of a system using the cell or ideal reference image as turbulence strength decreases. This behavior can be seen in Fig. 7, even though there is still an appreciable performance difference even in good-seeing conditions.

In conclusion, the results in this section show that using the cell image as the correlation reference can provide better closed-loop correction performance. In addition, generating PlWFS cell images only involves simple image pixel binning, which is much less computationally intensive compared to the shift-and-stack process required to generate an averaged subaperture image.

#### B. Closed-Loop Simulation with Self-Referenced Tip/Tilt Correction

The final results we present are the performance of TT measurement using the PlWFS cell image. The simulation is performed under three regimes. In Case A, we use the averaged recomposed subaperture images for both high-order atmospheric aberrations and overall tilt measurement, then use DM and TT mirror to correct. For Case B, we replace the averaged recomposed subaperture images with the cell image and measure the wavefront using same turbulence dataset. In Case C, we assume a perfect TT correction is applied, so there would be no residual global tip/tilt remaining in the residual phase. In Case C, the TT correction starts from the first iteration together with high-order aberration correction. As for Case A and Case B, the TT correction loop is not closed until the 200th iteration (around 0.6 s) when the high-order correction is stable. At the 334th iteration (around 1.0 s), we redefine the center position on the imaging camera and send a constant bias signal to the TT controller, so we are able to move the area of interest to the center of the imaging area.

Figure 8 shows the long exposure closed-loop corrected science image under three different TT regimes. Figures 8(b) and 8(c) do not show a significant image blur compared to Fig. 8(a), which suggests that both using cell image and averaged recomposed subaperture image are able to efficiently limit the image blurring caused by turbulence. To compare the performance of using the cell image to the averaged recomposed subaperture image, we present the residual phase RMS error in Fig. 9. The TT correction for Case (A) and Case (B) is not started until ${T_1}$. From time 0 to ${T_1}$, although the high-order aberrations have been corrected, the TT components in the residual phase are not compensated, resulting in the observed increase in the RMS error for Cases A and B. At time ${T_1}$, the TT correction is started, and the residual TT components are stabilized during ${T_1}$ to ${T_2}$. At ${T_2}$, the image center on the imaging camera is manually defined to remove the TT bias due to the correlation algorithm. The RMS error of Cases (A) and (B) then falls to approximately 80 nm RMS as tip tilt is corrected. While performance using both references is similar, the red line that represents using the cell image (Case B) has less fluctuation compared to the black line showing the averaged recomposed subaperture image (Case A). The standard deviation of absolute image offset on the imaging camera after 1.5s is 0.1 pixels and 0.18 pixels for Case B and Case A, respectively. The maximum deviation from the averaged image offset position for Case B is 0.15 pixels and 0.31 pixels for Case A. The standard deviation and maximum deviation for Case B and Case A is small enough so that image would not be severely degraded from motion blur, but using the cell image still has better stability than using the averaged recomposed subaperture image.

## 5. CONCLUSIONS AND FUTURE WORK

In this paper, we presented a new way to select correlation reference images in PlWFS wavefront sensing on extended objects. By using the cell image as the reference, which can be easily obtained directly from PlWFS image, PlWFS can achieve local aberration sensing and overall tilt measurement at the same time.

Multiple simulations have been performed to compare the performance of proposed cell image reference to that of the averaged recomposed subaperture image reference. The results are positive and prove that using the cell image as a reference for correlation wavefront sensing provides better performance than the use of a recomposed subaperture image in both open-loop and closed-loop operation. In closed-loop operation, with high flux conditions (1000 photons/subaperture/frame), the mean residual phase RMS of using the cell image as reference is 5, 8, and 12 nm less than using the recomposed subaperture image when ${r_0}$ is 20, 10, and 5 cm, respectively. When the system is working under low flux conditions (200 photons/subaperture/frame), the improvement is around 6, 9, and 21 nm when ${r_0}$ is 20, 10, and 5 cm, respectively. The use of the cell image reduces the overall tilt bias that can be introduced if a single subaperture image is selected as the reference. In addition, the cell image is improved by the AO correction, while the recomposed subaperture images are not. These results show an improved performance over a correlation reference that is derived using a shift-and-stack approach of many recomposed subapertures.

A closed-loop simulation with TT correction was also performed. The results suggest that using cell image for overall tilt measurement is feasible and has good performance in preventing the science camera image from having global motion blur. After closed-loop TT correction the image motion on the science camera was controlled to within a range of 0.15 pixels, equivalent to around 0.01 arcsec. The proposed self-referenced tilt measurement and correction method stabilizes the camera image; however, this only measures the relative overall tilt to the reference image, and an absolute reference target position would still require definition for an extended object.

In this paper, we did not include anisoplanatic effects in the simulation, and we assume the turbulence is only at ground layer. This needs to be improved and corrected in future work, where wider objects or an extended scene might be taken as targets.

## Funding

Science and Technology Facilities Council (ST/P000541/1, ST/T000244/1); China Scholarship Council.

## Acknowledgment

Z. Z acknowledges CSC funding. We also acknowledge support from the UKRI Science and Technology Facilities Council.

## Disclosures

The authors declare no conflicts of interest.

## Data Availability

Data underlying the results presented in this paper are not publicly available at this time but may be obtained from the authors upon reasonable request.

## REFERENCES

**1. **J. W. Hardy, *Adaptive Optics for Astronomical Telescopes* (Oxford University, 1998), Vol. 16.

**2. **R. M. Clare and R. G. Lane, “Comparison of wavefront sensing with the Shack-Hartmann and pyramid sensors,” Proc. SPIE **5490**, 1211–1222 (2004). [CrossRef]

**3. **T. R. Rimmele and R. R. Radick, “Solar adaptive optics at the National Solar Observatory,” Proc. SPIE **3353**, 72–81 (1998). [CrossRef]

**4. **E. Pinna, A. Puglisi, J. Argomedo, F. Quiros-Pacheco, A. Riccardi, and S. Esposito, “The pyramid WFS with extended reference source,” in *2nd International Conference on Adaptive Optics for Extremely Large Telescopes* (2011), paper P36.

**5. **R. Ng, M. Levoy, M. Brédif, G. Duval, M. Horowitz, and P. Hanrahan, “Light field photography with a hand-held plenoptic camera,” Ph.D. thesis (Stanford University, 2005).

**6. **R. M. Clare and R. G. Lane, “Wave-front sensing from subdivision of the focal plane with a lenslet array,” J. Opt. Soc. Am. A **22**, 117–125 (2005). [CrossRef]

**7. **J. Rodríguez-Ramos, B. F. Castellá, F. P. Nava, and S. Fumero, “Wavefront and distance measurement using the CAFADIS camera,” Proc. SPIE **7015**, 70155Q (2008). [CrossRef]

**8. **L. F. Rodríguez-Ramos, Y. Martín, J. J. Díaz, J. Piqueras, and J. Rodríguez-Ramos, “The plenoptic camera as a wavefront sensor for the European Solar Telescope (EST),” Proc. SPIE **7439**, 74390I (2009). [CrossRef]

**9. **J. Rodríguez-Ramos, B. Femenía, I. Montilla, L. Rodríguez-Ramos, J. Marichal-Hernández, J. Lüke, R. López, J. Díaz, and Y. Martín, “The CAFADIS camera: a new tomographic wavefront sensor for adaptive optics,” in *1st Adaptive Optics for Extremely Large Telescopes, AO for ELT, EDP Sciences (AO4ELT) Conference* (2010), Vol. 5011.

**10. **L. F. Rodríguez-Ramos, I. Montilla, J. Fernández-Valdivia, J. Trujillo-Sevilla, and J. Rodríguez-Ramos, “Concepts, laboratory, and telescope test results of the plenoptic camera as a wavefront sensor,” Proc. SPIE **8447**, 844745 (2012). [CrossRef]

**11. **P. Jiang, J. Xu, Y. Liang, and H. Mao, “Comparison of the Shack–Hartmann and plenoptic sensor in closed-loop adaptive optics system,” Opt. Eng. **55**, 033105 (2016). [CrossRef]

**12. **P. Jiang, J. Xu, Y. Liang, and H. Mao, “Plenoptic camera wavefront sensing with extended sources,” J. Mod. Opt. **63**, 1573–1578 (2016). [CrossRef]

**13. **S. Thomas, T. Fusco, A. Tokovinin, M. Nicolle, V. Michau, and G. Rousset, “Comparison of centroid computation algorithms in a Shack–Hartmann sensor,” Mon. Not. R. Astron. Soc. **371**, 323–336 (2006). [CrossRef]

**14. **V. Michau, J.-M. Conan, T. Fusco, M. Nicolle, C. Robert, M.-T. Velluet, and E. Piganeau, “Shack-Hartmann wavefront sensing with extended sources,” Proc. SPIE **6303**, 63030B (2006). [CrossRef]

**15. **T. Berkefeld, D. Soltau, D. Schmidt, and O. von der Lühe, “Adaptive optics development at the German Solar Telescopes,” Appl. Opt. **49**, G155–G166 (2010). [CrossRef]

**16. **E. Li, Y. Dai, H. Wang, and Y. Zhang, “Application of eigenmode in the adaptive optics system based on a micromachined membrane deformable mirror,” Appl. Opt. **45**, 5651–5656 (2006). [CrossRef]

**17. **R. J. Noll, “Zernike polynomials and atmospheric turbulence,” J. Opt. Soc. Am. **66**, 207–211 (1976). [CrossRef]

**18. **M. Townson, O. Farley, G. O. de Xivry, J. Osborn, and A. Reeves, “AOtools: a Python package for adaptive optics modelling and analysis,” Opt. Express **27**, 31316–31329 (2019). [CrossRef]