LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
|
Base class for testing measurement transformations. More...
Public Member Functions | |
def | setUp |
def | tearDown |
def | testTransform |
def | testRegistration |
Public Attributes | |
calexp | |
Static Public Attributes | |
string | name = "MeasurementTransformTest" |
controlClass = None | |
algorithmClass = None | |
transformClass = None | |
tuple | flagNames = ("flag",) |
tuple | singleFramePlugins = () |
tuple | forcedPlugins = () |
Private Member Functions | |
def | _populateCatalog |
def | _checkOutput |
def | _runTransform |
def | _checkRegisteredTransform |
Base class for testing measurement transformations.
We test both that the transform itself operates successfully (fluxes are converted to magnitudes, flags are propagated properly) and that the transform is registered as the default for the appropriate measurement algorithms.
In the simple case of one-measurement-per-transformation, the developer need not directly write any tests themselves: simply customizing the class variables is all that is required. More complex measurements (e.g. multiple aperture fluxes) require extra effort.
|
private |
|
private |
|
private |
def lsst.meas.base.tests.TransformTestCase.tearDown | ( | self | ) |
def lsst.meas.base.tests.TransformTestCase.testRegistration | ( | self | ) |
Test that the transformation is appropriately registered with the relevant measurement algorithms.
Definition at line 648 of file tests.py.
def lsst.meas.base.tests.TransformTestCase.testTransform | ( | self, | |
baseNames = None |
|||
) |
Test the operation of the transformation on a catalog containing random data. We check that: * An appropriate exception is raised on an attempt to transform between catalogs with different numbers of rows; * Otherwise, all appropriate conversions are properly appled and that flags have been propagated. The `baseNames` argument requires some explanation. This should be an iterable of the leading parts of the field names for each measurement; that is, everything that appears before `_flux`, `_flag`, etc. In the simple case of a single measurement per plugin, this is simply equal to `self.name` (thus measurements are stored as `self.name + "_flux"`, etc). More generally, the developer may specify whatever iterable they require. For example, to handle multiple apertures, we could have `(self.name + "_0", self.name + "_1", ...)`. @param[in] baseNames Iterable of the initial parts of measurement field names.
Definition at line 618 of file tests.py.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |