lsst.meas.base g61ffd41259+4f4d0d1589
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
lsst.meas.base.tests.TransformTestCase Class Reference
Inheritance diagram for lsst.meas.base.tests.TransformTestCase:
lsst.meas.base.tests.CentroidTransformTestCase lsst.meas.base.tests.FluxTransformTestCase

Public Member Functions

 setUp (self)
 
 tearDown (self)
 
 testTransform (self, baseNames=None)
 
 testRegistration (self)
 

Public Attributes

 calexp
 
 inputCat
 
 outputCat
 

Static Public Attributes

str name = "MeasurementTransformTest"
 
 controlClass = None
 
 algorithmClass = None
 
 transformClass = None
 
tuple flagNames = ("flag",)
 
tuple singleFramePlugins = ()
 
tuple forcedPlugins = ()
 

Protected Member Functions

 _populateCatalog (self, baseNames)
 
 _checkOutput (self, baseNames)
 
 _runTransform (self, doExtend=True)
 
 _checkRegisteredTransform (self, registry, name)
 

Protected Attributes

 _runTransform
 

Detailed Description

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 765 of file tests.py.

Member Function Documentation

◆ _checkOutput()

lsst.meas.base.tests.TransformTestCase._checkOutput (   self,
  baseNames 
)
protected

Definition at line 827 of file tests.py.

◆ _checkRegisteredTransform()

lsst.meas.base.tests.TransformTestCase._checkRegisteredTransform (   self,
  registry,
  name 
)
protected

Definition at line 876 of file tests.py.

◆ _populateCatalog()

lsst.meas.base.tests.TransformTestCase._populateCatalog (   self,
  baseNames 
)
protected

Definition at line 817 of file tests.py.

◆ _runTransform()

lsst.meas.base.tests.TransformTestCase._runTransform (   self,
  doExtend = True 
)
protected

Definition at line 838 of file tests.py.

◆ setUp()

lsst.meas.base.tests.TransformTestCase.setUp (   self)

Definition at line 805 of file tests.py.

◆ tearDown()

lsst.meas.base.tests.TransformTestCase.tearDown (   self)

Definition at line 810 of file tests.py.

◆ testRegistration()

lsst.meas.base.tests.TransformTestCase.testRegistration (   self)
Test that the transformation is appropriately registered.

Definition at line 881 of file tests.py.

◆ testTransform()

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 843 of file tests.py.

Member Data Documentation

◆ _runTransform

lsst.meas.base.tests.TransformTestCase._runTransform
protected

Definition at line 872 of file tests.py.

◆ algorithmClass

lsst.meas.base.tests.TransformTestCase.algorithmClass = None
static

Definition at line 792 of file tests.py.

◆ calexp

lsst.meas.base.tests.TransformTestCase.calexp

Definition at line 807 of file tests.py.

◆ controlClass

lsst.meas.base.tests.TransformTestCase.controlClass = None
static

Definition at line 791 of file tests.py.

◆ flagNames

tuple lsst.meas.base.tests.TransformTestCase.flagNames = ("flag",)
static

Definition at line 795 of file tests.py.

◆ forcedPlugins

tuple lsst.meas.base.tests.TransformTestCase.forcedPlugins = ()
static

Definition at line 803 of file tests.py.

◆ inputCat

lsst.meas.base.tests.TransformTestCase.inputCat

Definition at line 828 of file tests.py.

◆ name

str lsst.meas.base.tests.TransformTestCase.name = "MeasurementTransformTest"
static

Definition at line 780 of file tests.py.

◆ outputCat

lsst.meas.base.tests.TransformTestCase.outputCat

Definition at line 828 of file tests.py.

◆ singleFramePlugins

tuple lsst.meas.base.tests.TransformTestCase.singleFramePlugins = ()
static

Definition at line 802 of file tests.py.

◆ transformClass

lsst.meas.base.tests.TransformTestCase.transformClass = None
static

Definition at line 793 of file tests.py.


The documentation for this class was generated from the following file: