26 from .baseSkyMap
import BaseSkyMap
27 from .tractInfo
import TractInfo
29 __all__ = [
'EquatSkyMapConfig',
'EquatSkyMap']
33 numTracts = pexConfig.Field(
34 doc=
"number of tracts; warning: TAN projection requires at least 3",
38 decRange = pexConfig.ListField(
39 doc=
"range of declination (deg)",
42 default=(-1.25, 1.25),
50 """Equatorial sky map pixelization, e.g. for SDSS stripe 82 image data. 52 EquatSkyMap represents an equatorial band of sky divided along declination into overlapping tracts. 54 ConfigClass = EquatSkyMapConfig
58 """Construct a EquatSkyMap 60 @param[in] config: an instance of self.ConfigClass; if None the default config is used 62 BaseSkyMap.__init__(self, config)
64 decRange = tuple(afwGeom.Angle(dr, afwGeom.degrees)
for dr
in self.
config.decRange)
65 midDec = (decRange[0] + decRange[1]) / 2.0
66 tractWidthRA = afwGeom.Angle(360.0 / self.
config.numTracts, afwGeom.degrees)
67 tractOverlap = afwGeom.Angle(self.
config.tractOverlap, afwGeom.degrees)
69 for id
in range(self.
config.numTracts):
70 begRA = tractWidthRA * id
71 endRA = begRA + tractWidthRA
73 afwGeom.SpherePoint(begRA, decRange[0]),
74 afwGeom.SpherePoint(endRA, decRange[0]),
75 afwGeom.SpherePoint(endRA, decRange[1]),
76 afwGeom.SpherePoint(begRA, decRange[1]),
79 midRA = begRA + tractWidthRA / 2.0
80 ctrCoord = afwGeom.SpherePoint(midRA, midDec)
83 crValCoord = afwGeom.SpherePoint(midRA, afwGeom.Angle(0.0))
86 wcs = self.
_wcsFactory.makeWcs(crPixPos=afwGeom.Point2D(0, 0), crValCoord=crValCoord)
90 patchInnerDimensions=self.
config.patchInnerDimensions,
91 patchBorder=self.
config.patchBorder,
93 vertexCoordList=vertexCoordList,
94 tractOverlap=tractOverlap,
101 @return a dict containing: 102 - version: a pair of ints 113 @param[in] stateDict: a dict containing: 114 - version: a pair of ints 117 version = stateDict[
"version"]
118 if version >= (2, 0):
119 raise RuntimeError(
"Version = %s >= (2,0); cannot unpickle" % (version,))
123 """Return version (e.g. for pickle) 125 @return version as a pair of integers 130 """Add subclass-specific state or configuration options to the SHA1.""" 131 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)