PolygonSkyRegion

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

Bases: SkyRegion

A polygon defined using vertices in sky coordinates.

Parameters:
verticesSkyCoord

The vertices of the polygon.

metaRegionMeta or dict, optional

A dictionary that stores the meta attributes of the region.

visualRegionVisual or dict, optional

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

Attributes Summary

meta

The meta attributes as a RegionMeta

vertices

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

visual

The visual attributes as a RegionVisual.

Methods Summary

to_pixel(wcs)

Return the equivalent region defined in pixel coordinates.

Attributes Documentation

meta

The meta attributes as a RegionMeta

vertices

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

visual

The visual attributes as a RegionVisual.

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.