pyrtc.modal_basis
Modal bases for wavefront correctors, built with aobasis.
pyrtc builds every modal basis (mode-to-command matrix, M2C) through the
aobasis package instead of
per-backend code. A wavefront corrector asks for a basis with a basis:
section in its config:
wfc:
num_modes: 50
basis:
type: kl # kl | zernike | fourier | zonal | zonal_fast | hadamard
pupil_diameter: 8.0 # metres spanned by the actuator grid
r0: 0.16 # KL only
L0: 30.0 # KL only
This module holds the pure (stream-free) pieces: config parsing and
validation, actuator coordinates from a 2D layout mask, and the generation
and normalization of the (num_actuators, num_modes) matrix.
Coordinate convention
aobasis takes actuator positions as an (N, 2) array of (x, y) in
metres with the pupil centre at the origin. When positions are derived from a
boolean layout mask, x is the column index and y the row index,
centred on the middle of the mask, and the first and last rows/columns of the
mask sit on the pupil edge: pitch = pupil_diameter / (max(mask.shape) - 1).
This is the Fried-geometry convention used by OOPAO and by
aobasis.make_circular_actuator_grid. Actuators are ordered like
mask[mask] (row-major), which is the order pyrtc uses for command vectors.
Functions
|
Return |
|
Build a |
|
Return a centred, approximately circular boolean layout for |
|
Call the matching aobasis generator and return its raw modes. |
|
Load |
|
Scale each column of |
|
Validate and normalize a |
Classes
|
Normalized |