PolygonSkyRegion

class regions.PolygonSkyRegion(vertices, meta=None, visual=None)[source]

Bases: regions.core.core.SkyRegion

A polygon defined using vertices in sky coordinates.

Parameters
verticesSkyCoord

The vertices of the polygon.

metaRegionMeta, optional

A dictionary that stores the meta attributes of this region.

visualRegionVisual, optional

A dictionary that stores the visual meta attributes of this region.

Attributes Summary

vertices

The vertices of the polygon as a astropy.coordinates.SkyCoord array.

Methods Summary

to_pixel(wcs)

Return the equivalent region defined in pixel coordinates.

Attributes Documentation

vertices

The vertices of the polygon as a astropy.coordinates.SkyCoord array.

Methods Documentation

to_pixel(wcs)[source]

Return the equivalent region defined in pixel coordinates.

Parameters
wcsWCS

The world coordinate system transformation to use to convert between sky and pixel coordinates.

Returns
pixel_regionPixelRegion

A pixel region.