Gain Sensing Camera¶
Overview¶
The GainSensingCamera (GSC) estimates the optical gains of a Pyramid WFS using focal-plane PSF images and a convolutional analytical model, following the method of Chambouleyron et al. (2021, A&A). Optical gains account for the non-linear response of the PWFS when operating in the presence of residual turbulence, and are essential for accurate reconstruction in modal control.
The GSC operates on the PSF recorded by the wfs.focal_plane_camera (a Detector attached to the Pyramid). It must first be calibrated around a reference operating point (typically flat wavefront), and can then estimate gains at any subsequent operating point.
Quick start¶
from OOPAO.GainSensingCamera import GainSensingCamera
# 1. Set focal-plane camera resolution
wfs.focal_plane_camera.resolution = wfs.nRes
# 2. Create GSC with the pyramid mask and a modal basis
gsc = GainSensingCamera(wfs.mask, modal_basis, n_jobs=10)
# 3. Calibrate (flat wavefront)
tel.resetOPD()
tel * wfs
wfs * wfs.focal_plane_camera
wfs.focal_plane_camera * gsc # first call = calibration
# 4. Measure optical gains on turbulence
tel.OPD = atm.OPD.copy()
tel * wfs
wfs * wfs.focal_plane_camera
wfs.focal_plane_camera * gsc # subsequent calls = estimation
print(gsc.og) # optical gain per mode
API reference¶
- class OOPAO.GainSensingCamera.GainSensingCamera(mask, basis, n_jobs=10)[source]¶
Optical gain estimator for the Pyramid WFS.
- Parameters:
mask (numpy.ndarray) – Complex pyramid mask array (available as
wfs.mask).basis (numpy.ndarray) – Modal basis as a 3-D array of shape
(n_pix, n_pix, n_modes).n_jobs (int) – Number of parallel FFT jobs. Default
10.
Methods
- calibration(frame)[source]¶
Perform GSC calibration from a reference focal-plane frame (flat wavefront). Must be called before
get_optical_gains().- Parameters:
frame (numpy.ndarray) – Reference PSF frame from
wfs.focal_plane_camera.
- get_optical_gains(frame)¶
Estimate optical gains from a focal-plane PSF frame.
- Parameters:
frame (numpy.ndarray) – Current PSF frame.
- Returns:
Per-mode optical gain vector.
- Return type:
- reset_calibration()[source]¶
Clear the calibration state to allow re-calibration around a new working point.
Key attributes
- og: numpy.ndarray¶
Per-mode optical gain vector (populated after the first post-calibration call).
Reference
Chambouleyron et al., Pyramid wavefront sensor optical gains compensation using a convolutional model, A&A, 2021.