1 from __future__
import division
2 from builtins
import range
28 from .baseSkyMap
import BaseSkyMap
29 from .tractInfo
import TractInfo
31 __all__ = [
'EquatSkyMapConfig',
'EquatSkyMap']
35 numTracts = pexConfig.Field(
36 doc=
"number of tracts; warning: TAN projection requires at least 3",
40 decRange = pexConfig.ListField(
41 doc=
"range of declination (deg)",
44 default=(-1.25, 1.25),
52 """Equatorial sky map pixelization, e.g. for SDSS stripe 82 image data. 54 EquatSkyMap represents an equatorial band of sky divided along declination into overlapping tracts. 56 ConfigClass = EquatSkyMapConfig
60 """Construct a EquatSkyMap 62 @param[in] config: an instance of self.ConfigClass; if None the default config is used 64 BaseSkyMap.__init__(self, config)
66 decRange = tuple(afwGeom.Angle(dr, afwGeom.degrees)
for dr
in self.
config.decRange)
67 midDec = (decRange[0] + decRange[1]) / 2.0
68 tractWidthRA = afwGeom.Angle(360.0 / self.
config.numTracts, afwGeom.degrees)
69 tractOverlap = afwGeom.Angle(self.
config.tractOverlap, afwGeom.degrees)
71 for id
in range(self.
config.numTracts):
72 begRA = tractWidthRA * id
73 endRA = begRA + tractWidthRA
75 afwGeom.SpherePoint(begRA, decRange[0]),
76 afwGeom.SpherePoint(endRA, decRange[0]),
77 afwGeom.SpherePoint(endRA, decRange[1]),
78 afwGeom.SpherePoint(begRA, decRange[1]),
81 midRA = begRA + tractWidthRA / 2.0
82 ctrCoord = afwGeom.SpherePoint(midRA, midDec)
85 crValCoord = afwGeom.SpherePoint(midRA, afwGeom.Angle(0.0))
88 wcs = self.
_wcsFactory.makeWcs(crPixPos=afwGeom.Point2D(0, 0), crValCoord=crValCoord)
92 patchInnerDimensions=self.
config.patchInnerDimensions,
93 patchBorder=self.
config.patchBorder,
95 vertexCoordList=vertexCoordList,
96 tractOverlap=tractOverlap,
103 @return a dict containing: 104 - version: a pair of ints 115 @param[in] stateDict: a dict containing: 116 - version: a pair of ints 119 version = stateDict[
"version"]
120 if version >= (2, 0):
121 raise RuntimeError(
"Version = %s >= (2,0); cannot unpickle" % (version,))
125 """Return version (e.g. for pickle) 127 @return version as a pair of integers 132 """Add subclass-specific state or configuration options to the SHA1.""" 133 sha1.update(struct.pack(
"<i2d", self.
config.numTracts, *self.
config.decRange))
def updateSha1(self, sha1)
def __init__(self, config=None)
def __setstate__(self, stateDict)
def __init__(self, config=None)