Coverage for python/lsst/skymap/ringsSkyMap.py : 95%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# # LSST Data Management System # Copyright 2008, 2009, 2010, 2012 LSST Corporation. # # This product includes software developed by the # LSST Project (http://www.lsst.org/). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the LSST License Statement and # the GNU General Public License along with this program. If not, # see <http://www.lsstcorp.org/LegalNotices/>. #
"""Configuration for the RingsSkyMap""" check=lambda x: x >= 0.0 and x < 360.0)
"""Rings sky map pixelization.
We divide the sphere into N rings of Declination, plus the two polar caps, which sets the size of the individual tracts. The rings are divided in RA into an integral number of tracts of this size; this division is made at the Declination closest to zero so as to ensure full overlap. """
"""Constructor
@param[in] config: an instance of self.ConfigClass; if None the default config is used @param[in] version: software version of this class, to retain compatibility with old instances """ # We count rings from south to north # Note: pole caps together count for one additional ring
"""Calculate ring indices given a numerical index of a tract
The ring indices are the ring number and the tract number within the ring.
The ring number is -1 for the south polar cap and increases to the north. The north polar cap has ring number = numRings. The tract number is zero for either of the polar caps. """
"""Generate the TractInfo for this index""" else:
0.5*self._ringSize*afwGeom.radians, self.config.tractOverlap*afwGeom.degrees, wcs)
"""Find the tract whose center is nearest the specified coord.
@param[in] coord: sky coordinate (afwCoord.Coord) @return TractInfo of tract whose center is nearest the specified coord
@warning: - if tracts do not cover the whole sky then the returned tract may not include the coord
@note - This routine will be more efficient if coord is ICRS. - 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. """
# Southern cap return self[0] # Northern cap return self[-1]
(2*math.pi/self._ringNums[ringNum]) + 0.5)
index += self._ringNums[i]
"""Find all tracts which include the specified coord.
@param[in] coord: sky coordinate (afwCoord.Coord) @return List of TractInfo of tracts which include the specified coord
@note - This routine will be more efficient if coord is ICRS. """
# ringNum denotes the closest ring to the specified coord # I will check adjacent rings which may include the specified coord (2*math.pi/self._ringNums[r]) + 0.5) # Adjacent tracts will also be checked. # Wrap over raStart
# Always check tracts at poles # Southern cap is 0, Northern cap is the last entry in self
"""Find tracts and patches that overlap a region
@param[in] coordList: list of sky coordinates (afwCoord.Coord) @return 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.
@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). """
"""Add subclass-specific state or configuration options to the SHA1.""" |