make_zernike_basis

hcipy.mode_basis.make_zernike_basis(num_modes, D, grid, starting_mode=1, ansi=False, radial_cutoff=True, use_cache=True)

Make a ModeBasis of Zernike polynomials.

Parameters:
num_modesint

The number of Zernike polynomials to generate.

Dscalar

The diameter of the Zernike polynomial.

gridGrid or None

The grid on which to evaluate the Zernike polynomials. If this is None, a list of Field generators will be returned.

starting_modeint

The first mode to evaluate.

ansiboolean

If this is True, the modes will be indexed using ANSI indices. Otherwise, a Noll indexing scheme is used.

radial_cutoffboolean

Whether to apply a circular aperture to cutoff the modes.

use_cacheboolean

Whether to use a cache while calculating the modes. A cache uses memory, so turn it off when you are limited on memory.

Returns:
ModeBasis or list of Field generators

The evaluated mode basis of Zernike polynomials, or a list of Field generators for each of the Zernike polynomials.