LSST Applications g0265f82a02+c6dfa2ddaf,g1162b98a3f+b2075782a9,g2079a07aa2+1b2e822518,g2bbee38e9b+c6dfa2ddaf,g337abbeb29+c6dfa2ddaf,g3ddfee87b4+a60788ef87,g50ff169b8f+2eb0e556e8,g52b1c1532d+90ebb246c7,g555ede804d+a60788ef87,g591dd9f2cf+ba8caea58f,g5ec818987f+864ee9cddb,g858d7b2824+9ee1ab4172,g876c692160+a40945ebb7,g8a8a8dda67+90ebb246c7,g8cdfe0ae6a+4fd9e222a8,g99cad8db69+5e309b7bc6,g9ddcbc5298+a1346535a5,ga1e77700b3+df8f93165b,ga8c6da7877+aa12a14d27,gae46bcf261+c6dfa2ddaf,gb0e22166c9+8634eb87fb,gb3f2274832+d0da15e3be,gba4ed39666+1ac82b564f,gbb8dafda3b+5dfd9c994b,gbeb006f7da+97157f9740,gc28159a63d+c6dfa2ddaf,gc86a011abf+9ee1ab4172,gcf0d15dbbd+a60788ef87,gdaeeff99f8+1cafcb7cd4,gdc0c513512+9ee1ab4172,ge79ae78c31+c6dfa2ddaf,geb67518f79+ba1859f325,geb961e4c1e+f9439d1e6f,gee10cc3b42+90ebb246c7,gf1cff7945b+9ee1ab4172,w.2024.12
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | Properties | List of all members
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
 
 _sequentialIndex
 
 _innerBBox
 
 _outerBBox
 
 _wcs
 

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
protected

Definition at line 47 of file cellInfo.py.

◆ _innerBBox

lsst.skymap.cellInfo.CellInfo._innerBBox
protected

Definition at line 49 of file cellInfo.py.

◆ _outerBBox

lsst.skymap.cellInfo.CellInfo._outerBBox
protected

Definition at line 50 of file cellInfo.py.

◆ _sequentialIndex

lsst.skymap.cellInfo.CellInfo._sequentialIndex
protected

Definition at line 48 of file cellInfo.py.

◆ _wcs

lsst.skymap.cellInfo.CellInfo._wcs
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: