EllipticalMaskMixin#
- class photutils.aperture.EllipticalMaskMixin(**kwargs)[source]#
Bases:
objectDeprecated since version 3.0: This function was deprecated in version 3.0 and will be removed in version 4.0.
Mixin class to create masks for elliptical and elliptical-annulus aperture objects.
Deprecated since version 3.0.
Deprecated since version 3.0: This function was deprecated in version 3.0 and will be removed in version 4.0.
Methods Summary
to_mask([method, subpixels])Return a mask for the aperture.
Methods Documentation
- to_mask(method='exact', subpixels=5)[source]#
Return a mask for the aperture.
- Parameters:
- method{‘exact’, ‘center’, ‘subpixel’}, optional
The method used to determine the pixel weights (the fraction of the pixel area covered by the aperture):
'exact'(default): Calculates the exact geometric overlap area. Weights are continuous in the range [0, 1].'center': Binary weighting based on the pixel center. Weights are either 0 or 1.'subpixel': Approximates the overlap by averaging binary samples on a subgrid. The number of samples is set by thesubpixelsparameter. Weights are discrete in the range [0, 1].
- subpixelsint, optional
The subsampling factor per axis used when
method='subpixel'. Each pixel is divided into a grid ofsubpixels**2subpixels to approximate the overlap. This parameter is ignored for other methods.
- Returns:
- mask
ApertureMaskor list ofApertureMask A mask for the aperture. If the aperture is scalar then a single
ApertureMaskis returned, otherwise a list ofApertureMaskis returned.
- mask