RectangleSkyRegion¶
- class regions.RectangleSkyRegion(center, width, height, angle=<Quantity 0. deg>, meta=None, visual=None)[source]¶
Bases:
SkyRegionA rectangle in sky coordinates.
- Parameters:
- center
SkyCoord The position of the center of the rectangle.
- width
Quantity The width of the rectangle (before rotation) as an angle.
- height
Quantity The height of the rectangle (before rotation) as an angle.
- angle
Quantity, 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.
- meta
RegionMetaordict, optional A dictionary that stores the meta attributes of the region.
- visual
RegionVisualordict, optional A dictionary that stores the visual meta attributes of the region.
- center
Attributes Summary
The rotation angle measured anti-clockwise as a
astropy.units.Quantityangle.The center position as a
astropy.coordinates.SkyCoord.The height of the rectangle (before rotation) as a
astropy.units.Quantityangle.The meta attributes as a
RegionMetaThe visual attributes as a
RegionVisual.The width of the rectangle (before rotation) as a
astropy.units.Quantityangle.Methods Summary
to_pixel(wcs)Return the equivalent region defined in pixel coordinates.
Attributes Documentation
- angle¶
The rotation angle measured anti-clockwise as a
astropy.units.Quantityangle.
- center¶
The center position as a
astropy.coordinates.SkyCoord.
- height¶
The height of the rectangle (before rotation) as a
astropy.units.Quantityangle.
- meta¶
The meta attributes as a
RegionMeta
- visual¶
The visual attributes as a
RegionVisual.
- width¶
The width of the rectangle (before rotation) as a
astropy.units.Quantityangle.
Methods Documentation
- to_pixel(wcs)[source]¶
Return the equivalent region defined in pixel coordinates.
- Parameters:
- wcs
WCS The world coordinate system transformation to use to convert between sky and pixel coordinates.
- wcs
- Returns:
- pixel_region
PixelRegion A pixel region.
- pixel_region