Discrete sky map pixelization.
We put a square Tract at each of the nominated coordinates.
Parameters
----------
config : `lsst.skyMap.BaseSkyMapConfig`
The configuration for this SkyMap; if None use the default config.
version : `int` or `tuple` of `int` (optional)
Software version of this class, to retain compatibility with old
instances.
Definition at line 50 of file discreteSkyMap.py.
def lsst.skymap.cachingSkyMap.CachingSkyMap.__reduce__ |
( |
|
self | ) |
|
|
inherited |
To support pickling.
Notes
-----
**Warning:** This method assumes that the constructor is be defined:
__init__(self, config, version=defaultVersion)
The use of 'config' is effectively set by the registry mechanism.
If additional optional arguments are added, this method should be
overridden to correspond.
Definition at line 58 of file cachingSkyMap.py.
59 """To support pickling.
63 **Warning:** This method assumes that the constructor is be defined:
64 __init__(self, config, version=defaultVersion)
65 The use of 'config' is effectively set by the registry mechanism.
66 If additional optional arguments are added, this method should be
67 overridden to correspond.
69 return (self.__class__, (self.config, self._version))
def lsst.skymap.baseSkyMap.BaseSkyMap.findClosestTractPatchList |
( |
|
self, |
|
|
|
coordList |
|
) |
| |
|
inherited |
Find closest tract and patches that overlap coordinates.
Parameters
----------
coordList : `lsst.geom.SpherePoint`
List of ICRS sky coordinates to search for.
Returns
-------
retList : `list`
list of (TractInfo, list of PatchInfo) for tracts and patches
that contain, or may contain, the specified region.
The list will be empty if there is no overlap.
Definition at line 177 of file baseSkyMap.py.
177 def findClosestTractPatchList(self, coordList):
178 """Find closest tract and patches that overlap coordinates.
182 coordList : `lsst.geom.SpherePoint`
183 List of ICRS sky coordinates to search for.
188 list of (TractInfo, list of PatchInfo) for tracts and patches
189 that contain, or may contain, the specified region.
190 The list will be empty if there is no overlap.
193 for coord
in coordList:
194 tractInfo = self.findTract(coord)
195 patchList = tractInfo.findPatchList(coordList)
196 if patchList
and not (tractInfo, patchList)
in retList:
197 retList.append((tractInfo, patchList))
def lsst.skymap.baseSkyMap.BaseSkyMap.findTract |
( |
|
self, |
|
|
|
coord |
|
) |
| |
|
inherited |
Find the tract whose center is nearest the specified coord.
Parameters
----------
coord : `lsst.geom.SpherePoint`
ICRS sky coordinate to search for.
Returns
-------
result : `TractInfo`
TractInfo of tract whose center is nearest the specified coord.
Notes
-----
- If coord is equidistant between multiple sky tract centers then one
is arbitrarily chosen.
- The default implementation is not very efficient; subclasses may wish
to override.
**Warning:**
If tracts do not cover the whole sky then the returned tract may not
include the coord.
Reimplemented in lsst.skymap.ringsSkyMap.RingsSkyMap, lsst.skymap.dodecaSkyMap.DodecaSkyMap, and lsst.skymap.healpixSkyMap.HealpixSkyMap.
Definition at line 116 of file baseSkyMap.py.
116 def findTract(self, coord):
117 """Find the tract whose center is nearest the specified coord.
121 coord : `lsst.geom.SpherePoint`
122 ICRS sky coordinate to search for.
127 TractInfo of tract whose center is nearest the specified coord.
131 - If coord is equidistant between multiple sky tract centers then one
132 is arbitrarily chosen.
134 - The default implementation is not very efficient; subclasses may wish
138 If tracts do not cover the whole sky then the returned tract may not
141 distTractInfoList = []
142 for i, tractInfo
in enumerate(self):
143 angSep = coord.separation(tractInfo.getCtrCoord()).asDegrees()
145 distTractInfoList.append((angSep, i, tractInfo))
146 distTractInfoList.sort()
147 return distTractInfoList[0][2]
def lsst.skymap.baseSkyMap.BaseSkyMap.findTractPatchList |
( |
|
self, |
|
|
|
coordList |
|
) |
| |
|
inherited |
Find tracts and patches that overlap a region.
Parameters
----------
coordList : `list` of `lsst.geom.SpherePoint`
List of ICRS sky coordinates to search for.
Returns
-------
reList : `list` of (`TractInfo`, `list` of `PatchInfo`)
For tracts and patches that contain, or may contain, the specified
region. The list will be empty if there is no overlap.
Notes
-----
**warning:**
This uses a naive algorithm that may find some tracts and patches
that do not overlap the region (especially if the region is not a
rectangle aligned along patch x, y).
Reimplemented in lsst.skymap.ringsSkyMap.RingsSkyMap.
Definition at line 149 of file baseSkyMap.py.
149 def findTractPatchList(self, coordList):
150 """Find tracts and patches that overlap a region.
154 coordList : `list` of `lsst.geom.SpherePoint`
155 List of ICRS sky coordinates to search for.
159 reList : `list` of (`TractInfo`, `list` of `PatchInfo`)
160 For tracts and patches that contain, or may contain, the specified
161 region. The list will be empty if there is no overlap.
166 This uses a naive algorithm that may find some tracts and patches
167 that do not overlap the region (especially if the region is not a
168 rectangle aligned along patch x, y).
171 for tractInfo
in self:
172 patchList = tractInfo.findPatchList(coordList)
174 retList.append((tractInfo, patchList))