23__all__ = [
"DiscreteSkyMapConfig",
"DiscreteSkyMap"]
29from .cachingSkyMap
import CachingSkyMap
30from .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."""
76 radius*geom.degrees, self.
configconfig.tractOverlap*geom.degrees, wcs)
79 """Add subclass-specific state or configuration options to the SHA1."""
82 sha1.update(struct.pack(fmt, *self.
configconfig.decList))
83 sha1.update(struct.pack(fmt, *self.
configconfig.radiusList))
__init__(self, config, version=0)
generateTract(self, index)