## Abstract

The estimation and compensation of quasi-static aberrations is mandatory to reach the ultimate performance of high-contrast imaging systems. COFFEE is a focal plane wave-front sensing method that consists in the extension of phase diversity to high-contrast imaging systems. Based on a Bayesian approach, it estimates the quasi-static aberrations from two focal plane images recorded from the scientific camera itself. In this paper, we present COFFEE’s extension which allows an estimation of low and high order aberrations with nanometric precision for any coronagraphic device. The performance is evaluated by realistic simulations, performed in the SPHERE instrument framework. We develop a myopic estimation that allows us to take into account an imperfect knowledge on the used diversity phase. Lastly, we evaluate COFFEE’s performance in a compensation process, to optimize the contrast on the detector, and show it allows one to reach the 10^{−6} contrast required by SPHERE at a few resolution elements from the star. Notably, we present a non-linear energy minimization method which can be used to reach very high contrast levels (better than 10^{7} in a SPHERE-like context).

© 2013 Optical Society of America

## 1. Introduction

Exoplanet imaging is one of the most challenging areas in today’s astronomy. The observation of an extremely faint object (the planet) very close to a bright source (the host star) requires the use of an extreme adaptive optics (XAO) system coupled with a high-contrast imaging technique such as coronagraphy. The current generation of instruments dedicated to exoplanets direct imaging (SPHERE on the VLT [1], GPI on Gemini South [2], Subaru SCExAO [3] and Palomar P1640 [4]) aim at detecting massive gaseous planets 10^{−6} to 10^{−7} times fainter than their host star. In the future, high-contrast imaging instruments on ground based or space based telescopes will perform observation of Earth-like planets, 10^{−9} to 10^{−10} times fainter than their host star.

The ultimate limitation of a high-contrast imaging instrument lies in its quasi-static aberrations, which originate in imperfections of the optical system such as misalignment or optical surface polishing error. These aberrations, when unseen and thus uncorrected by the AO loop, create long-lived speckles on the detector plane [5], limiting the achievable contrast. Besides, unlike the signal which originates in the residual turbulence (averaged in a long exposure image), these speckles can easily be mistaken for a planet. Thus, to reach the ultimate performance of the imaging system, one must be able to compensate for these aberrations. To perform such a compensation, SPHERE relies on phase diversity [6] to reach a contrast of 10^{−6}, whereas GPI relies on an interferometric approach [7] for an aimed contrast of 10^{−7} on the detector.

Several techniques dedicated to this compensation have been proposed. Closed loop methods, which assume small aberrations ([8–12]), estimate the electric field in the detector plane using at least three images. The technique proposed by Baudoz *et al.* [13] relies on a modification of the imaging system, but requires only one image. We note that this approach, based on the analysis of fringed speckles, requires a
$\sqrt{2}$ oversampling of the coronagraphic images to properly sample the interference fringes. These techniques aim at minimizing the energy in a chosen area (“Dark Hole”), leading to a contrast optimization on the detector in a closed loop process.

The focal plane wave-front sensor we have proposed [14], called COFFEE (for COronagraphic Focal-plane wave-Front Estimation for Exoplanet detection), requires only two focal-plane images to estimate the aberrations both upstream and downstream of the coronagraph without any modification of the coronagraphic imaging system or assuming small aberrations. In a previous study [15], we presented COFFEE’s early performance and limitations, detailed below, as well as its sensitivity to a realistic experimental environment. In this paper, we present a high order extension of COFFEE and its performance evaluation in a compensation process, in the framework of the quasi-static aberration calibration of a ground-based instrument such as SPHERE. Section 2 presents the modifications that allows COFFEE to overcome its previous limitations [15], allowing an estimation of high order aberrations with nanometric precision for any coronagraphic device. Section 3 presents the noise sensitivity of this extended version of COFFEE using realistic SPHERE-like simulations. The choice of a suitable diversity phase to use is also discussed in this section. Knowing that in a real system, such a diversity phase will not be perfectly introduced, we present, in Section 4, an original approach, hereafter called ”myopic”, which significantly improves COFFEE’s robustness to an imprecise knowledge of the diversity phase. Finally, in Section 5, we describe the different compensation processes which can be used with COFFEE. In particular, we present a method of energy minimization in the detector plane that allows the creation of a Dark Hole without any small aberration assumption. Unlike other energy minimization methods [8–12], the one we propose does not rely on the calibration of an interaction matrix, which is sensitive to the position of the coronagraphic image on the detector. This new dark hole method can thus be used on any high contrast instrument without a repetitive dedicated calibration step. In the SPHERE baseline design, quasi-static aberrations are measured with conventional phase diversity [6] (no coronagraph), which is unable to sense high-order aberrations to a nanometric level. As a result, this high contrast imaging instrument performance will be limited by high-order phase aberrations and not by amplitude aberrations (amplitude variations in a pupil plane). Consequently, the latter are not considered in the simulations presented herein and are currently not estimated by COFFEE.

## 2. Aberrations estimation with COFFEE

COFFEE is based on an inverse problem approach: it estimates the aberrations both upstream and downstream of the coronagraph using two focal-plane images that differ from a known aberration. As described in [15], the two main error sources of the first version of COFFEE have been shown both by simulations and experimentally to be aliasing and modelling error. The former was due to the use of a Zernike basis and prevented COFFEE from estimating high order aberrations. Moreover, the estimation of these high order aberrations is mandatory to optimize the contrast in the detector far from the optical axis (between a few *λ/D* and 20 *λ/D* in the case of the SPHERE instrument).

The latter was originating in the image formation model used by COFFEE. The estimations were indeed performed using a perfect coronagraph model, and thus limited by a model error. In practice, COFFEE’s use was limited to the apodized Roddier & Roddier coronagraph.

In this Section, we present COFFEE’s modifications that allows to get rid of these two limitations. Section 2.1 describes the modification of the maximum *a posteriori* (MAP) approach on which COFFEE is based, which includes a modification of the basis used for the aberration estimation, now composed of pupil indicator functions (pixels). Such a basis, used with a dedicated regularization metric described in Section 2.2, allows COFFEE to estimate high-order aberrations. Besides, thanks to the modification of the imaging model, described in Section 2.3, COFFEE is now able to perform the estimation for any coronagraphic device.

#### 2.1. Criterion expression

Most of the notations of this article are coherent with [14, 15]. We consider a coronagraphic imaging system made of four successive planes denoted by A (circular entrance pupil of diameter *D _{u}*), B (coronagraphic focal plane), C (Lyot Stop), and D (detector plane). The optical aberrations are considered as static and introduced in pupil planes A and C. The coronagraphic device is composed of a focal plane mask located in plane B and a Lyot Stop in plane C. No particular assumption is made on the pupil shape or intensity, which can be calibrated using data recorded from the instrument. We note that this model does not consider out of plane aberrations and the corresponding amplitude aberrations (which originate in Fresnel effect), but as said previously, we consider in this paper the case of a ground based instrument (such as SPHERE) limited by phase aberrations.

COFFEE requires only two images
${i}_{c}^{\text{foc}}$ and
${i}_{c}^{\text{div}}$ recorded on the detector (plane D) that, as in phase diversity, differ from a known aberration *ϕ*_{div}, to estimate aberrations both upstream (*ϕ _{u}*) and downstream (

*ϕ*) of the coronagraph.

_{d}In this paper, we consider the case of the instrument calibration, assumed to be performed at high signal to noise ratio (SNR) value, with a monochromatic source, emitted from a single-mode laser fiber. Since the impact of the source finite size on the estimation is not significant on the aberrations estimation [15], we consider here that this calibration is performed with an unresolved object, and use the following imaging model :

*α*is the incoming flux (

_{p}*p*is for “foc” or “div”),

*h*the coronagraphic on axis “point spread function” (PSF) of the instrument (which is the response of a coronagraphic imaging system to a point source),

_{c}*h*

_{det}the known detector PSF,

*n*

_{foc}and

*n*

_{div}are the measurement noises and comprise both detector and photon noises,

*β*is a unknown uniform background (offset), and ★ denotes the discrete convolution operation.

_{p}COFFEE is based on a maximum *a posteriori* (MAP) approach: it estimates the aberrations *ϕ _{u}* and

*ϕ*as well as the fluxes

_{d}*α*= [

*α*

_{foc},

*α*

_{div}], and the backgrounds

*β*= [

*β*

_{foc},

*β*

_{div}] that maximize the posterior likelihood

*p*(

*α*,

*β*,

*ϕ*,

_{u}*ϕ*| ${i}_{c}^{\text{foc}}$, ${i}_{c}^{\text{div}}$) of the data. For practical issues, it is more convenient (and equivalent) to minimize the opposite of the logarithm of the posterior likelihood, or neg-log-likelihood

_{d}*J*(

*α*,

*β*,

*ϕ*,

_{u}*ϕ*) = −ln[

_{d}*p*(

*α*,

*β*,

*ϕ*,

_{u}*ϕ*| ${i}_{c}^{\text{foc}}$, ${i}_{c}^{\text{div}}$)] which includes regularization terms

_{d}*ℛ*(

*ϕ*) and

_{u}*ℛ*(

*ϕ*) designed to enforce smoothness of the sought phases:

_{d}*x*||

^{2}denotes the sum of squared pixel values of map

*x*, ${\sigma}_{n}^{\text{foc}}$, and ${\sigma}_{n}^{\text{div}}$ are the noise standard deviation maps of each image. The corresponding variances can be computed as a sum of the photon and detector noise variances. The former can be estimated as the image itself thresholded to positive values, and the latter can be calibrated prior to the estimation.

Any aberration *ϕ* is expanded on a basis {*b _{m}*}. In [15], we showed that the use of a truncated Zernike basis for the reconstruction led to a strong aliasing error, let alone the inability to estimate high frequency aberrations. In this paper, the phase is expanded on pixel indicator functions in the pupil plane:

*ϕ*= ∑

*(with*

_{m}ϕ^{m}b_{m}*ϕ*the value of the

^{m}*m*–th pixel in the pupil). Such a basis, used with the proper regularization metrics, will allow COFFEE to estimate high order aberrations and strongly reduce the aliasing error, as shown in the following.

The minimization of metric *J*(*α*, *β*, *ϕ _{u}*,

*ϕ*) of Eq. (3) is performed by means of a limited memory variable metric (BFGS) method ([16, 17]), which is a fast quasi-Newton type minimization method. It uses the analytical expression of gradients $\frac{\partial J}{\partial {\varphi}_{u}}$, $\frac{\partial J}{\partial {\varphi}_{d}}$, $\frac{\partial J}{\partial \alpha}$ and $\frac{\partial J}{\partial \beta}$, which we have calculated, to estimate

_{d}*ϕ*,

_{u}*ϕ*,

_{d}*α*and

*β*(Implementation details can be found in Appendix A).

Sauvage *et al.* [14] established that a suitable diversity phase *ϕ*_{div} for COFFEE was a mix of defocus and astigmatism:
${\varphi}_{\text{div}}={a}_{4}^{\text{div}}{Z}_{4}+{a}_{5}^{\text{div}}{Z}_{5}$ with
${a}_{4}^{\text{div}}={a}_{5}^{\text{div}}=0.8$ rad RMS, introduced upstream of the coronagraph. In this paper, such a diversity phase will be used for a start; the optimal phase diversity to be used with COFFEE will be discussed later.

#### 2.2. Regularization metric

The use of a pixel basis for the phase reconstruction is required for COFFEE to estimate high order aberrations. However, this leads to a large number of unknowns, which in turn calls for a regularization metric in order to reduce the noise sensitivity. We chose a regularization metric that is based on the available *a priori* knowledge on the quasi-static aberrations. Indeed, they can be reasonably assumed to be Gaussian, homogeneous and thus endowed with a power spectral density (PSD) *S*_{ϕk} (where k stands for *u* (upstream) or *d* (downstream)), which is usually assumed to follow a power law:

*ν*the spatial frequency and 〈

*ϕ*〉 the mean of

_{k}*ϕ*. The regularization term

_{k}*ℛ*(

*ϕ*) can thus be written as:

_{k}*ℱ*represent the Fourier transform operation. In order to be able to cope with any pupil shape, we implement this metric in direct space rather than Fourier space as follows; for n=2 in Eq. (4), we obtain: And for n=4 in Eq. (4), Here,

*r*denotes the pupil plane position which will be omitted in the following for the sake of simplicity. ∇ and Δ represent the gradient and the Laplacian operators, respectively. The balance parameter

*μ*will be called “hyperparameter” hereafter. For both cases, derivatives ∇

_{k}*ϕ*and Δ

_{k}*ϕ*are computed as finite differences between neighboring points, and summations are limited to points whose computation requires only pixels inside the pupil. In this paper, we consider a PSD decrease as 1/

_{k}*ν*

^{2}(

*n*= 1 in Eq. (4)), which corresponds to a classical assumption for optical surface polishing errors, according to K. Dohlen

*et al.*[18], who measured and characterized the PSD of the SPHERE optical system. Additionally, identification between Eqs. (5) and (6) yields the analytic value of the hyperparameter

*μ*: where ${\sigma}_{\nabla {\varphi}_{k}}^{2}$ is defined as ${\sigma}_{\nabla {\varphi}_{k}}^{2}={\sigma}_{{\nabla}_{x}{\varphi}_{k}}^{2}+{\sigma}_{{\nabla}_{y}{\varphi}_{k}}^{2}$, with ${\sigma}_{{\nabla}_{x}{\varphi}_{k}}^{2}$ and ${\sigma}_{{\nabla}_{y}{\varphi}_{k}}^{2}$ the variances of ∇ (

_{k}*ϕ*) in directions

_{k}*x*and

*y*, respectively. The fact that the hyperparameter is given by Eq. (8) stems from the assumption that the phase

*ϕ*is statistically homogeneous, and is whitened by the differentiation in Eq. (6) [ 19, 20]. One can notice that ${\sigma}_{\nabla {\varphi}_{k}}^{2}$ can be analytically computed from

_{k}*S*

_{ϕk}and the phase variance ${\sigma}_{{\varphi}_{k}}^{2}$. Thus, this regularization does not require any manual tuning.

#### 2.3. Coronagraphic image formation model

To perform the minimization of criterion *J* in Eq. (3), the image formation model used by COFFEE (Eq. (1)) requires the expression of a coronagraphic PSF *h _{c}*. Let

*r*be the pupil plane position vector and

*γ*the focal plane position vector. the entrance pupil function

*P*is such that:

_{u}*D*the entrance pupil diameter, and Φ a known apodization function. The electric field in the entrance pupil can be written as: The electric field in the detector plane Ψ

_{u}*is obtained by propagating Ψ*

_{D}*through each plane of the coronagraphic imaging system: the signal is first focused on the coronagraphic focal plane mask*

_{A}*ℳ*; then, the electric field is propagated trough the Lyot Stop pupil

*P*(

_{d}*r*) (

*P*(

_{d}*r*) = Π(2

*r/D*) with

_{d}*D*the Lyot Stop pupil diameter). The electric field in the detector plane Ψ

_{d}*can thus be written as:*

_{D}*ℱ*

^{−1}is the inverse Fourier transform operation. For the sake of simplicity, spatial variables

*r*and

*γ*will be omitted in the following.

The coronagraphic PSF *h _{c}* is the square modulus of Ψ

*:*

_{D}In Eq. (12), *ℳ* can easily be adapted to represent any coronagraphic device, allowing COFFEE to be used with a broad class of high contrast imaging instruments.

## 3. Performance evaluation

This Section presents the performance of the new extension of COFFEE presented in Section 2. Section 3.1 gathers the different parameters used for these simulations. In Section 3.2, the impact of the noise on COFFEE’s estimation is quantified, while the optimal phase diversity *ϕ*_{div} to be used with COFFEE is studied in Section 3.3. Section 3.4 presents COFFEE’s sensitivity to a difference between the prior assumed in the phase reconstruction and the true phase.

#### 3.1. Parameters and criteria

Table 1 gathers the parameters used for the simulations presented in this section:

These parameters have been chosen so that the following simulations are representative of the SPHERE instrument. The chosen coronagraph (ALC) is the one designed for the considered wavelength on SPHERE, and the apodization function used in the image formation model (Figure 1) is the one designed for this coronagraph. In this paper, we consider the case of a high-contrast imaging instrument calibration prior to the scientific observation, so a monochromatic source is considered. It is worth mentioning that COFFEE could easily be adapted to polychromatic images, although such a study is beyond the scope of this paper. Such an adaptation would require a modification of the image formation model (Eq. (1)), in which a polychromatic coronagraphic PSF would be computed from several monochromatic PSF for different wavelengths. In order to properly model the ALC coronagraph, the coronagraphic PSF *h _{c}* (Eq. (12)) is computed using the method developed by R. Soummer

*et al.*[21]. This approach allows an accurate numerical representation of Lyot-style coronagraphs by accurately sampling the coronagraphic focal plane mask, which can hardly be done using the common Fast Fourier Transform (FFT) algorithm. Such an operation would indeed require the manipulation of very large arrays.

For each simulation, coronagraphic images are computed from randomly generated aberrations *ϕ _{u}* and

*ϕ*using the imaging model presented in Eqs (1) and (12). Using these two images, COFFEE performs the phase estimation by minimizing criterion

_{d}*J*of Eq. (3).

In order to quantify the reconstruction accuracy, we define the reconstruction error *ε _{k}* as the RMS value of

*ϕ*−

_{k}*ϕ̂*, where

_{k}*k*is either

*u*(upstream) or

*d*(downstream),

*ϕ*is the simulated aberration and

_{k}*ϕ̂*its estimation made by COFFEE. In this Section, every reconstruction error value is an average value, computed from ten independent randomly generated phases to make sure that the result obtained is independent of the phase realization. The PSD

_{k}*S*of each generated phase is such that

_{ϕ}*S*∝ 1/

_{ϕ}*ν*

^{2}.

#### 3.2. Noise propagation

The ultimate limitation of the estimation performed by COFFEE lies in the propagation of noise present in the images. As mentioned in Section 2.2, the use of a suitable regularization metric ensures the smoothness of the phase, limiting the propagation of the noise from the images to the estimated aberrations. In this Section, we first demonstrate that the analytic value of the regularization metric hyperparameter (see Section 2.2) is the one that gives the smallest reconstruction error. We consider here an incoming flux *α* = 10^{7} photons and a read-out noise (RON) of standard deviation *σ*_{det} = 5 e^{−}. This value, slightly higher than the expected RON on a SPHERE-like system, is chosen to strengthen the impact of the hyperparameter value. Besides, photon noise is added in the simulated coronagraphic images. The hyperparameter is here such as
${\mu}_{k}=\chi /{\sigma}_{\nabla {\varphi}_{k}}^{2}$, with *χ* ∈ [10^{−3}; 10^{3}]. A reconstruction error value is computed for each value of *χ*.

Figure 2 shows that the analytic value of the hyperparameter (*χ* = 1) is the one that gives the smallest reconstruction error for both upstream and downstream aberrations. When the regularization metrics are under balanced (*χ* < 1), the prior information is not “strong” enough in the minimization to prevent noise propagation in the estimated aberrations. One can notice here that without a regularization metric (*χ* = 0), the reconstruction error would have been unacceptable. On the other hand, when the regularization metrics are over balanced (*χ* > 1), their impact is too strong, and prevents the estimation of the high frequency components of *ϕ _{u}* and

*ϕ*. In the following, considering the result of this simulation, all the estimations performed by COFFEE will be done using the analytic value of the hyperparameter (

_{d}*χ*= 1).

In Fig. 3, we present the evolution of the reconstruction errors with respect to the total incoming flux. As previously, photon noise and detector noise (*σ*_{det} = 1 e^{−}) are added in the simulated images used by COFFEE to perform the estimation.

In Fig. 3, one can see that in a low flux regime, both reconstruction errors upstream and downstream reach a saturation level, which correspond to the WFE value, rather than becoming arbitrarily large. Such a behaviour originates in the regularization metric: in a low flux regime, the speckles that originate in aberrations upstream of the coronagraph, which are used by COFFEE to estimate the aberrations, can hardly be distinguished from the noise. The less these speckles are visible in the images, the less the corresponding aberrations can be estimated using COFFEE. The limit is reached when no speckles are visible : in such a case, the estimated phase tend to zero and the reconstruction error is equal to the WFE value. Notice that without regularization metric, the reconstruction errors would have been much stronger in a low flux regime, due to noise propagation (as presented in Figure 2, in the case of an under-balanced hyperparameter).

When the flux increases, the reconstruction error evolution is proportional to 1/*α*, which correspond to a photon noise limited regime. For very high flux values (*α* > 10^{9} photons), the upstream reconstruction error seems to reach another saturation level. We have shown that this saturation, slightly above 1 nm RMS can be attributed to numerical difficulties in the minimization due to the very high dynamic range of the noise variance in the criterion. If it were of practical interest, these difficulties could be solved to reach even better accuracies.

In this paper, we consider the case of a high-contrast imaging instrument calibration, performed off-line prior to the observation with a high SNR value. Thus, considering the noise propagation behaviour presented above, the following simulations will be performed with an incoming flux value *α* = 10^{9} photons and a read-out noise (RON) of standard deviation *σ*_{det} = 1 e^{−}.

#### 3.3. Choice of a diversity phase

This section aims at studying the sensitivity of COFFEE to the diversity phase *ϕ*_{div}, which was until now a mix of defocus and astigmatism: *ϕ*_{div} = *a*^{div}(*Z*_{4} + *Z*_{5}) with *a*^{div} = 0.8 rad RMS (202 nm RMS at *λ* = 1589 nm), introduced upstream of the coronagraph. This choice has been made following Sauvage *et al.* [14], who demonstrated that for a perfect coronagraph model and low order aberrations, such a diversity phase allowed a suitable criterion shape for the minimization. Indeed, the use of this diversity phase instead of defocus alone enlarges the global minimum, leading to an easier criterion minimization. In this Section, we study the influence of the diversity phase on the reconstruction accuracy more thoroughly and for realistic high order aberrations and coronagraph.

In classical phase diversity (no coronagraph), the optimal diversity phase depends on several parameters such as the signal to noise ratio (SNR), the level of the aberrations and their PSD [22]. A theoretical work, based on the computation of the Cramer-Rao lower bound (following Lee *et al.* [23]) could be performed to determine an optimal diversity phase; however, such a study would assume that there are no local minima in the criterion. Since we know that such minima appears in the criterion when the diversity phase amplitude is small, we adopt, in this section, a more practical approach to determine a suitable diversity phase for an aberration estimation with nanometric precision.

We will consider different diversity phases: a diversity phase composed of defocus alone, *ϕ*_{div} = *a*_{div}*Z*_{4}, and a diversity phase composed of a mix of defocus and astigmatism, *ϕ*_{div} = *a*^{div}(*Z*_{4} + *Z*_{5}). For each diversity phase, the evolution of the reconstruction errors with the diversity phase amplitude *a*_{div} value will be plotted for 3 different WFE* _{u}* value upstream of the coronagraph.The parameters used in this simulation are gathered in Table 1.

Figure 4 shows the evolution of both reconstruction errors upstream and downstream of the coronagraph with respect to the amplitude *a*^{div}. Here, the reconstruction error is due to noise and to local minima, which are gradually removed when the diversity phase amplitude increases, leading to an improvement of the estimation accuracy. When the diversity phase amplitude *a*^{div} is high enough, all local minima are removed. Then, the reconstruction error reaches a saturation level which correspond to the level of noise in the images.

One can notice that with a diversity composed of defocus and astigmatism, the reconstruction error decreases faster than in the case of a diversity composed of a defocus alone. In order to have *ε _{u}* < 5 nm RMS,

*a*must be greater than 2×WFE

_{div}*when the diversity is composed of defocus and astigmatism, and greater than 2.5×WFE*

_{u}*when it is composed of defocus alone.*

_{u}This result confirms what has been shown in a simple case with a perfect coronagraph model [14]: a diversity phase composed of a mix of defocus and astigmatism enlarges the global minimum and pushes away local minima, making criterion *J* (Eq. (3)) easier to minimize, and thus allowing a more accurate estimation of the aberrations both upstream and downstream of the coronagraph.

#### 3.4. Sensitivity to the a priori assumption accuracy

As mentioned in Section 2.2, the *a priori* assumption about the aberration PSD considered by COFFEE is derived from [18]. However, this assumption will not be exact for all optical surface; for instance, the PSD that correspond to the polishing error of the Very Large Telescope primary mirrors follow a 1/*ν*^{3} power law, as demonstrated by Bordé and Traub [8].

In this section, the sensitivity of COFFEE to the validity of the assumed PSD is evaluated: using parameters listed in Table 1, coronagraphic images are computed with aberrations generated with three different power laws: 1/*ν*, 1/*ν*^{2} and 1/*ν*^{3}. Then, using these simulated images, COFFEE perform the aberration estimation assuming a PSD following a 1/*ν*^{2} power law (as described in Section 2.2).

Table 2 shows the results of this evaluation. One can see that COFFEE is not very sensitive to the *a priori* accuracy, since the reconstruction errors remain indeed small when the PSD assumed by COFFEE does not perfectly match the actual PSD.

When *S*_{ϕk} follows a 1/*ν* power law, we note a slight increase in the reconstruction error. We have checked that, as expected, this increase is due to very high frequencies in the phase which are over-regularized and thus not reconstructed. In the conditions of our simulations, these very high frequencies are actually beyond the spatial frequencies that the DM is able to control, so that in closed loop this HF error on the reconstructed phase would have no impact.

We note that when *S*_{ϕk} follow a 1/*ν*^{3} power law, reconstruction errors are lower than when the correct 1/*ν*^{2} power law is considered. Again, the reconstruction errors originate mostly in the estimation of the high frequency aberrations, which give birth to lower energy speckle than the low frequency aberrations. When the PSD follows a 1/*ν*^{3} power law, the quantity of high frequencies decreases in the aberrations to estimate, leading to an improved reconstruction error.

## 4. Circumventing calibration errors of the diversity phase: the myopic approach

The value of the diversity phase *ϕ*_{div} is one of the few inputs COFFEE needs to perform the phase estimation. Thus, an imprecise calibration of *ϕ*_{div} will lead to an error on the estimated aberration. In the case of classical phase diversity, this error is the one that drives the total error budget [24]. In [15], we demonstrated that an error *ε*_{div} on the knowledge of *ϕ*_{div} was leading to a reconstruction error of about *ε*_{div}/2 on both upstream and downstream estimated aberrations. Now that both aliasing and model errors have been tackled in COFFEE, the diversity calibration error would be the most important one in the error budget.

The most convenient way to introduce the diversity phase *ϕ*_{div} on the instrument is to modify the reference slopes of the AO loop to introduce a calibrated aberration, as described in [15]. The accuracy of such a process is thus limited by the DM’s ability to achieve a given shape, leading to an error
${\epsilon}_{\text{div}}^{\text{DM}}$ on the phase diversity
${\varphi}_{\text{div}}^{\text{DM}}$ actually introduced. As this error will always be present on an AO system (thermal evolution of the DM, ageing of influence functions, inability to re-calibrate them regularly), we have adapted COFFEE to make it able to perform a joint estimation of an error on *ϕ*_{div}. This approach, called hereafter “myopic estimation”, consist in a slight modification of the criterion *J* to be minimized (Eq. (3)), in which an additional unknown parameter *ϕ _{ε}* (called hereafter diversity error phase) is introduced:

*ℛ*(

*ϕ*) is an optional regularization metric designed to enforce our knowledge that

_{ε}*ϕ*should be small and smooth. Using the gradient $\frac{\partial J}{\partial {\varphi}_{\epsilon}}$ (whose computation is trivial knowing $\frac{\partial J}{\partial {\varphi}_{u}}$), COFFEE is able to perform a joint estimation of

_{ε}*ϕ*along with the previously estimated parameters

_{ε}*α*,

*β*,

*ϕ*and

_{u}*ϕ*.

_{d}In this paper, the estimated phases *ϕ _{u}* and

*ϕ*are expanded on a pixel basis, which allows the estimation of high-order aberrations. However, since the diversity phase is composed of low order aberration, one can expect that the error

_{d}*ϕ*will be mainly composed of low order aberrations. Thus, in order to optimize COFFEE’s performance, the estimation of

_{ε}*ϕ*has been implemented in two different ways:

_{ε}- ⋄
*ϕ*can be expanded on a pixel basis if high-order patterns (such as dead actuators) are expected in the diversity error phase. In this case, the regularization metric_{ε}*ℛ*(*ϕ*) used will have the same expression as_{ε}*ℛ*(*ϕ*), presented in Section 2.2._{u} - ⋄ If only low order aberrations are expected in
*ϕ*, it can be expanded on a truncated Zernike basis, composed of a few Zernike modes (typically up to 5 if_{ε}*ϕ*_{div}is composed of defocus (*Z*_{4}) and astigmatism (*Z*_{5})). With this basis, which reduces the number of parameters to be estimated, no regularization metric dedicated to*ϕ*is needed._{ε}

We validate this myopic approach by a realistic simulation: using parameters gathered in Table 1, we simulate coronagraphic images, and consider that the diversity phase used for the simulation is not perfectly known in the estimation stage. The coronagraphic simulated diversity image is computed with a diversity
${\varphi}_{\text{div}}={\varphi}_{\text{div}}^{\text{cal}}+{\varphi}_{\epsilon}$, where *ϕ _{ε}* =

*a*(

_{ε}*Z*

_{4}+

*Z*

_{5}), considering that the amplitude of the phase diversity is not perfectly known. In this simulation,

*a*= 0.04 rad RMS (10 nm RMS).

_{ε}COFFEE’s phase reconstruction is then performed using both simulated images considering that the diversity phase is equal to
${\varphi}_{\text{div}}^{\text{cal}}$, first without the myopic estimation, then with an estimation of *ϕ _{ε}* expanded on pixel basis and on a truncated Zernike basis composed of 4 modes: tip, tilt (which allows an estimation of a differential tip-tilt between the two images), defocus and astigmatism.

The reconstruction errors corresponding to each reconstruction are gathered in Table 3. One can clearly see here that the myopic estimation approach significantly improves the reconstruction accuracy, roughly by a factor 2, allowing an optimal use of COFFEE even when the diversity phase *ϕ*_{div} is not perfectly known.

The usefulness of this myopic approach will be further illustrated in Section 5.2, where we show that the estimation of an error on the diversity phase allows us to improve the contrast on the detector plane in a compensation process.

## 5. Closed loop quasi-static aberration compensation using COFFEE

In this Section, we present COFFEE’s performance in a closed loop compensation process. We consider here the case of the calibration of a SPHERE-like instrument. Two coronagraphic images are simulated using randomly generated aberrations, whose PSD follows a 1/*ν*^{2} law. Then, using these two simulated coronagraphic images, the aberrations upstream *ϕ _{u}* and

*ϕ*are estimated using COFFEE.

_{d}Once the phase reconstruction is performed, we modify the DM actuator voltages to compensate for the estimated aberrations and thus optimize the contrast in the detector plane. This compensation is performed using two different techniques: in Section 5.1, we use the conventional phase conjugation. In Section 5.2, we minimize the energy in a chosen area in order to optimize the contrast in the selected region of the detector plane. To perform such a compensation, we have developed a method dedicated to high-contrast imaging instruments that does not rely on any small aberration approximation. These simulations are performed using the parameters gathered in Tables 1 and 4.

In order to perform a realistic simulation, we consider here that an error *ϕ _{ε}* is made on the diversity phase: the coronagraphic diversity image is computed with a diversity phase
${\varphi}_{\text{div}}^{\text{sim}}={\varphi}_{\text{div}}+{\varphi}_{\epsilon}$. In this section, we consider that

*ϕ*=

_{ε}*a*(

_{ε}*Z*

_{4}+

*Z*

_{5}), with

*a*= 0.04 rad RMS (10 nm RMS).

_{ε}COFFEE estimates the aberrations considering that the calibrated diversity phase is equal to *ϕ*_{div}, and jointly searches for the diversity phase error *ϕ _{ε}*, as described in Section 4.

#### 5.1. Phase conjugation

Conventional phase conjugation aims at compensating for the aberrations upstream of the coronagraph *ϕ _{u}* in an iterative process. After its criterion minimization, COFFEE gives an estimation

*ϕ̂*. The aberrations upstream of the coronagraph at the iteration

_{u}*i*+ 1 are thus given by:

*g*is the gain of the iterative process (

*g*= 0.5 in this simulation) and ${\widehat{\varphi}}_{u}^{\text{DM}}$ is the aberration introduced by the DM in the entrance pupil plane. Such an aberration corresponds to the best representation of

*ϕ̂*achievable by the deformable mirror. Let

_{u}*F*be the DM’s influence matrix and

*T*its generalized inverse. The aberration introduced by the DM can be computed as follow:

Figure 5 presents the result of the simulation of a compensation performed by phase conjugation after 5 iterations of the loop (the average computation time for one loop iteration is 2 minutes). On this figure, one can see that the aberration compensation performed using COFFEE estimation allows a significant improvement in the coronagraphic images (figure 5, left). In particular, the average contrast plot (figure 5, right) shows that after compensation, the performance in the area controlled by the DM (±20*λ/D*) is very close to the one that would be obtained from a coronagraphic image computed without aberrations.

We note that the level of contrast reached after compensation presented in Fig. 5 exceeds the SPHERE instrument specification for off-line calibration, which relies on a phase estimation based on classical phase diversity (no coronagraph). In particular, classical phase diversity is not able to estimate high-order frequencies, and thus will not compensate for speckles located beyond 8*λ/D*. The use of COFFEE, which allows a compensation in the whole area controlled by the DM in the detector plane (as showed in Fig. 5), could thus improve the SPHERE instrument performance.

#### 5.2. Creation of a Dark Hole on the detector

Speckle nulling iterative techniques aim at minimizing the energy in a chosen area of the detector in order to facilitate exoplanet detection in this area, called a “Dark Hole” (DH). To create this DH, the methods developed until now, which rely on a small aberration approximation, minimize the energy during an iterative process [8, 9]. This process requires several iterations and is based on the knowledge of an interaction matrix between the detector plane and the DM pupil plane to create the Dark Hole on the detector.

Here, we propose a new method to minimize the energy that does not rely on any small aberration assumption, allowing us to deal with high amplitude phase aberrations such as the ones created by the DM dead actuators (which are currently part of the SPHERE instrument’s limitations). Besides, this method takes into account both upstream and downstream aberrations. This compensation method, coupled with COFFEE would be particularly adapted to the calibration of a high-contrast imaging instrument.

Let us define the energy in the focal plane *ℰ*_{DH} in the DH as:

*m*,

*n*the pixel position in the DH (for the sake of simplicity, these variables will be omitted in the following).

*α*is the incoming flux and Ψ

_{DH}the electric field in the DH area which, using notations of Section 2.3, is given by:

*ψ*represents the aberration introduced by the DM:

*ψ*(v) =

*F*v, with v the set of voltages applied to the DM actuators. Thus, creating a DH on the detector means finding the set of voltages v

_{DH}that minimize the energy

*ℰ*

_{DH}(v), knowing the relation between the entrance pupil plane and the detector plane of the high contrast imaging system.

Here, we minimize *ℰ*_{DH}(v) by means of the same optimization method as the one which was used by COFFEE to perform its estimation, which is a limited memory variable metric (BFGS) method [16,17]. Such an operation gives us the voltage v_{DH}, and thus the aberration *ψ*(v_{DH}) to introduce using the DM to create the DH. Unlike others energy minimization methods, the one we propose here does not require an interaction matrix calibration between the detector plane and the DM pupil plane. In particular, using COFFEE, we are able to estimate the aberrations downstream of the coronagraph, and among them the coronagraphic PSF position on the detector, i.e. downstream tip-tilt. This estimation is then taken into account in our compensation method (Eqs (16) and (17)). Thus, variation in the aberrations downstream of the coronagraph will not require any particular action during the compensation process, since these variations will be estimated by COFFEE along with the aberrations upstream of the coronagraph.

As mentioned previously, COFFEE does not estimate amplitude aberrations. However, the compensation method described in this section can easily be adapted to take into account amplitude aberrations upstream of the coronagraph *ξ*, by modifying Eq. (17):

*ξ*the amplitude aberrations. Thus, provided these aberrations are known, amplitude aberrations does not limit the performance of the compensation method presented in this Section.

We now validate this new energy minimization method by simulation. It requires the knowledge of the aberrations upstream *ϕ _{u}* and downstream

*ϕ*of the coronagraph, and of the incoming flux

_{d}*α*. In this section, we use COFFEE to perform the estimation of these parameters, and then minimize the energy in order to create a DH in the detector plane. The energy

*ℰ*

_{DH}is minimized between $5\frac{\lambda}{D}$ and $20\frac{\lambda}{D}$ to create the Dark Hole in the right part of the focal plane. As in the phase conjugation case (Section 5.1), such a compensation is performed in an iterative process, where the aberrations upstream of the coronagraph at the iteration

*i*+ 1 are given by:

*g*= 0, 5 in this simulation.

The result of this compensation after 5 iterations of the loop is presented in Fig. 6 (the average computation time for one loop iteration is 3 minutes). In the targeted area (between
$5\frac{\lambda}{D}$ and
$20\frac{\lambda}{D}$), this method allows a significant improvement: when the compensation is performed by conventional phase conjugation (Figure 5), the average contrast in the same area is 7.2 10^{−7}. The use of our new compensation method allow a contrast improvement by a factor 10 after compensation (Figure 6, bottom left). Besides, the interest of the myopic approach is illustrated in Fig. 6 : when the closed loop process is performed without estimation of an error on the diversity phase, the performance decreases by a factor 2 (solid cyan line).

If a very high contrast level is required, this compensation technique can thus be used instead of conventional phase conjugation to calibrate the instrument. Besides, in order to push down the dark hole floor, it is possible to narrow the energy minimization area, as mentioned by Bordé *et al.* [8].

## 6. Conclusion

In this paper, an extended version of our coronagraphic phase diversity, nicknamed COFFEE, has been presented. The use of a regularized pixel basis in the estimation allows COFFEE to estimate high order aberrations with nanometric precision (Section 2). Besides, thanks to a modification of the coronagraphic PSF used in the imaging model, COFFEE is no longer limited to a particular coronagraphic device. COFFEE’s performance has been studied and discussed in Section 3, while Section 4 has described a so-called myopic extension of COFFEE, which consists in a joint estimation of an error on the diversity phase in order to improve COFFEE’s accuracy in a real system, where the diversity phase is not perfectly known. Lastly, in Section 5, the achievable contrast optimization on a SPHERE-like system using COFFEE in a compensation process has been studied using realistic simulations. In the latter section, we have presented a new compensation method which minimizes the energy in a chosen area of the detector through a non-linear minimization, in order to reach higher level of contrast than those that can be obtained using phase conjugation.

The experimental validation of this high-order and myopic version of COFFEE is ongoing, and aims at demonstrating the ability of COFFEE to estimate both low and high order aberrations, and to compensate for them. Several perspectives are currently considered for this work. With an adaptation of the coronagraphic imaging model, COFFEE can be extended to work on ground-based, long exposure images with residual turbulence induced aberrations. Another perspective lies in optimization of the computation time required for the aberration estimation, possibly following I. Mocœur *et al.* [25]. These two improvements will allow COFFEE to work on-line, in closed loop during the scientific exposure. A further perspective is to extend COFFEE to the estimation of amplitude aberrations, mandatory to reach the very high levels of contrast required for exo-earth imaging, in order to create a dark hole area on the detector using the method presented in this paper.

## A. Gradients expression

The numerical minimization of criterion *J* (Eq. (3)) requires the analytic expression of gradients
$\frac{\partial J}{\partial {\varphi}_{u}}$,
$\frac{\partial J}{\partial {\varphi}_{d}}$,
$\frac{\partial J}{\partial \alpha}$ and
$\frac{\partial J}{\partial \beta}$ to estimate the aberrations upstream *ϕ _{u}* and downstream

*ϕ*of the coronagraph, as well as the incoming flux

_{d}*α*and the residual background

*β*. Let us rewrite here the expression of criterion

*J*:

*J*

^{foc}, and then deduce the gradients’ expressions of

*J*

^{div}using a trivial substitution. The notations used here are the ones introduced in Section 2:

*ℛ*(

*ϕ*) (

_{k}*k*is for

*u*(upstream) or

*d*(downstream)) is given by Eq. (6). Its gradient $\frac{\partial \mathcal{R}}{\partial {\varphi}_{k}}$ can be written as: where Δ represent the Laplacian operator.

## Acknowledgments

The authors would like to thank several key players of the SPHERE instrument, namely Thierry Fusco, David Mouillet, Jean-Luc Beuzit and Marc Ferrari for simulating discussions and support, and the Région Provence-Alpes-Côte d’Azur for partial financial support of B. Paul’s scholarship. This work was partly funded by the European Commission under FP7 Grant Agreement No. 312430 Optical Infrared Coordination Network for Astronomy.

## References and links

**1. **J.-L. Beuzit, M. Feldt, K. Dohlen, D. Mouillet, P. Puget, J. Antici, P. Baudoz, A. Boccaletti, M. Carbillet, J. Charton, R. Claudi, T. Fusco, R. Gratton, T. Henning, N. Hubin, F. Joos, M. Kasper, M. Langlois, C. Moutou, J. Pragt, P. Rabou, M. Saisse, H. M. Schmid, M. Turatto, S. Udry, F. Vakili, R. Waters, and F. Wildi, “SPHERE: A Planet Finder Instrument for the VLT,” in “*Proceedings of the conference In the Spirit of Bernard Lyot: The Direct Detection of Planets and Circumstellar Disks in the 21st Century*.”,, P. Kalas, ed. (University of California, Berkeley, CA, USA, 2007).

**2. **B. A. Macintosh, J. R. Graham, D. W. Palmer, R. Doyon, J. Dunn, D. T. Gavel, J. Larkin, B. Oppenheimer, L. Saddlemyer, A. Sivaramakrishnan, J. K. Wallace, B. Bauman, D. A. Erickson, C. Marois, L. A. Poyneer, and R. Soummer, “the gemini planet imager: from sience to design to construction,” in “Adaptive Optics Systems,”, vol. 7015 (Proc. Soc. Photo-Opt. Instrum. Eng., 2008), vol. 7015. [CrossRef]

**3. **O. Guyon, F. Martinache, V. Garrel, F. Vogt, K. Yokochi, and T. Yoshikawa, “The subaru coronagraphic extreme ao (SCExAO) system: wavefront control and detection of exoplanets with coherent light modulation in the focal plane,” in “Adaptive Optics Systems II,”, vol. 7736 (Proc. Soc. Photo-Opt. Instrum. Eng., 2010), vol. 7736. [CrossRef]

**4. **S. Hinkley, B. R. Oppenheimer, N. Zimmerman, D. Brenner, I. R. Parry, J. R. Crepp, G. Vasisht, E. Ligon, D. King, R. Soummer, A. Sivaramakrishnan, C. Beichman, M. Shao, L. C. Roberts Jr., A. Bouchez, R. Dekany, L. Pueyo, J. E. Roberts, T. Lockhart, C. Zhai, C. Shelton, and R. Burruss, “A new high contrast imaging program at palomar observatory,” Pub. Astron. Soc. Pacific **123**(2011). [CrossRef]

**5. **R. Soummer, A. Ferrari, C. Aime, and L. Jolissaint, “Speckle noise and dynamic range in coronagraphic images,” Astrophys. J. **669**(2007). [CrossRef]

**6. **J.-F. Sauvage, T. Fusco, C. Petit, L. M. Mugnier, B. Paul, and A. Costille, “Focal-plane wave front sensing strategies for high-contrast imaging. experimantal validations on SPHERE,” in “Adaptive Optics Systems III,”, vol. 8447 (Proc. Soc. Photo-Opt. Instrum. Eng., 2012), vol. 8447. [CrossRef]

**7. **J. K. Wallace, R. S. Burruss, R. D. Bartos, T. Q. Trinh, L. A. Pueyo, S. F. Fregoso, J. R. Angione, and J. C. Shelton, “the gemini planet imager calibration wavefront sensor instrument,” in “Adaptive Optics Systems II,”, vol. 7736 (Proc. Soc. Photo-Opt. Instrum. Eng., 2010), vol. 7736. [CrossRef]

**8. **P. J. Bordé and W. A. Traub, “High constrast imaging from space : speckle-nulling in a low-aberration regime,” Astrophys. J. **638**(2006). [CrossRef]

**9. **A. Give’on, R. Belikov, S. Shaklan, and J. Kasdin, “Closed loop, DM diversity based, wave-front correction algorithm for high contrast imaging systems,” Opt. Express **15**(2007).

**10. **J. Trauger, A. Give’on, B. Gordon, B. Kern, A. Kuhnert, D. Moody, A. Niesser, F. Shi, D. Wilson, and C. Burrows, “Laboratory demonstration of high-contrast imaging for space coronagraphy,” in “Tecniques and Instrumentation for Detection of Exoplanets III,”, vol. 6693 (Proc. Soc. Photo-Opt. Instrum. Eng., 2010), vol. 6693.

**11. **S. J. Thomas, A. A. Give’On, D. Dillon, B. Macintosh, D. Gavel, and R. Soummer, “Laboratory test of aplication of electric field conjugation image-sharpening to ground-based adaptive optics,” in “Adaptive Optics Systems II,”, vol. 7736 (Proc. Soc. Photo-Opt. Instrum. Eng., 2010), vol. 7736. [CrossRef]

**12. **P. Baudoz, J. Mazoyer, M. Mas, R. Galicher, and G. Rousset, “Dark hole and planet detection: laboratory results using the self-coherent camera,” in “Ground-based and Airborn Intrusmentation for Astronomy IV,”, vol. 8446 (Proc. Soc. Photo-Opt. Instrum. Eng., 2012), vol. 8446. [CrossRef]

**13. **P. Baudoz, A. Boccaletti, J. Baudrand, and D. Rouan, “The self-coherent camera : a new tool for exoplanet detection,” in “Proc. IAU Colloquium,” (2006).

**14. **J.-F. Sauvage, L. M. Mugnier, B. Paul, and R. Villecroze, “Coronagraphic phase diversity: a simple focal-plane wavefront sensor,” Opt. Lett. **37**(2012). [CrossRef]

**15. **B. Paul, J.-F. Sauvage, and L. M. Mugnier, “Coronagraphic phase diversity: performance study and laboratory demonstration,” Astron. Astrophys. **552**(2013). [CrossRef]

**16. **W. H. Press, S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, *Numerical Recipes : the Art of Scientific Computing* (Cambridge University, 2007).

**17. **E. Thiébaut, “Optimization issues in blind deconvolution algorithms,” in “Astronomical Data Analysis II,”, vol. 4847 (Proc. Soc. Photo-Opt. Instrum. Eng., 2002), vol. 4847, pp. 174–183. [CrossRef]

**18. **K. Dohlen, F. Wildi, J. Beuzit, P. Puget, D. Mouillet, A. Baruffolo, A. Boccaletti, J. Charton, R. Claudi, A. Costille, P. Feautrier, M. Feldt, T. Fusco, R. Gratton, M. Kasper, M. Langlois, D. L. Mignant, J. Lizon, N. Hubin, A. Pavlov, C. Petit, J. Pragt, P. Rabou, S. Rochat, R. Roelfsema, J. Sauvage, and H. Schmid, “Sphere system analysis predictions,” (AO4ELT 2, 2011).

**19. **J.-F. Sauvage, L. Mugnier, T. Fusco, and G. Rousset, “Post processing of differential images for direct extrasolar planet detection from the ground,” in “Advances in Adaptive Optics II,”, vol. 6272, L. Ellerbroek, B. Bonaccini Calia, and D. Bonaccini Calia, eds. (Proc. Soc. Photo-Opt. Instrum. Eng., 2006), vol. 6272. [CrossRef]

**20. **S. Bongard, F. Soulez, E. Thiébaut, and E. Pecontal, “3D deconvolution of hyper-spectral astronomical data,” Mon. Not. R. Astr. Soc. **418**(2011). [CrossRef]

**21. **R. Soummer, L. Pueyo, A. Sivaramakrishnan, and R. J. Vanderbei, “Fast computation of lyot-style coronagraph propagation,” Opt. Express **15**(2007). [CrossRef] [PubMed]

**22. **L. M. Mugnier, A. Blanc, and J. Idier, “Phase diversity: a technique for wave-front sensing and for diffraction-limited imaging,” in “*Advances in Imaging and Electron Physics*,”, vol. 141, P. Hawkes, ed. (Elsevier, 2006), chap. 1, pp. 1–76. [CrossRef]

**23. **D. J. Lee, M. C. Roggemann, B. M. Welsh, and E. R. Crosby, “Evaluation of least-squares phase-diversity technique for space telescope wave-front sensing,” Astrophys. J. **36**(1997).

**24. **A. Blanc, T. Fusco, M. Hartung, L. M. Mugnier, and G. Rousset, “Calibration of NAOS and CONICA static aberrations. Application of the phase diversity technique,” Astron. Astrophys. **399**, 373–383 (2003). [CrossRef]

**25. **I. Mocœur, L. M. Mugnier, and F. Cassaing, “Analytical solution to the phase-diversity problem for real-time wavefront sensing,” Opt. Lett. **34**, 3487–3489 (2009). [CrossRef]