Wavefront Sensors

aotools.wfs.computeFillFactor(mask, subapPos, subapSpacing)[source]

Calculate the fill factor of a set of sub-aperture co-ordinates with a given pupil mask.

Parameters:
  • mask (ndarray) – Pupil mask
  • subapPos (ndarray) – Set of n sub-aperture co-ordinates (n, 2)
  • subapSpacing – Number of mask pixels between sub-apertures
Returns:

fill factor of sub-apertures

Return type:

list

aotools.wfs.findActiveSubaps(subaps, mask, threshold, returnFill=False)[source]

Finds the subapertures which are “seen” be through the pupil function. Returns the coords of those subapertures

Parameters:
  • subaps (int) – The number of subaps in x (assumes square)
  • mask (ndarray) – A pupil mask, where is transparent when 1, and opaque when 0
  • threshold (float) – The mean value across a subap to make it “active”
  • returnFill (optional, bool) – Return an array of fill-factors
Returns:

An array of active subap coords

Return type:

ndarray

aotools.wfs.make_subaps_2d(data, mask)[source]

Fills in a pupil shape with 2-d sub-apertures

Parameters:
  • data (ndarray) – slope data, of shape, (frames, 2, nSubaps)
  • mask (ndarray) – 2-d array of shape (nxSubaps, nxSubaps), where 1 indicates a valid subap position and 0 a masked subap