23 __all__ = [
"DiscreteSkyMap"]
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))
def __init__(self, config, version=0)
def generateTract(self, index)
def updateSha1(self, sha1)
def format(config, name=None, writeSourceLine=True, prefix="", verbose=False)
std::shared_ptr< afw::geom::SkyWcs > makeWcs(SipForwardTransform const &sipForward, SipReverseTransform const &sipReverse, geom::SpherePoint const &skyOrigin)
Create a new TAN SIP Wcs from a pair of SIP transforms and the sky origin.
Point in an unspecified spherical coordinate system.