Coverage for tests/test_coord.py : 43%

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 2012-2016 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/>. #
"""Testing basic coordinate calculations."""
self.simpleRa = np.deg2rad([15, 25]) self.simpleDec = np.deg2rad([30, 45]) self.zeroDec = np.zeros_like(self.simpleRa)
self.wrapRa = [359.9999, 0.0001, -0.1, +0.1] self.wrapDec = [1, 0, -1, 0]
self.simpleRms = [0.1, 0.2, 0.05] self.annulus = [1, 2] self.magrange = [20, 25]
pass
meanRa, meanDec = util.averageRaDec(self.simpleRa, self.zeroDec) assert_allclose([20, 0], np.rad2deg([meanRa, meanDec]))
meanRa, meanDec = util.averageRaDec(self.simpleRa, self.simpleDec) assert_allclose([19.493625, 37.60447], np.rad2deg([meanRa, meanDec]))
lsst.utils.tests.init()
lsst.utils.tests.init() unittest.main() |