make_focal_grid

hcipy.field.make_focal_grid(q, num_airy, spatial_resolution=None, pupil_diameter=None, focal_length=None, f_number=None, reference_wavelength=None)

Make a grid for a focal plane.

This grid will be a CartesianGrid with RegularCoords, and supports different resolutions, samplings, or extent in x and y. If spatial_resolution is 1, then the grid will be returned in normalized (ie. homogenized) coordinates. Otherwise, it will be in physical units. The spatial resolution is defined by:

\[\Delta x = \lambda f / D = \lambda F\]

where \(\lambda\) is the wavelength, \(f\) is the effective focal length before the focal plane, \(D\) is the diameter of the pupil, and \(F\) is the F-number of the incoming light beam. You can supply either the spatial resolution or a set of focal length, reference wavelength and pupil diameter, or a set of F-number and reference wavelength. If none are supplied, a spatial resolution of 1 will be assumed, meaning normalized units.

The grid will always contain the origin (0, 0) point.

Parameters:
qscalar or array_like

The number of pixels per resolution element (= lambda f / D).

num_airyscalar or array_like

The spatial extent of the grid in radius in resolution elements (= lambda f / D).

spatial_resolutionscalar or array_like

The physical size of a resolution element (= lambda f / D). It this is not given, the spatial resolution will be calculated from the given focal_length, reference_wavelength and pupil_diameter.

pupil_diameterscalar or array_like

The diameter of the pupil. If it is an array, this indicates the diameter in x and y.

focal_lengthscalar

The focal length used for calculating the spatial resolution at the focal plane.

f_numberscalar or array_like

The F number, also known as focal ratio, at the focal plane. If this is given, it overrides the given pupil diameter and focal length.

reference_wavelengthscalar

The reference wavelength used for calculating the spatial resolution at the focal plane.

Returns:
Grid

A Grid describing the sampling for a focal plane.

Raises:
ValueError

If both no spatial resolution and no complete set of (focal length, reference wavelength and pupil diameter) was supplied.