hexike_basis¶
-
poppy.zernike.
hexike_basis
(nterms=15, npix=512, rho=None, theta=None, aperture=None, vertical=False, outside=nan)[source]¶ Return a list of hexike polynomials 1-N following the method of Mahajan and Dai 2006 for numerical orthonormalization
This function orders the hexikes in a similar way as the Zernikes.
See also hexike_basis_wss for an alternative implementation.
- nterms : int
- Number of hexike terms to compute, starting from piston.
(e.g.
nterms=1
would return only the hexike analog to the Zernike piston term.) Default is 15. - npix : int
- Size, in pixels, of the aperture array. The hexagon will span the whole array from edge to edge in the direction aligned with its flat sides.
- rho, theta : 2D numpy arrays, optional
- For some square aperture, rho and theta contain each pixel’s coordinates in polar form. The hexagon will be defined such that it can be circumscribed in a rho = 1 circle.
- vertical : bool
- Make flat sides parallel to the Y axis instead of the default X. Default is False.
- outside : float
- Value for pixels outside the hexagonal aperture.
Default is
np.nan
, but you may also find it useful for this to be 0.0 sometimes. - aperture : 2D numpy array, optional
- Aperture mask for which pixels are included within the aperture. All positive nonzero values are considered within the aperture; any pixels with zero, negative, or NaN values will be considered outside the aperture, and set equal to the ‘outside’ parameter value. If this parameter is not set, the aperture will be inferred from the provided rho and theta arrays.