1 from builtins
import object
23 __all__ = [
"PatchInfo"]
27 """Information about a patch within a tract of a sky map
29 See TractInfo for more information.
32 def __init__(self, index, innerBBox, outerBBox):
33 """Construct a PatchInfo
35 @param[in] index: x,y index of patch (a pair of ints)
36 @param[in] innerBBox: inner bounding box (an afwGeom.Box2I)
37 @param[in] outerBBox: inner bounding box (an afwGeom.Box2I)
42 if not outerBBox.contains(innerBBox):
43 raise RuntimeError(
"outerBBox=%s does not contain innerBBox=%s" % (outerBBox, innerBBox))
51 """Get inner bounding box
56 """Get outer bounding box
63 return (self.
getIndex() == rhs.getIndex()) \
70 return not self.
__eq__(rhs)
73 """Return a brief string representation
75 return "PatchInfo(index=%s)" % (self.
getIndex(),)
78 """Return a detailed string representation
80 return "PatchInfo(index=%s, innerBBox=%s, outerBBox=%s)" % \