hex_aperture¶
-
poppy.zernike.
hex_aperture
(npix=1024, rho=None, theta=None, vertical=False, outside=0)[source]¶ Return an aperture function for a hexagon.
Note that the flat sides are aligned with the X direction by default. This is appropriate for the individual hex PMSA segments in JWST.
- npix : integer
- 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. (Ignored when
rho
andtheta
are supplied.) - 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.
- 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.