regions Package

Regions is Astropy coordinated package to provide tools for region handling.


crtf_objects_to_string(regions[, coordsys, …])

Deprecated since version 0.5.

ds9_objects_to_string(regions[, coordsys, …])

Deprecated since version 0.5.


Deprecated since version 0.5.

make_example_dataset([data, config])

Make an example dataset.

read_crtf(filename[, errors, cache])

Deprecated since version 0.5.

read_ds9(filename[, errors, cache])

Deprecated since version 0.5.

read_fits(filename[, errors, cache])

Deprecated since version 0.5.


Run the tests for the package.

write_crtf(regions, filename[, coordsys, …])

Deprecated since version 0.5.

write_ds9(regions, filename[, coordsys, …])

Deprecated since version 0.5.

write_fits(filename, regions[, header, …])

Deprecated since version 0.5.



A base class for annulus pixel regions.

AsymmetricAnnulusPixelRegion(center, …[, …])

Helper class for asymmetric annuli sky regions.

AsymmetricAnnulusSkyRegion(center, …[, …])

Helper class for asymmetric annuli sky regions.

BoundingBox(ixmin, ixmax, iymin, iymax)

A rectangular bounding box in integer (not float) pixel indices.

CRTFParser(region_string[, errors])

Deprecated since version 0.5.


A generic error class for CRTF region parsing.


A generic warning class for CRTF region parsing.

CircleAnnulusPixelRegion(center, …[, …])

A circular annulus in pixel coordinates.

CircleAnnulusSkyRegion(center, inner_radius, …)

A circular annulus in sky coordinates.

CirclePixelRegion(center, radius[, meta, visual])

A circle defined using pixel coordinates.

CircleSkyRegion(center, radius[, meta, visual])

A circle defined using sky coordinates.

CompoundPixelRegion(region1, region2, operator)

A class that represents the logical combination of two regions in pixel coordinates.

CompoundSkyRegion(region1, region2, operator)

A class that represents the logical combination of two regions in sky coordinates.

DS9Parser(region_string[, errors])

Deprecated since version 0.5.


A generic error class for DS9 region parsing.


A generic warning class for DS9 region parsing.

EllipseAnnulusPixelRegion(center, …[, …])

A elliptical annulus in pixel coordinates.

EllipseAnnulusSkyRegion(center, inner_width, …)

A elliptical annulus in SkyCoord coordinates.

EllipsePixelRegion(center, width, height[, …])

An ellipse in pixel coordinates.

EllipseSkyRegion(center, width, height[, …])

An ellipse defined using sky coordinates.

FITSRegionParser(table[, errors])

Deprecated since version 0.5.


A generic error class for FITS region parsing.


A generic warning class for FITS region parsing.

LinePixelRegion(start, end[, meta, visual])

A line in pixel coordinates.

LineSkyRegion(start, end[, meta, visual])

A line in sky coordinates.


A base class for region metadata.

PixCoord(x, y)

A class for pixel coordinates.


Base class for all regions defined in pixel coordinates.

PointPixelRegion(center[, meta, visual])

A point position in pixel coordinates.

PointSkyRegion(center[, meta, visual])

A pixel region in sky coordinates.

PolygonPixelRegion(vertices[, meta, visual])

A polygon in pixel coordinates.

PolygonSkyRegion(vertices[, meta, visual])

A polygon defined using vertices in sky coordinates.

RectangleAnnulusPixelRegion(center, …[, …])

A rectangular annulus in pixel coordinates.

RectangleAnnulusSkyRegion(center, …[, …])

A rectangular annulus in SkyCoord coordinates.

RectanglePixelRegion(center, width, height)

A rectangle in pixel coordinates.

RectangleSkyRegion(center, width, height[, …])

A rectangle in sky coordinates.


Base class for all regions.

RegionMask(data, bbox)

Class for a region mask.


A dictionary subclass that holds the meta attributes of the region.


A dictionary subclass which holds the visual attributes of the region.


Class to hold a list of Region objects.

Shape(coordsys, region_type, coord, meta, …)

Deprecated since version 0.5.

ShapeList(*args, **kwargs)

Deprecated since version 0.5.


Base class for all regions defined in celestial coordinates.

TextPixelRegion(center, text[, meta, visual])

A text string in pixel coordinates.

TextSkyRegion(center, text[, meta, visual])

A text string in sky coordinates.