Aperture management tools

There are few simple aperture managment tools in aperture.h which might be useful for some simple applications. In general, it is expected that the user specify the aperture very precisely in an integer array, with 1 for illuminated subapertures and 0 for non-illuminated subapertures. This set of routines is generally for circular apertures, though the user could provide their own aperture array and overwrite the interal aperture arry setting.

Reference / API

The aperture structure

aperture

This is the basic aperture type. It is a pointer to the aperture structure type.

aperture_s

The raw aperture structure.

aperture_s.nx

Number of subapertures in the x direction.

aperture_s.ny

Number of subapertures in the y direction.

aperture_s.nm

Number of modes controlled for this aperture. This value is normally set to 0 by code in this header, but can be useful for other user-facing features.

aperture_s.ap

A pointer to the aperture illumination array, with 1 for illuminated subapertures and 0 for non-illuminated subapertures.

aperture_s.ni

The number of illuminated subapertures.

Creating apertures

aperture aperture_create(const int ny, const int nx, const int *ap)

Create an aperture from an integer array of illiuminated points.

Parameters:
  • int ny (const) – Number of points in the Y direction.
  • int nx (const) – Number of points in the X direction.
  • int* ap (const) – Aperture array.
  • ap (aperture) – Aperture object.
void aperture_destroy(aperture ap)

Destroy and deallocate aperture arrays.

Parameters:
  • ap (aperture) – Aperture object to deallocate.
aperture aperture_create_default(const int ny, const int nx)

This creates an aperture with a default annulus pattern that almost fills the entire map, and has a secondary obscuration. It is good for rough testing. The outer radius is set by (n / 2) - 1, and the inner radius is set to outer_radius / 3.

Parameters:
  • int ny (const) – Number of points in the Y direction.
  • int nx (const) – Number of points in the X direction.
  • ap (aperture) – Aperture object.
aperture aperture_create_with_radii(const int ny, const int nx, const double outer_radius, const double inner_radius)

This function creates an aperture from a cicular annulus with an inner and outer radius.

Parameters:
  • int ny (const) – Number of points in the Y direction.
  • int nx (const) – Number of points in the X direction.
  • double outer_radius (const) – The outer radius of the annulus.
  • double inner_radius (const) – The inner radius of the annulus.
  • ap (aperture) – Aperture object.

Viewing apertures

void aperture_print(const aperture ap)

Print the aperture mask to stdout.

Parameters: