Return a Box2I corresponding to an IRAF-style BBOX
[x0:x1,y0:y1] where x0 and x1 are the one-indexed start and end columns, and correspondingly
y0 and y1 are the start and end rows.
Definition at line 27 of file utils.py.
28 """Return a Box2I corresponding to an IRAF-style BBOX 30 [x0:x1,y0:y1] where x0 and x1 are the one-indexed start and end columns, and correspondingly 31 y0 and y1 are the start and end rows. 34 mat = re.search(
r"^\[([-\d]+):([-\d]+),([-\d]+):([-\d]+)\]$", irafBBoxStr)
36 raise RuntimeError(
"Unable to parse IRAF-style bbox \"%s\"" % irafBBoxStr)
37 x0, x1, y0, y1 = [
int(_)
for _
in mat.groups()]
40
def bboxFromIraf(irafBBoxStr)
An integer coordinate rectangle.