LineSkyRegion

class regions.LineSkyRegion(start, end, meta=None, visual=None)[source]

Bases: SkyRegion

A line in sky coordinates.

Parameters:
startSkyCoord

The start position.

endSkyCoord

The end position.

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

end

The end position as a astropy.coordinates.SkyCoord.

meta

The meta attributes as a RegionMeta

start

The start position as a astropy.coordinates.SkyCoord.

visual

The visual attributes as a RegionVisual.

Methods Summary

contains(skycoord, wcs)

Check whether a sky coordinate falls inside the region.

to_pixel(wcs)

Return the equivalent region defined in pixel coordinates.

Attributes Documentation

end

The end position as a astropy.coordinates.SkyCoord.

meta

The meta attributes as a RegionMeta

start

The start position as a astropy.coordinates.SkyCoord.

visual

The visual attributes as a RegionVisual.

Methods Documentation

contains(skycoord, wcs)[source]

Check whether a sky coordinate falls inside the region.

Parameters:
skycoordSkyCoord

The position or positions to check.

wcsWCS

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

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.