We are starting to detect planets at the epoch of formation - eg the accreting protoplanets PDS 70 bc.

(ESO/A. Müller et al.)

The main limitation on direct imaging is from wavefront aberrations which corrupt phase information.

In radio astronomy the idea of 'closure phase' was developed to be immune to phase noise:
Correlate baselines around a *triangle* of receivers

JWST has an aperture masking instrument on NIRISS to obtain closure phases

Kernel phase is a generalization of closure phase to arbitrary pupils.
Linearize response to phase noise: suitable for stable high Strehl images, with point-source calibrators

Separate out linear subspaces of Fourier components that are immune to phase noise vs susceptible

Used this in Pope et al, 2013 to revisit the Reid et al 2006, 2008 HST NICMOS volume-limited brown dwarf surveys and discover 5 additional tight binaries.
The other subspace can be used for wavefront sensing
Every point source image gives you a free wavefront measurement in the instrument pupil!

Cophasing segmented mirror in the lab (Pope+2014)

## Automatic Differentiation

What if we want to linearize an arbitrary optical system?

Optics is mathematically like machine learning: matrix multiplications and simple nonlinear functions

Can use automatic differentiation!

Autodiff is the enabling technology for deep neural networks - you use the chain rule to take derivatives of nearly-arbitrary numerical functions.

Implementations in TensorFlow, PyTorch, Julia native...

Here we use Google Jax, which resembles NumPy, to rewrite the Fourier/Fresnel optics code poppy to take derivatives

Morphine!

Jacobian of Palomar PHARO camera wrt phase

Extending kernel phase to coronagraphy has the same feature of a noise-corrupted space and a kernel space
Differentiable optics also allows fast gradient descent for optical design - eg coronagraph pupils

N'Diaye et al 2018

Work by Louis Desdoigts - sensitivity of Toliman telescope design to Zernike modes

Work by Alison Wong - phase retrieval by gradient descent