24 - Consider tweaking pixel scale so the average scale is as specified, rather than the scale at the center 28 from builtins
import range
32 from .baseSkyMap
import BaseSkyMap
33 from .tractInfo
import TractInfo
35 __all__ = [
'DodecaSkyMapConfig',
'DodecaSkyMap']
39 withTractsOnPoles = pexConfig.Field(
40 doc=
"if True center a tract on each pole, else put a vertex on each pole",
54 """Dodecahedron-based sky map pixelization. 56 DodecaSkyMap divides the sky into 12 overlapping Tracts arranged as the faces of a dodecahedron. 58 ConfigClass = DodecaSkyMapConfig
62 """Construct a DodecaSkyMap 64 @param[in] config: an instance of self.ConfigClass; if None the default config is used 66 BaseSkyMap.__init__(self, config)
69 tractOverlap = afwGeom.Angle(self.
config.tractOverlap, afwGeom.degrees)
73 tractCoord = detail.coordFromVec(tractVec, defRA=afwGeom.Angle(0))
74 tractRA = tractCoord.getLongitude()
78 wcs = self.
_wcsFactory.makeWcs(crPixPos=afwGeom.Point2D(0, 0), crValCoord=tractCoord)
83 patchInnerDimensions=self.
config.patchInnerDimensions,
84 patchBorder=self.
config.patchBorder,
86 vertexCoordList=[detail.coordFromVec(vec, defRA=tractRA)
for vec
in vertexVecList],
87 tractOverlap=tractOverlap,
95 @return a dict containing: 96 - version: a pair of ints 107 @param[in] stateDict: a dict containing: 108 - version: a pair of ints 111 version = stateDict[
"version"]
112 if version >= (2, 0):
113 raise RuntimeError(
"Version = %s >= (2,0); cannot unpickle" % (version,))
117 """Find the tract whose inner region includes the coord. 119 @param[in] coord: ICRS sky coordinate (lsst.afw.geom.SpherePoint) 120 @return TractInfo for tract whose inner region includes the coord. 122 @note This routine will be more efficient if coord is ICRS. 124 return self[self.
_dodecahedron.getFaceInd(coord.getVector())]
127 """Return version (e.g. for pickle) 129 @return version as a pair of integers 134 """Return withTractsOnPoles parameter 136 @return withTractsOnPoles as a bool 141 """Add subclass-specific state or configuration options to the SHA1.""" 142 sha1.update(struct.pack(
"<?", self.
config.withTractsOnPoles))
def updateSha1(self, sha1)
def findTract(self, coord)
def getWithTractsOnPoles(self)
def __setstate__(self, stateDict)
def __init__(self, config=None)
def __init__(self, config=None)