aperture2regions#
- jdaviz.core.region_translators.aperture2regions(aperture)[source]#
Convert a given
photutils
aperture toregions
shape.- Parameters:
- aperture
photutils.aperture.Aperture
An equivalent
photutils
aperture.
- aperture
- Returns:
- region_shape
regions.Region
A supported
regions
shape.
- region_shape
- Raises:
- NotImplementedError
The given
photutils
aperture is not supported.- ValueError
Invalid inputs.
See also
Examples
Translate a
photutils.aperture.CircularAperture
toregions.CirclePixelRegion
:>>> from photutils.aperture import CircularAperture >>> from jdaviz.core.region_translators import aperture2regions >>> aperture = CircularAperture((42, 43), 4.2) >>> aperture2regions(aperture) <CirclePixelRegion(center=PixCoord(x=42.0, y=43.0), radius=4.2)>