<figure><img src="image_1.png" /></figure>

HAL
open science

# Spatial linear dark field control on Subaru/SCExAO

Frantz Martinache, K. Miller, S. Bos, J. Lozi, O. Guyon, D. Doelman, S. Vievard, A. Sahoo, V. Deo, N. Jovanovic, et al.

► To cite this version:

Frantz Martinache, K. Miller, S. Bos, J. Lozi, O. Guyon, et al. Spatial linear dark field control on Subaru/SCExAO. Astronomy and Astrophysics - A&A, 2021, 646, pp.A145. 10.1051/0004-6361/202039583. hal-03518285

HAL Id: hal-03518285

https://hal.science/hal-03518285

Submitted on 10 Jan 2022

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Spatial linear dark field control on Subaru/SCExAO

## Maintaining high contrast with a vAPP coronagraph*

K. L. Miller<fnref n="1" />,**, S. P. Bos<fnref n="1" />,**, J. Lozi<fnref n="2" />, O. Guyon<fnref n="2" />,<fnref n="3" />,<fnref n="4" />,<fnref n="5" />, D. S. Doelman<fnref n="1" />, S. Vievard<fnref n="2" />, A. Sahoo<fnref n="2" />, V. Deo<fnref n="2" />, N. Jovanovic<fnref n="6" />, F. Martinache<fnref n="7" />, F. Snik<fnref n="1" />, and T. Currie<fnref n="2" />,<fnref n="8" />

Received 2 October 2020 / Accepted 18 December 2020

## ABSTRACT

**Context.** One of the key challenges facing direct exoplanet imaging is the continuous maintenance of the region of high contrast within which light from the exoplanet can be detected above the stellar noise. In high-contrast imaging systems, the dominant source of aberrations is the residual wavefront error that arises due to non-common path aberrations (NCPA) to which the primary adaptive optics (AO) system is inherently blind. Slow variations in the NCPA generate quasi-static speckles in the post-AO corrected coronagraphic image resulting in the degradation of the high-contrast dark hole created by the coronagraph.

**Aims.** In this paper, we demonstrate spatial linear dark field control (LDFC) with an asymmetric pupil vector apodizing phase plate (APvAPP) coronagraph as a method to sense time-varying NCPA using the science image as a secondary wavefront sensor (WFS) running behind the primary AO system. By using the science image as a WFS, the NCPA to which the primary AO system is blind can be measured with high sensitivity and corrected, thereby suppressing the quasi-static speckles which corrupt the high contrast within the dark hole.

**Methods.** On the Subaru Coronagraphic Extreme Adaptive Optics instrument (SCExAO), one of the coronagraphic modes is an APvAPP which generates two PSFs, each with a 180° D-shaped dark hole with approximately $10^{-4}$ contrast at $\lambda = 1550$ nm. The APvAPP was utilized to first remove the instrumental NCPA in the system and increase the high contrast within the dark holes. Spatial LDFC was then operated in closed-loop to maintain this high contrast in the presence of a temporally-correlated, evolving phase aberration with a root-mean-square wavefront error of 80 nm. In the tests shown here, an internal laser source was used, and the deformable mirror was used both to introduce random phase aberrations into the system and to then correct them with LDFC in closed-loop operation.

**Results.** The results presented here demonstrate the ability of the APvAPP combined with spatial LDFC to sense aberrations in the high amplitude regime (~80 nm). With LDFC operating in closed-loop, the dark hole is returned to its initial contrast and then maintained in the presence of a temporally-evolving phase aberration. We calculated the contrast in $1\lambda/D$ spatial frequency bins in both open-loop and closed-loop operation, and compared the measured contrast in these two cases. This comparison shows that with LDFC operating in closed-loop, there is a factor of ~3x improvement (approximately a half magnitude) in contrast across the full dark hole extent from 2–10 $\lambda/D$. This improvement is maintained over the full duration (10 000 iterations) of the injected temporally-correlated, evolving phase aberration.

**Conclusions.** This work marks the first deployment of spatial LDFC on an active high-contrast imaging instrument. Our SCExAO testbed results show that the combination of the APvAPP with LDFC provides a powerful new focal plane wavefront sensing technique by which high-contrast imaging systems can maintain high contrast during long observations. This conclusion is further supported by a noise analysis of LDFC's performance with the APvAPP in simulation.

**Key words.** instrumentation: adaptive optics – instrumentation: high angular resolution

## 1. Introduction

Since the discovery of the first exoplanet over two decades ago, the field of exoplanet detection has expanded quickly. Today, one of the major goals of modern astronomy is not just the detection of, but also the direct imaging and characterization of an

Earth-like exoplanet. This feat is not simple. When observed from a distance of 10 pc in the visible spectrum (0.3–1 μm), an Earth and Sun system analog would have an angular separation of ~100 mas and a difference in contrast of ~$10^{-10}$ (Traub & Oppenheimer 2010). When combined, these factors present many technical instrumentation challenges. However, with today’s large ground-based observatories and advances in coronagraphy and extreme adaptive optics (ExAO) systems, we can begin to address these issues.

<footnote n="1">¹ Leiden Observatory, Leiden University, Niels Bohrweg 2, 2333 CA Leiden, The Netherlands
e-mail: kmiller@strw.leidenuniv.nl, stevenbos@strw.leidenuniv.nl</footnote>

<footnote n="2">² National Astronomical Observatory of Japan, Subaru Telescope, National Institute of Natural Sciences, Hilo, HI 96720, USA</footnote>

<footnote n="3">³ Steward Observatory, University of Arizona, 933 N. Cherry Ave, Tucson, AZ 85721, USA</footnote>

<footnote n="4">⁴ College of Optical Sciences, University of Arizona, 1630 E. University Blvd., Tucson, AZ 85721, USA</footnote>

<footnote n="5">⁵ Astrobiology Center, National Institutes of Natural Sciences, 2-21-1 Osawa, Mitaka, Tokyo, Japan</footnote>

<footnote n="6">⁶ Department of Astronomy, California Institute of Technology, 1200 E. California Blvd., Pasadena, CA 91125, USA</footnote>

<footnote n="7">⁷ Observatoire de la Cote d'Azur, Boulevard de l'Observatoire, Nice 06304, France</footnote>

<footnote n="8">⁸ NASA-Ames Research Center, Moffett Blvd., Moffett Field, CA 94035, USA</footnote>

<footnote>* Based on data collected at Subaru Telescope, which is operated by the National Astronomical Observatory of Japan.</footnote>

<footnote>** K. L. Miller and S. P. Bos have contributed equally to this work.</footnote>
To overcome the massive contrast between a star and planet and allow for light from the planet to be visible, stellar light must be suppressed by many orders of magnitude. To achieve and maintain this precision stellar suppression, ground-based high-contrast imaging (HCI) systems must also continuously correct wavefront distortions due to the Earth's atmosphere. Modern HCI instruments, such as VLT/SPHERE (Beuzit et al. 2019), *Magellan Clay/MagAO-X* (Males et al. 2018; Close et al. 2018), Gemini/GPI (Macintosh et al. 2014), and Subaru/SCExAO (Jovanovic et al. 2015), deploy advanced coronagraphs to suppress star light and also host ExAO systems consisting of wavefront sensors (WFSs) and deformable mirrors (DMs) with high actuator counts to measure and correct wavefront errors. Even after these systems, the dominant noise source for most HCI observations comes from uncorrected wavefront aberrations which generate a quasi-static speckle background in the science image.

Wavefront errors that are non-common path to the main WFS are among the primary limitations that prevent the current generation of HCI instruments from achieving higher contrast at smaller separations. Non-common path aberrations (NCPA) originate from instrumental aberrations downstream of the main WFS, and are therefore unsensed and left uncorrected. These NCPA, and therefore the quasi-static speckles generated in the science image, slowly evolve during observations as a function of instrumental changes in temperature, humidity and the gravitational vector (Martinez et al. 2012, 2013). These speckles limit the contrast achieved by the HCI instrument and consequently reduce the ability to detect and characterize exoplanets (Racine et al. 1999). It has been shown that the contrast can be improved in post-processing by exploiting diversity in the data to calibrate and subtract the speckle background. There are several forms of diversity which can be utilized by choosing an appropriate observing technique, some of which also provide characterization diagnostics. These include angular differential imaging (ADI; Marois et al. 2006), reference star differential imaging (RDI; Ruane et al. 2019), spectral differential imaging (SDI; Sparks & Ford 2002), and polarimetric differential imaging (PDI; Kuhn et al. 2001). These techniques have enabled the current state-of-the-art HCI system performance on SPHERE, which can obtain a contrast of ~$10^{-6}$ at 200 mas in the near-infrared (NIR; Vigan et al. 2015). While these post-processing techniques are effective at improving the contrast in the final science images, they are still limited by raw contrast through photon noise and coherent amplification of speckles. Both RDI and ADI rely on the long-term stability of the PSF, but are limited by the quasi-static nature of NCPA to remove the resulting speckles in post-processing. PDI relies on the polarized signature of the target, which is usually a small fraction of the total light. And SDI does not have much leverage at small angular separations. For these reasons, in order to detect and characterize companions at small angular separations, it is necessary to actively sense and suppress these aberrations in real time during observations. The ideal solution is therefore a focal-plane wavefront sensor (FPWFS) which uses the science image as a secondary WFS to measure the NCPA.

FPWFS is fully common-path and is capable of sensing the quasi-static speckles to which the primary WFS is blind. This also eliminates potential chromatic wavefront errors that could occur between the main WFS and the science focal plane. Using the science image as its own WFS provides many other benefits as well. Unlike other WFS such as the modulated pyramid (PyWFS), the curvature (CWFS) and the Shack-Hartmann (SHWFS), FPWFSs do not suffer from low sensitivity to

low-order modes due to photon noise. FPWFSs maintain constant sensitivity across all separations, allowing for the correction of low and high-spatial frequencies with equal efficiency (Guyon 2005). FPWFSing methods which do not require probing can also operate simultaneously with science observations, resulting in a science duty cycle close to 100%. This means that valuable exposure time can be fully devoted to science measurements.

Many different FPWFS solutions have been developed, each with their own specific requirements and performance limitations (Jovanovic et al. 2018). Many of these techniques provide full phase solutions which require wavefront estimation. To perform this estimation, many solutions require some version of modulation, which can interrupt the science observations. Techniques requiring DM modulation, which includes speckle nulling, COFFEE, and pair-wise probing (Bordé & Traub 2006; Paul et al. 2013; Groff et al. 2015; Give'on et al. 2007), pollute the dark hole during estimation and cannot be combined with simultaneous science observations. Other methods can only operate with specific coronagraph designs. This includes the asymmetric pupil Fourier wavefront sensor, the Zernike phase-mask sensor, the quadrant analysis of coronagraphic images for tip-tilt sensing (QACITS), and Fast & Furious (Martinache 2013; N'Diaye et al. 2013; Huby et al. 2015; Bos et al. 2020). Other techniques rely on specific modifications to the optical system, such as the holographic modal wavefront sensor (hMWFS; Wilby et al. 2017), which requires an optic that generates holographic wavefront sensing PSFs, and the self-coherent camera (SCC; Baudoz et al. 2005) which utilizes a pinhole. Some of these methods, including SCC, the hMWFS, QACITS, as well as phase sorting interferometry (PSI), and the Frazin algorithm utilizing short exposure images, operate with a 100% science duty cycle (Baudoz et al. 2005; Codona et al. 2008; Wilby et al. 2016; Frazin 2013). The methods described above either require temporal modulation that lowers the science duty cycle, or have additional hardware requirements that complicate their implementation. A robust FPWFS would require no hardware beyond the AO system's DM and science camera and be compatible with multiple coronagraph architectures. Ideally, it would also not require modulation that can interrupt science observations. To this end, low-order wavefront sensing (LOWFS; Singh et al. 2015) was developed, which re-images the starlight rejected by the coronagraph to estimate and control low-order aberrations. Unlike previously mentioned techniques, LOWFS does not directly estimate the wavefront and instead drives the wavefront back to a reference state. LOWFS operates with light split off from the science optical path and thus does not interrupt the science observations. As its name suggests, LOWFS is only used for the measurement of low-order aberrations and cannot be used for sensing higher spatial frequencies. The FPWFS method we demonstrate here, spatial linear dark field control (LDFC; Miller et al. 2017, 2018, 2019; Miller 2018), is an expansion of the LOWFS technique that can control higher-order aberrations, operate in the science focal plane without interrupting science observations, and is compatible with multiple coronagraph designs.

Spatial LDFC utilizes a region of the unsuppressed speckle field opposite the dark hole to measure variations in intensity induced by small phase aberrations in the pupil. This region spans the same spatial frequency extent as the dark hole itself and is referred to as the bright field. Spatial LDFC is not coronagraph-dependent; it requires only a one-sided dark hole with an unsuppressed bright field on the opposite side of the PSF. The dark hole can be derived by various methods such as
pair-wise probing (electric field conjugation) or with a coronagraph. In this work we implemented LDFC with the vector-Apodizing Phase plate (vAPP; Snik et al. 2012; Otten et al. 2017), a pupil-plane coronagraph that manipulates the phase to dig one-sided dark holes in the point-spread function (PSF), leaving the other side of the PSF unocculted. This makes the vAPP excellently suited for the implementation of LDFC. As a pupil-plane coronagraph, the vAPP is placed in a relayed pupil plane conjugate to the optical system's entrance pupil just as a Lyot stop is placed in a more traditional Lyot coronagraph. The vAPP optic is a half-wave liquid crystal layer with varying fast-axis orientation that induces the same but opposite phase on opposite circular polarization states through the achromatic geometric phase (Pancharatnam 1956; Berry 1987). As the two circular polarization states receive the opposite phase, it results in two PSFs with dark holes on opposite sides. The most common implementation integrates a polarization-sensitive grating (Oh & Escuti 2008; Otten et al. 2014) in the design to spatially separate the PSFs. Due to manufacturing errors, an extra, on-axis, non-coronagraphic PSF is generally generated, we refer to this as the leakage PSF. Recently, we have developed vAPPs that integrate FPWFS by including the Asymmetric pupil Fourier wavefront sensor (Martinache 2013; Martinache et al. 2016) in the design (Bos et al. 2019). It is this model of vAPP, referred to as an Asymmetric Pupil vAPP (APvAPP), that is implemented at SCExAO. In Sect. 2 we provide a review of the theory behind LDFC and FPWFS with the APvAPP, that improves this technique's sensitivity. In Sect. 3 we layout the parameters of our tests of LDFC with the APvAPP installed at SCExAO. We present the results of LDFC's operation using the internal source and implementing quasi-static aberrations by applying an evolving phase screen on the DM. We conclude with a discussion of the results in Sect. 5.

## 2. Combining spatial LDFC with an APvAPP

### 2.1. Spatial LDFC

As previously mentioned, spatial LDFC is a successor to the LOWFS technique which was designed to maintain high Strehl by sensing and correcting low-order aberrations, which predominantly affect the PSF core. LDFC operates along similar principles as the LOWFS but extends the operational spatial frequency domain out to high spatial frequencies where coronagraphs such as the APvAPP generate a region of high contrast in which light from an exoplanet could be detected. The goal of LDFC is to monitor intensity variations within this spatial frequency regime to sense and correct higher-order aberrations, which degrade the contrast within the dark hole. Spatial LDFC maintains the contrast within the dark hole by monitoring the intensity of the bright field across the same spatial frequencies, which the dark hole spans. The variables used in this section are summarized in Table 1.

For small phase aberrations, the response of the bright field in intensity is linearly related to the electric field of the pupil-plane aberration (Miller et al. 2017). To demonstrate this, we begin with the equation of a pupil-plane electric field $E_{pup}$:

$$E_{pup} = Ae^{i\theta}, \qquad (1)$$

with A the pupil-plane amplitude and $\theta$ the pupil-plane phase. In the small phase aberration regime, we can assume that $\theta \ll 1$. The pupil plane electric field can therefore be reduced to a first order approximation

$$E_{pup} \approx A(1 + i\theta). \qquad (2)$$

<table><caption>**Table 1.** Variables presented in Sect. 2.</caption><thead><tr><th>Variable</th><th>Description</th></tr></thead><tbody><tr><td>E<sub>pup</sub></td><td>Pupil-plane electric field.</td></tr><tr><td>A</td><td>Pupil-plane amplitude.</td></tr><tr><td>θ</td><td>Pupil-plane phase.</td></tr><tr><td>E<sub> foc</sub></td><td>Focal-plane electric field.</td></tr><tr><td>C{·}</td><td>Fraunhofer propagation operator.</td></tr><tr><td>E<sub>0</sub></td><td>Nominal coronagraph focal-plane electric field.</td></tr><tr><td>E<sub>ab</sub></td><td>Aberrated focal-plane electric field.</td></tr><tr><td>I<sub>BF</sub></td><td>Bright field intensity.</td></tr><tr><td>I<sub>0</sub></td><td>Nominal focal-plane intensity.</td></tr><tr><td>ΔI</td><td>LDFC intensity signal.</td></tr><tr><td>a</td><td>Nominal, real focal-plane electric field.</td></tr><tr><td>b</td><td>Nominal, imaginary focal-plane electric field.</td></tr><tr><td>c</td><td>Aberrated, real focal-plane electric field.</td></tr><tr><td>d</td><td>Aberrated, imaginary focal-plane electric field.</td></tr><tr><td>R<sub>Had</sub></td><td>Hadammard focal plane response matrix.</td></tr><tr><td>R<sub>eigen</sub></td><td>Eigenmode focal plane response matrix.</td></tr><tr><td>G<sub>eigen</sub></td><td>Eigenmode control matrix.</td></tr><tr><td>S<sub>γ</sub></td><td>Tikhonov regularization factor.</td></tr></tbody></table>

The focal plane electric field response is then the Fraunhofer propagation of this pupil-plane electric field, with the propagation operator written as $C{\cdot} \propto \frac{1}{i}\mathcal{F}{\cdot}$ (Goodman 2005). The resulting focal-plane electric field ($E_{foc}$) can then be written as

$$E_{foc} = C\{E_{pup}\}, \qquad (3)$$

$$= C\{A\} + C\{Ai\theta\}, \qquad (4)$$

where $C\{A\}$ is the nominal electric field ($E_0$) generated across from the dark hole by the APvAPP coronagraph, and $C\{Ai\theta\}$ is the electric field of some small phase aberration ($E_{ab}$). This equation for the focal-plane electric field can therefore be rewritten as:

$$E_{foc} = E_0 + E_{ab}. \qquad (5)$$

The resulting focal-plane intensity is then the modulus squared of the focal-plane electric field:

$$I_{foc} = |E_{foc}|^2, \qquad (6)$$

$$= |E_0|^2 + |E_{ab}|^2 + 2\Re\{E_0 E_{ab}^*\}. \qquad (7)$$

In the bright field, we can assume that $|E_0|^2 \gg |E_{ab}|^2$. The intensity specifically within the bright field can therefore be simplified to

$$I_{BF} = |E_0|^2 + 2\Re\{E_0 E_{ab}^*\}, \qquad (8)$$

where $|E_0|^2$ can be rewritten as $I_0$, which is the reference image derived under ideal conditions. The change in intensity in the bright field $\Delta I$ due to an aberration can then be simplified to

$$\Delta I = I_{BF} - I_0 \qquad (9)$$

$$= 2\Re\{E_0 E_{ab}^*\}. \qquad (10)$$

This $\Delta I$ is the signal used by spatial LDFC, and its linear dependence on the electric field of the pupil-plane aberration therefore makes spatial LDFC a linear algorithm. An example of the bright field intensity response as well as the dark hole intensity response to the same pupil plane aberration is shown in Fig. 1.
<figure><img src="image_3.png" /><figcaption>**Fig. 1.** Response of both a pixel in the dark hole and a pixel in the bright field to the same low-amplitude perturbation introduced in the pupil plane. It is important to take note of the expected quadratic response within the dark hole and the monotonic response of the bright field to the same perturbation. This monotonic bright field response allows for the construction of a closed-loop control system around the bright field.</figcaption></figure>

For maintaining dark hole contrast, spatial LDFC presents several benefits over other methods such as pair-wise probing and speckle nulling (Groff et al. 2015; Bordé & Traub 2006). This technique does not require DM modulation or field probing as it does not rely on any form of phase estimation. Spatial LDFC relies only on single science images to measure $\Delta I$ and calculate the pupil-plane aberration electric field. For these reasons, spatial LDFC therefore can run with nearly 100% duty cycle and does not interrupt science observations. This algorithm is able to run fast enough to address not just quasi-static NCPA, but also faster-moving atmospheric turbulence residuals. However, when running with the science image at focus, spatial LDFC can suffer from sign ambiguity for even modes. In the next subsection we describe how the sign ambiguity is overcome.

<table><caption>**Table 2.** Parameters of the SCExAO LDFC implementation presented in Sect. 3.</caption><thead><tr><td>Variable</td><td>Description</td></tr></thead><tbody><tr><td>Central wavelength</td><td>1550 nm</td></tr><tr><td>Filter width</td><td>25 nm</td></tr><tr><td>Poke amplitude</td><td>40 nm</td></tr><tr><td>Normalized brightness threshold</td><td>≥10<sup>-4</sup></td></tr><tr><td>Control loop gain</td><td>0.1</td></tr><tr><td>Normalized regularization value</td><td>6 × 10<sup>-2</sup></td></tr><tr><td>Modal gain step</td><td>Mode 150</td></tr><tr><td>Modal gain above step</td><td>1</td></tr><tr><td>Modal gain below step</td><td>0.1</td></tr></tbody></table>

## 2.2. FPWFS with the APvAPP

In Eq. (10) we derived the signal that LDFC uses to estimate the pupil-plane aberration. However, we have to consider that both $E_0$ and $E_{ab}$ are complex quantities, and in order to extract the complete signal from $E_{ab}$, we have to set requirements on $E_0$. This is also extensively covered in Bos et al. (2019), and therefore we give only a short overview here.

We start by expanding the electric fields to their real and imaginary components:

$$E_0 = a + ib, \qquad (11)$$

$$E_{ab} = c + id. \qquad (12)$$

Using these expansions, we can rewrite Eq. (10) as:

$$\Delta I = 2(ac + bd), \qquad (13)$$

which shows, in order to generate a measurable signal for $c$ and $d$, that $a$ and $b$ have to be nonzero. When phase-only aberrations are assumed, as shown in Bos et al. (2019), we understand that $c$ is generated by even aberrations, while $d$ is generated by odd aberrations. For $E_0$, which is controlled by the coronagraph design, we find that $a$ can be generated by a pupil-plane amplitude asymmetry or even pupil-plane phase (e.g., defocus for phase diversity), and $b$ is generated by even pupil-plane amplitude and odd pupil-plane phase. Regular PSFs and vAPPs generally have $a = 0$ due to the geometry of the pupil-plane

amplitude (Bos et al. 2019), making them insensitive to even pupil-plane phase aberrations (i.e., the sign ambiguity for even phase modes). However, APvAPPs are designed with a pupil-plane amplitude asymmetry, which gives them a nonzero $a$ and therefore sensitivity to even modes. A nonzero $a$ could also be realized by adding a defocus term to the system, but this cannot be combined with simultaneous coronagraphic observations.

## 3. Deploying LDFC on SCExAO

We deployed LDFC on Subaru Telescope's Subaru Coronagraphic Extreme Adaptive Optics instrument (SCExAO; Jovanovic et al. 2015), which marks the algorithm's first deployment on an active high-contrast imaging instrument. In this section, we discuss the parameters of our tests at the SCExAO, and the full process of deploying LDFC on this system. We describe SCExAO and the basics of our set up in Sect. 3.1, and the methods by which we derive a good reference PSF in Sect. 3.2. Bright pixel selection and the process by which the modal basis set and control matrix are derived are explained in Sects. 3.3 and 3.4. In Sect. 3.5, we describe how quasi-static speckles are introduced into the science image and how LDFC is deployed in closed-loop. An overview of the parameters used in the SCExAO LDFC implementation is shown in Table 2.
<figure><img src="image_4.png" /><figcaption>Pupil-plane Phase</figcaption></figure>

<figure><img src="image_5.png" /><figcaption>**Fig. 2.** SCExAO APvAPP amplitude and phase design. The design includes a natural pupil amplitude asymmetry to block a dead actuator. This enables FPWFS with the APvAPP.</figcaption></figure>

### 3.1. Instrument parameters

SCExAO is located downstream of the AO188 instrument (Minowa et al. 2010) at the Nasmyth platform of the Subaru telescope. SCExAO hosts a Boston Micromachines (BMC) 2K DM with 45 actuators across the pupil diameter, corresponding to a 22.5 λ/D control radius in the focal plane. The system's primary wavefront sensor is a Pyramid wavefront sensor (Lozi et al. 2019) which operates in the 600–900 nm wavelength range. The instrument is run by the Compute and Control for Adaptive Optics (CACAO; Guyon et al. 2018) package which handles the real-time wavefront control. The instrument hosts multiple coronagraphs architectures, one of which is an APvAPP, used in this demonstration (Doelman et al. 2017). The SCExAO APvAPP was designed for a raw contrast of $10^{-5}$ between 2 and 11 λ/D. Additionally, two phase diversity holograms were also added for wavefront sensing purposes, which can be seen in the center panel of Fig. 1. The amplitude and phase design of the APvAPP are shown in Fig. 2, which shows that a natural amplitude asymmetry occurs because a dead actuator has to be blocked. The APvAPP was designed for the JHK bands in which the integral-field spectrograph, CHARIS, (Groff et al. 2014) downstream of SCExAO operates. The internal NIR camera, a C-RED 2, (Feautrier et al. 2017) was used as the FPWFS detector with a narrowband filter ($\Delta\lambda = 25$ nm) centered around 1550 nm. Each image was 192 × 192 pixels in size and was acquired with a frame rate of 1.5 kHz. The LDFC algorithm was implemented on SCExAO in Python and utilized functions within the HCIPy package (Por et al. 2018).

### 3.2. Deriving the reference PSF

LDFC does not provide an absolute phase measurement; instead, it measures intensity variations relative to an initial reference image. LDFC does not generate the dark hole; the purpose of this algorithm is to maintain the dark hole contrast achieved in the reference image. The contrast within the reference image dark hole is considered to be the ideal case. With LDFC running in closed-loop, the goal is to drive the measured contrast within the dark hole in the presence of aberrations back to the contrast measured in the dark hole of the reference image, thereby gaining back the contrast in the reference image. The deepest contrast recoverable by LDFC is therefore set by the contrast achieved in the reference image. For this reason, it is imperative to derive a reference image with minimal aberrations, thereby providing LDFC with the deepest possible contrast to maintain. We derive

<figure><img src="image_6.png" /></figure>

<figure><img src="image_7.png" /><figcaption>**Fig. 3.** (a) DM shape derived by the nonlinear WFS algorithm with the APvAPP to remove static, low-order instrumental NCPA, and (b) resulting corrected focal plane image used as the reference for spatial LDFC. The colorbar shows normalized intensity.</figcaption></figure>

this reference PSF by performing an initial wavefront calibration with the method presented in Bos et al. (2019). This method utilizes a nonlinear, model-based algorithm that derives an absolute wavefront measurement using a modal basis set consisting of the 30 lowest disk harmonics. We run this method for 5 iterations in closed loop with a loop gain of 0.5 before the LDFC calibration is performed. In five iterations, the raw contrast in the 2–3 λ/D spatial frequency bin is improved by a factor ~2 from $6 \times 10^{-4}$ to $3 \times 10^{-4}$. This algorithm derives the stable reference used by LDFC, as shown in Fig. 3, where the DM command for this reference is also shown with a root-mean-square (rms) wavefront error (WFE) of 78 nm.

### 3.3. Bright pixel selection

The linear response of the bright field is critical to building a closed-loop control system, and for this reason, only the bright field pixels are selected from the image for use as the WFS. With the SCExAO APvAPP coronagraph, two coronagraphic PSFs are generated as well as a non-coronagraphic leakage term whose peak intensity is roughly 6% of the maximum intensity of the coronagraphic PSFs and two phase diversity PSFs with peak intensities of $\le 1\%$ of the coronagraphic PSFs. The bright field of both coronagraphic PSFs are used as the WFS as well as the leakage term and phase diversity PSFs. To increase the signal-to-noise ratio (S/N) of the signal at higher spatial frequencies, the exposure time is increased; however this leads to saturation at the PSF core for the coronagraphic PSFs. The saturated pixels within the cores are then removed from the field selected for the WFS, which results in a loss of sensitivity to low-order modes. By using the much dimmer, unsaturated leakage term and phase diversity PSFs, we can then regain access to the low-order modes as well. We also limit our bright field to the control radius of the DM which, for SCExAO's BMC 2K DM, is 22.5 λ/D. Outside of the saturated PSF cores and within the DM control radius, pixels with a normalized value $\ge 10^{-4}$ are selected for use in the response matrix. The full map of bright field pixels used as the LDFC WFS is shown in Fig. 4.

### 3.4. Modal basis set and control matrix

The modal basis set for LDFC is a set of modes derived independently for each system on which it is deployed. It is not a simple Zernike or Fourier mode set. Since the goal of LDFC is to precisely control a range of spatial frequencies across the full expanse of the dark hole, we derive a set of orthogonal modes based on the focal plane response to a series of Hadamard modes
<figure><img src="image_8.png" /><figcaption>Fig. 4. Bright field pixels used for the LDFC WFS. These pixels were chosen on three criteria: for being unsaturated, within the DM control radius, and for their linear response to small phase aberrations in the pupil.</figcaption></figure>

$M_{Had}$ (Kasper et al. 2004). Unlike single influence functions, Hadamard modes have a high variance-to-peak ratio. The focal plane S/N response strength goes with variance in the applied mode, not peak amplitude, and the limited linear range of LDFC limits the peak value that can be applied. For these reasons, we use Hadamard modes rather than influence functions to poke the DM and register the response in the focal plane to build the Hadamard response matrix ($R_{Had}$). For this work, a poke amplitude ($a_p$) of 40 nm was chosen. The Hadamard response matrix is then determined by:

$$ \Delta I_i = \frac{I_i^+ - I_i^-}{2a_p}, \qquad (14) $$

$$ R_{\text{Had}} = \begin{pmatrix} | & & | \\ \Delta I_1 & \dots & \Delta I_N \\ | & & | \end{pmatrix}, \qquad (15) $$

with $I_i^+$ and $I_i^-$ the flattened focal-plane intensities, selected by the bright pixel map, for the positive and negative actuations of the ith Hadamard mode, respectively, and $\Delta I_i$ the subsequent differential intensity response to the ith mode. The modal basis set for LDFC, which we refer to as eigenmodes ($M_{eigen}$), is then derived from the singular value decomposition (SVD) of $R_{Had}$ such that:

$$ R_{\text{Had}} = U_{\text{Had}} S_{\text{Had}} V_{\text{Had}}^*, \qquad (16) $$

$$ M_{\text{eigen}} = M_{\text{Had}} V_{\text{Had}}^*. \qquad (17) $$

These eigenmodes are then an orthogonal modal basis set ordered by spatial frequency (from lowest to highest frequency) from which we can then select the frequencies we wish to control. This is particularly useful when the control radius set by the number of actuators across the DM is larger than the outer working angle (OWA) of the coronagraph; in other words, when the highest spatial frequency the DM control exceeds the greatest spatial frequency spanned by the dark hole. This is the case with

the SCExAO APvAPP where the DM control radius is 22.5 $\lambda/D$, and the OWA of the APvAPP is only 11 $\lambda/D$.

With this set of eigenmodes, we then derive the response matrix $R_{eigen}$ for the LDFC control loop. The DM is poked with the eigenmodes, and the resulting focal plane images recorded in a process similar to Eqs. (14) and (15). Examples of these eigenmodes are shown in Fig. 5. The same bright pixel map is again used to select only pixels above a set intensity threshold, which sets the maximum spatial frequency that we control. This series of filtered focal images in response to the eigenmodes is then the final LDFC response matrix $R_{eigen}$. From this response matrix, the control matrix is then derived.

To build the control matrix, $G_{eigen}$, the response matrix $R_{eigen}$ is inverted via SVD with the implementation of a Tikhonov regularization scheme to suppress the noisier higher spatial frequency modes. The singular value decomposition of $R_{eigen}$ can be written as:

$$ R_{eigen} = U_{eigen} S_{eigen} V_{eigen}^*, \qquad (18) $$

with $U_{eigen}$ the WFS eigenmodes, $S_{eigen}$ a diagonal matrix with along the diagonal the singular values of the eigenmodes, and $V_{eigen}$ the DM eigenmodes. The pseudo-inverse is therefore:

$$ R_{eigen}^{\dagger} = V_{eigen} S_{\gamma} U_{eigen}^*, \qquad (19) $$

where $S_{\gamma}$ is the Tikhonov regularization term which suppresses singular value components that are small relative to the selected $\alpha$. This regularization term is written as:

$$ S_{\gamma} = \text{diag}\left\{\frac{s_i^2}{s_i^2 + \gamma s_i}\right\}, \qquad (20) $$

with $s_i$ the ith singular value, and this simply becomes the pseudo-inverse $S^\dagger$ when $\gamma = 0$. In this process, the singular values of the SVD are plotted (as shown in Fig. 6), and from these values, we select a modal cutoff point; modes beyond this cutoff are suppressed in the inversion. For this work we set $\gamma = 6 \times 10^{-2}$, which regularizes the modes above mode number 436. This value for $\gamma$ was determined empirically by observing the stability of LDFC during closed-loop tests.

As the S/N drops off further out from the PSF core, the DM shape correction derived by LDFC to cancel an aberration can be distorted by noise in the lower S/N, higher frequency modes. To overcome this issue, we implement modal gain binning. As previously mentioned, the eigenmode basis set $M_{eigen}$, is ordered from low to high spatial frequency modes. For this reason, it is simple to implement a gain vector which gives more weight to the correction generated by the higher S/N, low-order modes and less weight to the lower S/N, high-order modes. In this way, we can mitigate issues caused by erroneous, low S/N measurements derived at the higher spatial frequencies. In these tests, our modal gain vector was set to give full weighting ($g_{modal} = 1$) to the first 150 modes in our basis set, and a weighting of 0.1 to the rest of the modes. We note that this modal gain vector is not the final gain. The modal gain vector is multiplied by a total loop gain as well which, for these tests was set to be $g_{loop} = 0.1$.

### 3.5. LDFC closed-loop operation

As described in the previous subsections, the procedure for setting up and calibrating LDFC proceeds as follows: generating the reference image, selecting the bright pixels for use as the WFS, deriving the modal basis set, and finally, building the control matrix. Once this calibration was completed, the next step
<figure><img src="image_9.png" /><figcaption>**Fig. 5.** DM eigenmodes derived on the SCExAO instrument with the APvAPP. The spatial frequency content of the modes increases with the mode number. Until mode ~400 the active pupil on the DM is clearly visible, at mode ~1000 the pupil is still visible, but noisy modes outside of the pupil begin to dominate. All subfigures are shown with the colorbar at the same, arbitrary scales.</figcaption></figure>

<figure><img src="image_10.png" /><figcaption>**Fig. 6.** Normalized singular values for all 2500 modes generated by the SVD of the eigenmode response matrix $R_{eigen}$. All modes that have a normalized singular value below $6 \times 10^{-2}$ are suppressed by the Tikhonov regularization. In implementing modal gain binning a gain $g_{modal} = 1$ was given to the first 150. All modes above mode 150 were given a modal gain $g_{modal} = 0.01$.</figcaption></figure>

was to attempt to run the algorithm in closed-loop with realistic atmospheric phase residuals. For our demonstration of LDFC, we generated quasi-static speckles in the science image plane using the BMC 2K DM. The DM was therefore both the aberration generator as well as the aberration corrector. By using the DM in this way, we were able to control the spatial frequency content of the induced aberrations and ensure the formation of speckles across the full extent of the dark hole. This technique also gave us access to both the injected aberration as well as the LDFC-derived correction. This allowed us to track the rms WFE of the open-loop aberration and compare this to the residual rms WFE while running in closed-loop. This comparison is discussed further in Sect. 4.

To simulate realistic atmospheric phase residuals, we generated a random, temporally evolving phase aberration which we applied on the DM. This aberration was generated as a cube in which each slice was the next step in the aberration evolution. Implementing the phase aberration in this way allowed us to set the temporal correlation between each step as well as the spatial frequency content. In order to emulate atmospheric residuals rather than telescope jitter, the evolving aberration was generated with a $\frac{1}{f^a}$ power spectrum, where $\alpha = 4$, giving the aberration sequence high temporal correlation. Control over the spatial frequency content allowed us to ensure that quasi-static speckles were generated across the full dark hole. The spatial frequency content was defined by a PSD given by $\frac{1}{k^\beta}$ law with $\beta = 1.1$. The aberration was given an rms amplitude of ~80 nm; these tests were therefore in the high amplitude regime for atmospheric residuals and just within the linear regime limit for LDFC which is at ~100 nm. CACAO has 12 software channels on which a shape can be written. These channels are then summed, and the summed total is the shape that is then applied to the DM surface. Our aberration was implemented on one software channel on the DM and allowed to run first in open-loop with no correction for comparison. The same aberration was implemented in closed-loop with LDFC actively sensing the aberration and applying the proper correction to a separate channel on the DM. To demonstrate LDFC closed-loop operation, the aberration was applied on one DM channel. Ten images were taken at the science camera and averaged, the LDFC correction was derived, and the correction was then written on a separate channel of the DM. The following section shows results of these closed-loop tests over the course of a 10 000 step evolving phase aberration.

## 3.6. Noise analysis for LDFC with the SCExAO APvAPP

In the following figures, we present a noise analysis in simulation for LDFC with the SCExAO APvAPP. The same parameters used for the tests described previously in this section were used to generate Figs. 7 and 8. In these simulations, a model of the
<figure><img src="image_11.png" /></figure>

**Fig. 7.** Closed-loop performance for each $N_p$ level showing the average residual rms WFE over all 100 randomly generated aberrations vs loop iteration. The error bars give the standard deviation of the average residual rms WFE at each loop iteration across the set of 100 random aberrations. As expected, as $N_p$ increases, the average residual rms WFE, as well as the standard deviation from the mean, decreases. For values of $N_p$ between $10^8$ and $10^6$, the rms WFE converges to $\le 1$ nm.

SCExAO APvAPP and the BMC 2K DM were implemented, the latter with 50 actuators across the full diameter. Hadamard modes were projected onto this DM model and used to build the eigenmode basis set. The resulting 2500 eigenmode basis set was then truncated to 436 modes as was done in the bench tests. This smaller modal basis was used to build the simulated response matrix $R_{eigen}$ and control matrix $G_{eigen}$ just as on the SCExAO bench. Modal gain binning was then implemented as well, with gain $g_{modal} = 1$ applied to the first 150 modes, and gain $g_{modal} = 0.01$ applied to all subsequent modes. The total loop gain, $g_{loop}$, was set to 1 for this simulation in order to allow for faster convergence. The same bright pixel map was chosen for the simulation tests as well.

This analysis was completed for a series of incident photon numbers ($N_p$) ranging from $10^3$ to $10^8$. For these tests, $N_p$ was set, and the LDFC algorithm was then calibrated and tuned with the parameters described above. A random aberration consisting of a linear sum of eigenmodes was generated and implemented on the model DM. LDFC was then run in closed-loop at a speed of 1 kHz for 20 iterations, long enough to allow the loop to converge. For each $N_p$, 100 different random aberrations, all with an 80 nm rms WFE, were generated, and the loop given 20 iterations to run. The results of these tests are shown in Figs. 7 and 8.

In Fig. 7, the average residual rms WFE per closed-loop iteration from all 100 randomly generated aberrations is plotted for each $N_p$ level. The error bars give the standard deviation of the average residual rms WFE at each loop iteration across the set of 100 random aberrations. This plot shows that, for values of $N_p$ between $10^8$ and $10^6$, LDFC converges to $\le 1$ nm rms WFE. This should be noted that this is an ideal case as the induced aberrations consist solely of linear sums of modes from the eigenmode basis set.

In Fig. 8, the data from Fig. 7 is further reduced to show the average residual rms WFE to which the loop converged for each

<figure><img src="image_12.png" /></figure>

**Fig. 8.** Average residual rms WFE as a function of $N_p$. Error bars denote the standard deviation in the residual rms WFE across all 100 aberration cases. The dotted line plots the pure photon noise case $\frac{1}{\sqrt{N_p}}$. The fit of this function to the measured data shows that LDFC with the SCExAO APvAPP is photon noise-limited.

$N_p$ level over all 100 aberration tests. The error bars denote the standard deviation in the residual rms WFE to which the loop converges across all 100 aberration cases. Plotted alongside the measured data rms WFE data is the function $\frac{1}{\sqrt{N_p}}$, representing pure photon noise. This plot clearly shows that the measured residual rms WFE vs $N_p$ fits the $\frac{1}{\sqrt{N_p}}$ line. LDFC with the SCExAO APvAPP is therefore photon noise-limited. Bos et al. (2019) performed a very similar analysis for the SCExAO APvAPP, but with a nonlinear model-based wavefront sensing algorithm reconstructing the thirty lowest Zernike modes. The results presented in Fig. 8 closely match what was found in Bos et al. (2019), with some small differences in residual rms WFE due to the differences in implementation between the two algorithms.

It should be noted here that this analysis was performed using the same parameters as the SCExAO bench tests and models of the bench hardware (e.g., the APvAPP and the DM), but in an ideal case where the only source of noise was photon noise. In this simulation-based analysis, the loop speed was set to 1 kHz. This is not the speed at which the loop runs in the tests presented in this paper. The reason for this is not a theoretical limitation. The Python implementation of the algorithm is currently limited to a loop speed of ~2 Hz due to the slow image co-alignment algorithm currently being used. New code adaptations will soon allow for increased speed in the deployment of LDFC on SCExAO.

This analysis was done for an ideal case where the introduced aberration is a linear sum of the eigenmode basis set. In this case, the residual rms WFE is sub-nanometer for high flux ($N_p = 10^8$). When the aberration introduced is random and not a linear sum of eigenmodes, as is the case for the results shown in Sect. 4, the residual rms WFE does not converge to the same point, even though the dark hole contrast does return to the contrast achieved in the reference. It is hypothesized that this is
<figure><img src="image_13.png" /><figcaption>**Fig. 9.** Averages of 10 000 images that show the resulting coronagraphic PSFs when the LDFC loop is closed and open. (a) Average PSF when the LDFC loop is open. (b) Average PSF when the LDFC loop is closed. (c) Average PSF when the LDFC loop is open and the reference PSF is subtracted. (d) Average PSF when the LDFC loop is closed and the reference PSF is subtracted. The colorbar shows the normalized intensity in logarithmic scale and is equal for all subfigures.</figcaption></figure>

<figure><img src="image_14.png" /><figcaption>**Fig. 10.** Average contrast over the full 10 000 iterations calculated for each $1/\lambda$/D hemispherical bin in both the upper and lower dark holes. The plots show the average contrast per spatial frequency bin in the aberrated open-loop state, post-LDFC correction in closed-loop, and the ideal contrast measurement expected from the reference image. Error bars are given for the closed-loop LDFC contrast measurements denoting the standard deviation of the contrast measured in each $1/\lambda$/D bin for the full 10 000 iterations. This plot clearly shows that running LDFC in closed-loop drives the dark hole contrast back to its initial state as measured in the reference image.</figcaption></figure>

<figure><img src="image_15.png" /><figcaption>**Fig. 11.** Reduction and stabilization of the rms wavefront error in the pupil plane following compensation for bench drift. The test presented here took approximately 1 h and 24 min to complete (loop speed was ~2 Hz).</figcaption></figure>

due to the existence of high-spatial frequencies in the random introduced aberration that fall outside of the selected bright field and are therefore poorly-sensed or unsensed by LDFC. It will be shown in Sect. 4 that this does not affect LDFC's ability to control and maintain the contrast within the OWA of the APvAPP coronagraph.

## 4. Results

The results presented here demonstrate the ability of spatial LDFC to sense and correct evolving aberrations in the high amplitude regime (~80 nm) behind an AO system with an APvAPP coronagraph. With LDFC operating in closed-loop, the dark hole, degraded by the introduction of quasi-static speckles, is returned to the ideal contrast of the reference image and maintained in the presence of a temporally-evolving phase aberration. To demonstrate the power of LDFC to sense and suppress quasi-static speckles, in Figs. 9a and b we show two images for comparison, each an average of 10 000 images. Figure 9a shows the average in open-loop with our temporally evolving phase aberration induced on the DM. While in Fig. 9b we show the average of

10 000 images taken with the same aberration being induced on the DM, but now in closed-loop with LDFC operating. It can be seen in the comparison of these two images that the quasi-static speckles are greatly reduced in the closed-loop case. The difference between the two cases is even more pronounced when the reference image is subtracted from both averaged images. The reference subtracted is shown in Figs. 9c and d, where all the that is left in each image are the speckles averaged over 10 000 images in the open-loop and closed-loop cases. Here it becomes very clear how well LDFC reduces the speckles within the unsaturated regions of the image within the dark hole.

To analyze the algorithm's performance by spatial frequency, the dark hole was divided into $1/\lambda$/D spatial frequency bins. The contrast was calculated separately in each bin for both open-loop and closed-loop operation. The closed-loop performance can then be compared to open-loop at low, intermediate, and high spatial frequencies across the dark hole. Analyzing the average contrast in the averaged images shown in Fig. 9 reveals that, with LDFC operating in closed-loop, there is a factor of ~3x improvement (approximately a half magnitude) in contrast across the full dark hole extent from 2–10 $\lambda$/D. The improvement in contrast is shown per spatial frequency across the averaged images in Fig. 10. This improvement is maintained over the full duration (10 000 iterations) of the injected temporally-correlated, evolving phase aberration. The LDFC implementation presented in this work has a loop speed of ~2 Hz, which means that these tests took approximately 1 h and 24 min to complete. To demonstrate
<figure><img src="image_16.png" /><figcaption>**Fig. 12.** Temporal evolution of the contrast level showing the convergence and stabilization of the dark hole contrast in closed-loop over 10 000 iterations of a temporally-correlated and evolving phase aberration. The three figures show the performance of the algorithm at 3 spatial frequencies within the dark hole: in a low-spatial frequency regime (3–4 λ/D), at mid-spatial frequencies (6–7 λ/D), and at high-spatial frequencies (9–10 λ/D) near the OWA of the dark hole.</figcaption></figure>

temporal stability of the dark hole contrast, we divided the dark hole into spatial frequency bins and measured the contrast at each step of the 10 000 iterations. These results are presented in Fig. 12, where a single spatial frequency has been selected as

a representative of the performance at low, mid, and high spa-
tial frequencies. These results show that LDFC is capable of
suppressing quasi-static speckles and stabilizing the dark hole
contrast over the course of an observation. We also show this
stability by analyzing the aberrations and corrections applied to the DM. In Fig. 11 we plot the rms WFE of both the open-loop aberration applied as well as the rms WFE in closed-loop. The initial aberration has an rms WFE of 80 nm which is reduced by LDFC to an average of 55 nm. The rms WFE of the LDFC-corrected wavefront holds steady across the full 10 000 iterations.

**5. Discussion and conclusions**

Spatial linear dark field control and asymmetric pupil vector-Apodizing Phase Plate coronagraphs make up a class of powerful new FPWFS techniques that will allow the large ground-based telescopes of today and the ELT's of tomorrow to achieve the high-contrast imaging milestones for which they were designed. Combining spatial LDFC with APvAPPs on SCExAO, we have demonstrated here that these two complementary techniques are capable of sensing the quasi-static speckles in the final focal plane that are generated by low-amplitude, temporally-evolving non-common path errors to which the primary AO system is blind. Without FPWFS, these quasi-static speckles would dominate within the dark hole and degrade the high-contrast delivered by the vAPP coronagraph within the static dark hole.

These promising results on SCExAO in the high amplitude aberration regime are complemented by similar tests in the low amplitude aberration regime demonstrated recently in the lab at NASA Ames. Spatial LDFC was shown to work in a stable lab environment at deeper contrast levels (~$10^{-7}$–$10^{-6}$) for phase aberrations with varying spatial frequency content (Currie et al. 2020). The results from SCExAO show that a combination of the APvAPP with spatial LDFC is not only a powerful, but very robust wavefront sensing tool which can be deployed on multiple instruments in their current state. The list of instruments includes Subaru/SCExAO (Doelman et al. 2018), Magellan Clay/MagAO-X (Miller et al. 2018) and VLT/ERIS (Boehle et al. 2018), all of which host APvAPPs as one of their coronagraphic mode.

To prevent spectral smearing by the integrated polarization-sensitive gratings in most of the current vAPP designs, they are mainly used with narrowband filters or integral-field spectrographs. For example, the results presented in this work were obtained with a $\Delta\lambda = 25$ nm filter (around 1550 nm). However, due to the faint nature of exoplanets it is preferred to observe them in broadband filters to maximize the sensitivity. Therefore, next steps for this work include implementing broadband wavefront control with spatial LDFC behind vAPPs that can operate in broadband filters (Bos et al. 2018). The current Python implementation of the algorithm is limited to a loop speed of ~2 Hz, which was sufficient for the results presented here, but needs to be improved for on-sky deployment. As was shown in the noise analysis presented in Sect. 3.6, this is not a theoretical limitation. LDFC with an APvAPP is a photon noise-limited algorithm and can, in theory, run at least at 1 kHz under the conditions presented in this paper. We therefore expect future software upgrades to greatly increase the loop speed. Increasing the speed will also allow us to address not only NCPA, but faster moving chromatic terms in residual atmospheric turbulence as well. We also intend to implement spatial LDFC within the compute and control for adaptive optics (CACAO) open source package, thereby making it available to observers in the future. Use of the open source CACAO package will also allow for easy deployment of this algorithm on other systems such as MagAO-X on the Magellan Clay Telescope and the Keck Planet Imager and

Characterizer (KPIC; Jovanovic et al. 2019) on the Keck Telescope. The results shown here establish that the combination of the APvAPP with spatial LDFC provides a powerful new FPWFS technique by which high-contrast imaging systems can maintain high-contrast during long observations, and marks the first deployment to an active instrument. On-sky results at Subaru will follow soon, and deployment on MagAO-X is expected in the coming year.

*Acknowledgements.* The research of S. P. Bos and F. Snik leading to these results has received funding from the European Research Council under ERC Starting Grant agreement 678194 (FALCONER). The development of SCExAO was supported by the Japan Society for the Promotion of Science (Grant-in-Aid for Research #23340051, #26220704, #23103002, #19H00703, and #19H00695), the Astrobiology Center of the National Institutes of Natural Sciences, Japan, the Mt Cuba Foundation and the director's contingency fund at Subaru Telescope. LDFC development at SCExAO was supported by the NASA Strategic Astrophysics Technology (SAT) Program grant #80NSSC19K0121. The authors wish to recognize and acknowledge the very significant cultural role and reverence that the summit of Maunakea has always had within the indigenous Hawaiian community. We are very fortunate to have the opportunity to conduct observations from this mountain. This research made use of MAT-LAB as well as HCIPy, an open-source object-oriented framework written in Python for performing end-to-end simulations of high-contrast imaging instruments (Por et al. 2018). This research used the following Python libraries: Scipy (Jones et al. 2014), Numpy (Walt et al. 2011), and Matplotlib (Hunter 2007).

**References**

Baudoz, P., Boccaletti, A., Baudrand, J., & Rouan, D. 2005, Proc. Int. Astron. Union, 1, 553

Berry, M. V. 1987, J. Mod. Opt., 34, 1401

Beuzit, J.-L., Vigan, A., Mouillet, D., et al. 2019, A&A, 631, A155

Boehle, A., Glauser, A. M., Kenworthy, M. A., et al. 2018, in Ground-based and Airborne Instrumentation for Astronomy VII, Int. Soc. Opt. Photon., 1072, 107023Y

Bordé, P. J., & Traub, W. A. 2006, ApJ, 638, 488

Bos, S. P., Doelman, D. S., de Boer, J., et al. 2018, in Advances in Optical and Mechanical Technologies for Telescopes and Instrumentation III, Int. Soc. Opt. Photon., 10706, 107065M

Bos, S. P., Doelman, D. S., Lozi, J., et al. 2019, A&A, 632, A48

Bos, S. P., Vievard, S., Wilby, M. J., et al. 2020, A&A, 639, A52

Close, L. M., Males, J. R., Durney, O., et al. 2018, Proc. SPIE, 10703, 107034Y

Codona, J. L., Kenworthy, M. A., & Lloyd-Hart, M. 2008, in Adaptive Optics Systems, Int. Soc. Opt. Photon., 7015, 70155D

Currie, T., Pluzhnik, E., Guyon, O., et al. 2020, PASP, 132, 104502

Doelman, D. S., Snik, F., Warriner, N. Z., & Escuti, M. J. 2017, in Techniques and Instrumentation for Detection of Exoplanets VIII, Int. Soc. Opt. Photon., 10400, 104000U

Doelman, D. S., Por, E. H., Bos, S. P., et al. 2018, in Adaptive Optics Systems VI, Int. Soc. Opt. Photon., 10703, 1070342

Feautrier, P., Gach, J. L., Greffe, T., et al. 2017, in Image Sensing Technologies: Materials, Devices, Systems, and Applications IV, Int. Soc. Opt. Photon., 10209, 102090G

Frazin, R. A. 2013, ApJ, 767, 21

Give'on, A., Kern, B., Shaklan, S., Moody, D. C., & Pueyo, L. 2007, Am. Astron. Soc., 211, 135

Goodman, J. W. 2005, Introduction to Fourier Optics (Greenwood Village: Roberts and Company Publishers)

Groff, T. D., Kasdin, N. J., Limbach, M. A., et al. 2014, in Ground-based and Airborne Instrumentation for Astronomy V, Int. Soc. Opt. Photon., 9147, 91471W

Groff, T. D., Riggs, A. E., Kern, B., & Kasdin, N. J. 2015, J. Astron. Telesc. Instrum. Syst., 2, 011009

Guyon, O. 2005, ApJ, 629, 592

Guyon, O., Sevin, A., Ltaief, H., et al. 2018, in Adaptive Optics Systems VI, Int. Soc. Opt. Photon., 10703, 107031E

Huby, E., Baudoz, P., Mawet, D., & Absil, O. 2015, A&A, 584, A74

Hunter, J. D. 2007, Comput. Sci. Eng., 9, 90

Jones, E., Oliphant, T., & Peterson, P. 2014, SciPy: Open Source Scientific Tools for Python

Jovanovic, N., Martinache, F., Guyon, O., et al. 2015, PASP, 127, 890

Jovanovic, N., Absil, O., Baudoz, P., et al. 2018, in Adaptive Optics Systems VI, Proc. SPIE, 10703, 107031U
Jovanovic, N., Delorme, J. R., Bond, C. Z., et al. 2019, ArXiv e-prints [arXiv:1909.04541]

Kasper, M., Fedrigo, E., Looze, D. P., et al. 2004, J. Opt. Soc. Am. A, 21, 1004

Kuhn, J., Potter, D., & Parise, B. 2001, ApJ, 553, L189

Lozi, J., Jovanovic, N., Guyon, O., et al. 2019, PASP, 131, 044503

Macintosh, B., Graham, J. R., Ingraham, P., et al. 2014, Proc. Natl. Acad. Sci., 111, 12661

Males, J. R., Close, L. M., Miller, K., et al. 2018, in *Adaptive Optics Systems VI*, Int. Soc. Opt. Photon., 10703, 1070309

Marois, C., Lafreniere, D., Doyon, R., Macintosh, B., & Nadeau, D. 2006, ApJ, 641, 556

Martinache, F. 2013, PASP, 125, 422

Martinache, F., Jovanovic, N., & Guyon, O. 2016, A&A, 593, A33

Martinez, P., Loose, C., Carpentier, E. A., & Kasper, M. 2012, A&A, 541, A136

Martinez, P., Kasper, M., Costille, A., et al. 2013, A&A, 554, A41

Miller, K. L. 2018, PhD Thesis, The University of Arizona, USA

Miller, K., Guyon, O., & Males, J. 2017, J. Astron. Telesc. Instrum. Syst., 3, 049002

Miller, K., Males, J. R., Guyon, O., et al. 2018, in *Adaptive Optics Systems VI*, Int. Soc. Opt. Photon., 10703, 107031T

Miller, K. L., Males, J. R., Guyon, O., et al. 2019, J. Astron. Telesc. Instrum. Syst., 5, 1

Minowa, Y., Hayano, Y., Oya, S., et al. 2010, in *Adaptive Optics Systems II*, Int. Soc. Opt. Photon., 7736, 77363N

N'Diaye, M., Dohlen, K., Fusco, T., & Paul, B. 2013, A&A, 555, A94

Oh, C., & Escuti, M. J. 2008, Opt. Lett., 33, 2287

Otten, G. P., Snik, F., Kenworthy, M. A., et al. 2014, in *Advances in Optical and Mechanical Technologies for Telescopes and Instrumentation*, Int. Soc. Opt. Photon., 9151, 91511R

Otten, G. P., Snik, F., Kenworthy, M. A., et al. 2017, ApJ, 834, 175

Pancharatnam, S. 1956, Proc. Indian Acad. Sci. – Sect. A, 44, 398

Paul, B., Mugnier, L., Sauvage, J.-F., Dohlen, K., & Ferrari, M. 2013, Opt. Exp., 21, 31751

Por, E. H., Haffert, S. Y., Radhakrishnan, V. M., et al. 2018, in *Adaptive Optics Systems VI*, Proc. SPIE, 10703, 107034N

Racine, R., Walker, G. A., Nadeau, D., Doyon, R., & Marois, C. 1999, PASP, 111, 587

Ruane, G., Ngo, H., Mawet, D., et al. 2019, AJ, 157, 118

Singh, G., Lozi, J., Guyon, O., et al. 2015, PASP, 127, 857

Snik, F., Otten, G., Kenworthy, M., et al. 2012, in *Modern Technologies in Space- and Ground-based Telescopes and Instrumentation II*, Int. Soc. Opt. Photon., 8450, 84500M

Sparks, W. B., & Ford, H. C. 2002, ApJ, 578, 543

Traub, W. A., & Oppenheimer, B. R. 2010, Exoplanets (Tucson: University of Arizona Press), 111

Vigan, A., Gry, C., Salter, G., et al. 2015, MNRAS, 454, 129

Walt, S. V. D., Colbert, S. C., & Varoquaux, G. 2011, Comput. Sci. Eng., 13, 22

Wilby, M., Keller, C. U., Haffert, S., et al. 2016, in *Adaptive Optics Systems V*, Int. Soc. Opt. Photon., 9909, 990921

Wilby, M. J., Keller, C. U., Snik, F., Korkiakoski, V., & Pietrow, A. G. 2017, A&A, 597, A112