RectangleSkyRegion

class regions.RectangleSkyRegion(center, width, height, angle=<Quantity 0. deg>, meta=None, visual=None)[source]

Bases: regions.core.core.SkyRegion

A rectangle in sky coordinates.

Parameters
centerSkyCoord

The position of the center of the rectangle.

widthQuantity

The width of the rectangle (before rotation) as an angle.

heightQuantity

The height of the rectangle (before rotation) as an angle.

angleQuantity, optional

The rotation angle of the rectangle, measured anti-clockwise. If set to zero (the default), the width axis is lined up with the longitude axis of the celestial coordinates.

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

angle

Descriptor class for SkyRegion, which takes a scalar Quantity object.

center

Descriptor class for SkyRegion, which takes a scalar SkyCoord object.

height

Descriptor class for SkyRegion, which takes a scalar Quantity object.

width

Descriptor class for SkyRegion, which takes a scalar Quantity object.

Methods Summary

to_pixel(wcs)

Return the equivalent region defined in pixel coordinates.

Attributes Documentation

angle

Descriptor class for SkyRegion, which takes a scalar Quantity object.

center

Descriptor class for SkyRegion, which takes a scalar SkyCoord object.

height

Descriptor class for SkyRegion, which takes a scalar Quantity object.

width

Descriptor class for SkyRegion, which takes a scalar Quantity object.

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.