aperture2regions#
- jdaviz.core.region_translators.aperture2regions(aperture)[source]#
Convert a given
photutilsaperture toregionsshape.- Parameters:
- aperture
photutils.aperture.Aperture An equivalent
photutilsaperture.
- aperture
- Returns:
- region_shape
regions.Region A supported
regionsshape.
- region_shape
- Raises:
- NotImplementedError
The given
photutilsaperture is not supported.- ValueError
Invalid inputs.
See also
Examples
Translate a
photutils.aperture.CircularAperturetoregions.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)>