make_focal_grid_from_pupil_grid

hcipy.field.make_focal_grid_from_pupil_grid(pupil_grid, q=1, num_airy=None, focal_length=1, wavelength=1)

Make a grid for a focal plane from a pupil grid.

Calculate the focal grid corresponding to the pupil grid, using an FFT grid as a guide. The resulting grid focal will always contain the origin (0, 0) point. The extent of the pupil grid will be used as the diameter of the pupil. If the pupil is undersized on the pupil grid, the resulting focal grid needs to be rescaled manually.

Note

In almost all cases, it is preferable to use make_focal_grid(). This function allows you to directly set the diameter, and doesn’t require the user to pass the pupil grid as an argument. make_focal_grid_from_pupil_grid() retains old functionality and serves as a backwards compatibility function, due to its ubiquitous usage in HCIPy code.

Parameters:
pupil_gridGrid

The pupil grid for which the focal grid needs to be calculated. The extent of this Grid is used as the diameter of the pupil.

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).

focal_lengthscalar

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

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.