24 - Consider tweaking pixel scale so the average scale is as specified, rather than the scale at the center
29 from .baseSkyMap
import BaseSkyMap
30 from .tractInfo
import TractInfo
33 withTractsOnPoles = pexConfig.Field(
34 doc =
"if True center a tract on each pole, else put a vertex on each pole",
48 """Dodecahedron-based sky map pixelization.
50 DodecaSkyMap divides the sky into 12 overlapping Tracts arranged as the faces of a dodecahedron.
52 ConfigClass = DodecaSkyMapConfig
56 """Construct a DodecaSkyMap
58 @param[in] config: an instance of self.ConfigClass; if None the default config is used
60 BaseSkyMap.__init__(self, config)
63 tractOverlap =
afwGeom.Angle(self.config.tractOverlap, afwGeom.degrees)
66 tractVec = self._dodecahedron.getFaceCtr(id)
67 tractCoord = detail.coordFromVec(tractVec, defRA=
afwGeom.Angle(0))
68 tractRA = tractCoord.getLongitude()
69 vertexVecList = self._dodecahedron.getVertices(id)
72 wcs = self._wcsFactory.makeWcs(crPixPos=
afwGeom.Point2D(0,0), crValCoord=tractCoord)
74 self._tractInfoList.append(
77 patchInnerDimensions = self.config.patchInnerDimensions,
78 patchBorder = self.config.patchBorder,
79 ctrCoord = tractCoord,
80 vertexCoordList = [detail.coordFromVec(vec, defRA=tractRA)
for vec
in vertexVecList],
81 tractOverlap = tractOverlap,
89 @return a dict containing:
90 - version: a pair of ints
101 @param[in] stateDict: a dict containing:
102 - version: a pair of ints
105 version = stateDict[
"version"]
106 if version >= (2, 0):
107 raise runtimeError(
"Version = %s >= (2,0); cannot unpickle" % (version,))
111 """Find the tract whose inner region includes the coord.
113 @param[in] coord: sky coordinate (afwCoord.Coord)
114 @return TractInfo for tract whose inner region includes the coord.
116 @note This routine will be more efficient if coord is ICRS.
118 return self[self._dodecahedron.getFaceInd(coord.toIcrs().getVector())]
121 """Return version (e.g. for pickle)
123 @return version as a pair of integers
128 """Return withTractsOnPoles parameter
130 @return withTractsOnPoles as a bool
132 return self._dodecahedron.getWithFacesOnPoles()