Base class for testing measurement transformations.
Notes
-----
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.
Definition at line 751 of file tests.py.
def lsst.meas.base.tests.TransformTestCase.testTransform |
( |
|
self, |
|
|
|
baseNames = None |
|
) |
| |
Test the transformation on a catalog containing random data.
Parameters
----------
baseNames : iterable of `str`
Iterable of the initial parts of measurement field names.
Notes
-----
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 ``_instFlux``,
``_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 + "_instFlux"``, 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", ...)``.
Definition at line 829 of file tests.py.