Reference/API

pyregion: a Python parser for ds9 region files

See also the in-development regions package at https://github.com/astropy/regions a new astronomy package for regions based on Astropy.

Functions

get_mask(region, hdu[, origin]) Get mask.
open(fname) Open, read and parse DS9 region file.
parse(region_string) Parse DS9 region string into a ShapeList.
test([package, test_path, args, plugins, ...]) Run the tests using py.test.

Classes

Shape(shape_name, shape_params) Shape.
ShapeList(shape_list[, comment_list]) A list of Shape objects.