LSST Applications g0f08755f38+9c285cab97,g1635faa6d4+13f3999e92,g1653933729+a8ce1bb630,g1a0ca8cf93+bf6eb00ceb,g28da252d5a+0829b12dee,g29321ee8c0+5700dc9eac,g2bbee38e9b+9634bc57db,g2bc492864f+9634bc57db,g2cdde0e794+c2c89b37c4,g3156d2b45e+41e33cbcdc,g347aa1857d+9634bc57db,g35bb328faa+a8ce1bb630,g3a166c0a6a+9634bc57db,g3e281a1b8c+9f2c4e2fc3,g414038480c+077ccc18e7,g41af890bb2+fde0dd39b6,g5fbc88fb19+17cd334064,g781aacb6e4+a8ce1bb630,g80478fca09+55a9465950,g82479be7b0+d730eedb7d,g858d7b2824+9c285cab97,g9125e01d80+a8ce1bb630,g9726552aa6+10f999ec6a,ga5288a1d22+2a84bb7594,gacf8899fa4+c69c5206e8,gae0086650b+a8ce1bb630,gb58c049af0+d64f4d3760,gc28159a63d+9634bc57db,gcf0d15dbbd+4b7d09cae4,gda3e153d99+9c285cab97,gda6a2b7d83+4b7d09cae4,gdaeeff99f8+1711a396fd,ge2409df99d+5e831397f4,ge79ae78c31+9634bc57db,gf0baf85859+147a0692ba,gf3967379c6+41c94011de,gf3fb38a9a8+8f07a9901b,gfb92a5be7c+9c285cab97,w.2024.46
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: