LSST Applications g04e9c324dd+8c5ae1fdc5,g134cb467dc+b203dec576,g18429d2f64+358861cd2c,g199a45376c+0ba108daf9,g1fd858c14a+dd066899e3,g262e1987ae+ebfced1d55,g29ae962dfc+72fd90588e,g2cef7863aa+aef1011c0b,g35bb328faa+8c5ae1fdc5,g3fd5ace14f+b668f15bc5,g4595892280+3897dae354,g47891489e3+abcf9c3559,g4d44eb3520+fb4ddce128,g53246c7159+8c5ae1fdc5,g67b6fd64d1+abcf9c3559,g67fd3c3899+1f72b5a9f7,g74acd417e5+cb6b47f07b,g786e29fd12+668abc6043,g87389fa792+8856018cbb,g89139ef638+abcf9c3559,g8d7436a09f+bcf525d20c,g8ea07a8fe4+9f5ccc88ac,g90f42f885a+6054cc57f1,g97be763408+06f794da49,g9dd6db0277+1f72b5a9f7,ga681d05dcb+7e36ad54cd,gabf8522325+735880ea63,gac2eed3f23+abcf9c3559,gb89ab40317+abcf9c3559,gbf99507273+8c5ae1fdc5,gd8ff7fe66e+1f72b5a9f7,gdab6d2f7ff+cb6b47f07b,gdc713202bf+1f72b5a9f7,gdfd2d52018+8225f2b331,ge365c994fd+375fc21c71,ge410e46f29+abcf9c3559,geaed405ab2+562b3308c0,gf9a733ac38+8c5ae1fdc5,w.2025.35
LSST Data Management Base Package
Loading...
Searching...
No Matches
lsst.skymap.cellInfo.CellInfo Class Reference

Public Member Functions

 __init__ (self, index, innerBBox, outerBBox, sequentialIndex, tractWcs)
 
 getIndex (self)
 
 getSequentialIndex (self)
 
 getWcs (self)
 
 getInnerBBox (self)
 
 getOuterBBox (self)
 
 getInnerSkyPolygon (self, tractWcs=None)
 
 inner_sky_polygon (self)
 
 getOuterSkyPolygon (self, tractWcs=None)
 
 outer_sky_polygon (self)
 
 __eq__ (self, rhs)
 
 __ne__ (self, rhs)
 
 __str__ (self)
 
 __repr__ (self)
 

Protected Attributes

 _index = index
 
 _sequentialIndex = sequentialIndex
 
 _innerBBox = innerBBox
 
 _outerBBox = outerBBox
 
 _wcs = tractWcs
 

Properties

 index = property(getIndex)
 
 sequential_index = property(getSequentialIndex)
 
 wcs = property(getWcs)
 
 inner_bbox = property(getInnerBBox)
 
 outer_bbox = property(getOuterBBox)
 

Detailed Description

Information about a cell within a patch of a tract of a sky map.

See `PatchInfo` and `TractInfo` for more information.

Parameters
----------
index : `lsst.skymap.Index2D`
    x,y index of a cell (a pair of ints)
innerBBox : `lsst.geom.Box2I`
    Inner bounding box.
outerBBox : `lsst.geom.Box2I`
    Outer bounding box.
sequentialIndex : `int`
    Cell sequential index.
tractWcs : `lsst.afw.geom.SkyWcs`
    Tract WCS object.

Definition at line 28 of file cellInfo.py.

Constructor & Destructor Documentation

◆ __init__()

lsst.skymap.cellInfo.CellInfo.__init__ ( self,
index,
innerBBox,
outerBBox,
sequentialIndex,
tractWcs )

Definition at line 46 of file cellInfo.py.

46 def __init__(self, index, innerBBox, outerBBox, sequentialIndex, tractWcs):
47 self._index = index
48 self._sequentialIndex = sequentialIndex
49 self._innerBBox = innerBBox
50 self._outerBBox = outerBBox
51 self._wcs = tractWcs
52 if not outerBBox.contains(innerBBox):
53 raise RuntimeError("outerBBox=%s does not contain innerBBox=%s" % (outerBBox, innerBBox))
54

Member Function Documentation

◆ __eq__()

lsst.skymap.cellInfo.CellInfo.__eq__ ( self,
rhs )

Definition at line 155 of file cellInfo.py.

155 def __eq__(self, rhs):
156 return (self.getIndex() == rhs.getIndex()) \
157 and (self.getInnerBBox() == rhs.getInnerBBox()) \
158 and (self.getOuterBBox() == rhs.getOuterBBox())
159

◆ __ne__()

lsst.skymap.cellInfo.CellInfo.__ne__ ( self,
rhs )

Definition at line 160 of file cellInfo.py.

160 def __ne__(self, rhs):
161 return not self.__eq__(rhs)
162

◆ __repr__()

lsst.skymap.cellInfo.CellInfo.__repr__ ( self)

Definition at line 166 of file cellInfo.py.

166 def __repr__(self):
167 return "CellInfo(index=%s, innerBBox=%s, outerBBox=%s)" % \
168 (self.getIndex(), self.getInnerBBox(), self.getOuterBBox())

◆ __str__()

lsst.skymap.cellInfo.CellInfo.__str__ ( self)

Definition at line 163 of file cellInfo.py.

163 def __str__(self):
164 return "CellInfo(index=%s)" % (self.getIndex(),)
165

◆ getIndex()

lsst.skymap.cellInfo.CellInfo.getIndex ( self)
Return cell index: a tuple of (x, y)

Returns
-------
result : `lsst.skymap.Index2D`
    Patch index (x, y).

Definition at line 55 of file cellInfo.py.

55 def getIndex(self):
56 """Return cell index: a tuple of (x, y)
57
58 Returns
59 -------
60 result : `lsst.skymap.Index2D`
61 Patch index (x, y).
62 """
63 return self._index
64

◆ getInnerBBox()

lsst.skymap.cellInfo.CellInfo.getInnerBBox ( self)
Get inner bounding box.

Returns
-------
bbox : `lsst.geom.Box2I`
    The inner bounding Box.

Definition at line 91 of file cellInfo.py.

91 def getInnerBBox(self):
92 """Get inner bounding box.
93
94 Returns
95 -------
96 bbox : `lsst.geom.Box2I`
97 The inner bounding Box.
98 """
99 return self._innerBBox
100

◆ getInnerSkyPolygon()

lsst.skymap.cellInfo.CellInfo.getInnerSkyPolygon ( self,
tractWcs = None )
Get the inner on-sky region.

Parameters
----------
tractWcs : `lsst.afw.image.SkyWcs`, optional
    WCS for the associated tract.

Returns
-------
result : `lsst.sphgeom.ConvexPolygon`
    The inner sky region.

Definition at line 115 of file cellInfo.py.

115 def getInnerSkyPolygon(self, tractWcs=None):
116 """Get the inner on-sky region.
117
118 Parameters
119 ----------
120 tractWcs : `lsst.afw.image.SkyWcs`, optional
121 WCS for the associated tract.
122
123 Returns
124 -------
125 result : `lsst.sphgeom.ConvexPolygon`
126 The inner sky region.
127 """
128 _tractWcs = tractWcs if tractWcs is not None else self._wcs
129 return makeSkyPolygonFromBBox(bbox=self.getInnerBBox(), wcs=_tractWcs)
130

◆ getOuterBBox()

lsst.skymap.cellInfo.CellInfo.getOuterBBox ( self)
Get outer bounding box.

Returns
-------
bbox : `lsst.geom.Box2I`
    The outer bounding Box.

Definition at line 103 of file cellInfo.py.

103 def getOuterBBox(self):
104 """Get outer bounding box.
105
106 Returns
107 -------
108 bbox : `lsst.geom.Box2I`
109 The outer bounding Box.
110 """
111 return self._outerBBox
112

◆ getOuterSkyPolygon()

lsst.skymap.cellInfo.CellInfo.getOuterSkyPolygon ( self,
tractWcs = None )
Get the outer on-sky region.

Parameters
----------
tractWcs : `lsst.afw.image.SkyWcs`, optional
    WCS for the associated tract.

Returns
-------
result : `lsst.sphgeom.ConvexPolygon`
    The outer sky region.

Definition at line 135 of file cellInfo.py.

135 def getOuterSkyPolygon(self, tractWcs=None):
136 """Get the outer on-sky region.
137
138 Parameters
139 ----------
140 tractWcs : `lsst.afw.image.SkyWcs`, optional
141 WCS for the associated tract.
142
143 Returns
144 -------
145 result : `lsst.sphgeom.ConvexPolygon`
146 The outer sky region.
147 """
148 _tractWcs = tractWcs if tractWcs is not None else self._wcs
149 return makeSkyPolygonFromBBox(bbox=self.getOuterBBox(), wcs=_tractWcs)
150

◆ getSequentialIndex()

lsst.skymap.cellInfo.CellInfo.getSequentialIndex ( self)
Return cell sequential index.

Returns
-------
result : `int`
    Sequential cell index.

Definition at line 67 of file cellInfo.py.

67 def getSequentialIndex(self):
68 """Return cell sequential index.
69
70 Returns
71 -------
72 result : `int`
73 Sequential cell index.
74 """
75 return self._sequentialIndex
76

◆ getWcs()

lsst.skymap.cellInfo.CellInfo.getWcs ( self)
Return the associated tract wcs

Returns
-------
wcs : `lsst.afw.geom.SkyWcs`
    Tract WCS.

Definition at line 79 of file cellInfo.py.

79 def getWcs(self):
80 """Return the associated tract wcs
81
82 Returns
83 -------
84 wcs : `lsst.afw.geom.SkyWcs`
85 Tract WCS.
86 """
87 return self._wcs
88

◆ inner_sky_polygon()

lsst.skymap.cellInfo.CellInfo.inner_sky_polygon ( self)

Definition at line 132 of file cellInfo.py.

132 def inner_sky_polygon(self):
133 return self.getInnerSkyPolygon()
134

◆ outer_sky_polygon()

lsst.skymap.cellInfo.CellInfo.outer_sky_polygon ( self)

Definition at line 152 of file cellInfo.py.

152 def outer_sky_polygon(self):
153 return self.getOuterSkyPolygon()
154

Member Data Documentation

◆ _index

lsst.skymap.cellInfo.CellInfo._index = index
protected

Definition at line 47 of file cellInfo.py.

◆ _innerBBox

lsst.skymap.cellInfo.CellInfo._innerBBox = innerBBox
protected

Definition at line 49 of file cellInfo.py.

◆ _outerBBox

lsst.skymap.cellInfo.CellInfo._outerBBox = outerBBox
protected

Definition at line 50 of file cellInfo.py.

◆ _sequentialIndex

lsst.skymap.cellInfo.CellInfo._sequentialIndex = sequentialIndex
protected

Definition at line 48 of file cellInfo.py.

◆ _wcs

lsst.skymap.cellInfo.CellInfo._wcs = tractWcs
protected

Definition at line 51 of file cellInfo.py.

Property Documentation

◆ index

lsst.skymap.cellInfo.CellInfo.index = property(getIndex)
static

Definition at line 65 of file cellInfo.py.

◆ inner_bbox

lsst.skymap.cellInfo.CellInfo.inner_bbox = property(getInnerBBox)
static

Definition at line 101 of file cellInfo.py.

◆ outer_bbox

lsst.skymap.cellInfo.CellInfo.outer_bbox = property(getOuterBBox)
static

Definition at line 113 of file cellInfo.py.

◆ sequential_index

lsst.skymap.cellInfo.CellInfo.sequential_index = property(getSequentialIndex)
static

Definition at line 77 of file cellInfo.py.

◆ wcs

lsst.skymap.cellInfo.CellInfo.wcs = property(getWcs)
static

Definition at line 89 of file cellInfo.py.


The documentation for this class was generated from the following file: