Chandra X-Ray Observatory
	(CXC)
Skip to the navigation links
Last modified: December 2013

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


AHELP for CIAO 4.9

regExtent

Context: region

Synopsis

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, regparse, regprintregion, regregionstring

Last modified: December 2013
Smithsonian Institute Smithsonian Institute

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email:   cxchelp@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2017. All rights reserved.