25from .detail
import makeSkyPolygonFromBBox
29 """Information about a cell within a patch of a tract of a sky map.
31 See `PatchInfo` and `TractInfo`
for more information.
36 x,y index of a cell (a pair of ints)
41 sequentialIndex : `int`
42 Cell sequential index.
46 def __init__(self, index, innerBBox, outerBBox, sequentialIndex, tractWcs):
52 if not outerBBox.contains(innerBBox):
53 raise RuntimeError(
"outerBBox=%s does not contain innerBBox=%s" % (outerBBox, innerBBox))
56 """Return cell index: a tuple of (x, y)
65 index = property(getIndex)
68 """Return cell sequential index.
73 Sequential cell index.
77 sequential_index = property(getSequentialIndex)
80 """Return the associated tract wcs
89 wcs = property(getWcs)
92 """Get inner bounding box.
97 The inner bounding Box.
101 inner_bbox = property(getInnerBBox)
104 """Get outer bounding box.
109 The outer bounding Box.
113 outer_bbox = property(getOuterBBox)
116 """Get the inner on-sky region.
120 tractWcs : `lsst.afw.image.SkyWcs`, optional
121 WCS for the associated tract.
126 The inner sky region.
128 _tractWcs = tractWcs if tractWcs
is not None else self.
_wcs
136 """Get the outer on-sky region.
140 tractWcs : `lsst.afw.image.SkyWcs`, optional
141 WCS for the associated tract.
146 The outer sky region.
148 _tractWcs = tractWcs if tractWcs
is not None else self.
_wcs
156 return (self.
getIndex() == rhs.getIndex()) \
161 return not self.
__eq__(rhs)
164 return "CellInfo(index=%s)" % (self.
getIndex(),)
167 return "CellInfo(index=%s, innerBBox=%s, outerBBox=%s)" % \
def outer_sky_polygon(self)
def getSequentialIndex(self)
def __init__(self, index, innerBBox, outerBBox, sequentialIndex, tractWcs)
def getInnerSkyPolygon(self, tractWcs=None)
def getOuterSkyPolygon(self, tractWcs=None)
def inner_sky_polygon(self)
def makeSkyPolygonFromBBox(bbox, wcs)