Last modified: February 2018

URL: https://cxc.cfa.harvard.edu/ciao/ahelp/regextent.html
Jump to: Description · Example · Bugs · See Also


AHELP for CIAO 4.16

regExtent

Context: region

Synopsis

*DEPRECTATED* Calculate the bounding box of a region.

Syntax

(xmin, ymin, xmax, ymax) = regExtent(reg)

Description

The regExtent routine returns the bounding box of a region. It is primarily useful if you wish to use the six-argument form of regArea().

The region module is not available by default; see "ahelp region" for information on loading the module.


Example

>>> from region import *
>>> reg = regParse("ellipse(10,10,4,3,24)-rect(4,2,7,8)")
>>> (x0,y0,x1,y1) = regExtent(reg)
>>> print("Bounding box is ({0:.1f},{1:.1f}) to
({2:.1f},{3:.1f})".format(x0,y0,x1,y1))
Bounding box is (5.1,5.6) to (14.9,14.4)
>>> print(regArea(reg))
35.0
>>> regArea(reg, 5.1, 5.6, 14.9, 14.1, 1)
35.0
>>> regArea(reg, 5.1, 5.6, 14.9, 14.1, 0.1)
37.700000000000003

Bugs

See the bugs page for the region library on the CIAO website for an up-to-date listing of known bugs.

Refer to the CIAO bug pages for an up-to-date listing of known issues.

See Also

region
regarea, regextent, reginsideregion, region, region-old, regparse, regprintregion, regregionstring