regions Package

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


make_example_dataset([data, config])

Make an example dataset.


Run the tests for the package.



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(*args, **kwargs)

Deprecated since version 0.6.


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.

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.

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.

RegionBoundingBox(ixmin, ixmax, iymin, iymax)

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

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.

RegularPolygonPixelRegion(center, nvertices, ...)

A regular polygon in pixel coordinates.


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.