23 __all__ = [
"DiscreteSkyMap"]
27 from lsst.pex.config
import ListField
29 from .cachingSkyMap
import CachingSkyMap
30 from .tractInfo
import ExplicitTractInfo
34 """Configuration for the DiscreteSkyMap"""
36 raList = ListField(dtype=float, default=[], doc=
"Right Ascensions of tracts (ICRS, degrees)")
37 decList = ListField(dtype=float, default=[], doc=
"Declinations of tracts (ICRS, degrees)")
38 radiusList = ListField(dtype=float, default=[], doc=
"Radii of tracts (degrees)")
41 super(DiscreteSkyMapConfig, self).
validate()
43 raise ValueError(
"Number of radii (%d) and RAs (%d) do not match" %
46 raise ValueError(
"Number of radii (%d) and Decs (%d) do not match" %
51 """Discrete sky map pixelization.
53 We put a square Tract at each of the nominated coordinates.
57 config : `lsst.skyMap.BaseSkyMapConfig`
58 The configuration for this SkyMap; if None use the default config.
59 version : `int` or `tuple` of `int` (optional)
60 Software version of this class, to retain compatibility with old
63 ConfigClass = DiscreteSkyMapConfig
67 numTracts = len(config.radiusList)
68 super(DiscreteSkyMap, self).
__init__(numTracts, config, version)
71 """Generate TractInfo for the specified tract index."""
73 radius = self.
config.radiusList[index]
76 radius*geom.degrees, self.
config.tractOverlap*geom.degrees, wcs)
79 """Add subclass-specific state or configuration options to the SHA1."""
81 sha1.update(struct.pack(fmt, *self.
config.raList))
82 sha1.update(struct.pack(fmt, *self.
config.decList))
83 sha1.update(struct.pack(fmt, *self.
config.radiusList))