Coverage for tests/test_setMatchDistance.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 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/>. # # # The classes in this test are a little non-standard to reduce code # duplication and support automated unittest discovery. # A base class includes all the code that implements the testing and # itself inherits from unittest.TestCase. unittest automated discovery # will scan all classes that inherit from unittest.TestCase and invoke # any test methods found. To prevent this base class from being executed # the test methods are placed in a different class that does not inherit # from unittest.TestCase. The actual test classes then inherit from # both the testing class and the implementation class allowing test # discovery to only run tests found in the subclasses.
"""A test case for setMatchDistance
Use involves setting one class attribute: * MatchClass: match class, e.g. ReferenceMatch or SourceMatch
This test is a bit messy because it exercises two templates of MatchClass
The test creates source and reference object catalogs that intentionally have some separation in on-sky coordinates. The reference catalog is set using a uniform grid of pixel positions and a simple WCS to compute on-sky coordinates. The source catalog is created by using a distorted version of the same grid of pixel positions, which is converted to on-sky coordinates using the same WCS. """
cdMatrix=afwGeom.makeCdMatrix(scale=scale))
filterNameList=["r"], addFluxSigma=True, addIsPhotometric=True) else: raise RuntimeError("Unsupported MatchClass=%r" % (self.MatchClass,))
"""Apply func(x, y) to each source in self.sourceCat, then set coord, compute and check dist """
"""Base class implementations of testing methods.
Explicitly does not inherit from unittest.TestCase"""
"""Add no distortion"""
"""Add quadratic distortion in x"""
"""Add radial distortion"""
# The test classes inherit from two base classes and differ in the match # class being used.
lsst.utils.tests.init() unittest.main() |