LiFT

Overview

LiFT (Linearized Focal-plane Technique) is a focal-plane wavefront sensor that estimates wavefront aberrations from PSF images using phase diversity. A known diversity OPD (typically defocus) is introduced, and the wavefront is reconstructed iteratively by minimising the difference between observed and modelled PSFs.

The interaction matrices can be computed analytically (default) or numerically. GPU acceleration via CuPy is supported when available.

Quick start

from OOPAO.LiFT import LiFT

lift = LiFT(
    tel            = tel,
    basis          = Z.modesFullRes,   # 3-D Zernike basis [n,n,J]
    det            = cam,
    diversity_OPD  = diversity_map,    # 2-D OPD in metres
    iterations     = 30,
    img_resolution = 64,
    numerical      = False,
)

# Reconstruct wavefront from a PSF frame
lift.get_modal_coefficients(cam.frame)
print(lift.modal_coefficients)

API reference

class OOPAO.LiFT.LiFT(tel, basis, det, diversity_OPD, iterations, img_resolution, numerical, ang_pixel_arcsec=None)[source]

Linearized focal-plane wavefront sensor.

Parameters:
  • tel (Telescope) – Telescope object coupled with a Source (wavelength information required).

  • basis (numpy.ndarray) – Modal basis as a 3-D array (n_pix, n_pix, n_modes). Last dimension = mode index.

  • det (Detector) – Detector object providing sampling and noise weighting.

  • diversity_OPD (numpy.ndarray) – 2-D phase diversity OPD map in metres.

  • iterations (int) – Maximum number of iterations for the LiFT algorithm.

  • img_resolution (int) – PSF image resolution in pixels. Smaller values improve robustness under noise.

  • numerical (bool) – If True, compute interaction matrices numerically. If False (default), use the analytical model.

  • ang_pixel_arcsec (float or None) – Angular pixel size in arcseconds. Overrides the detector sampling when set. Default None.

Methods

get_modal_coefficients(frame)

Estimate modal wavefront coefficients from a PSF image.

Parameters:

frame (numpy.ndarray) – PSF detector frame.

Key attributes

modal_coefficients: numpy.ndarray

Estimated modal coefficients in metres (populated by get_modal_coefficients()).

gpu: bool

True if CuPy GPU acceleration is active.

Note

Tutorial: tutorials/how_to_LIFT.ipynb