lsst.meas.base g90805c0507+cad87aed87
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 751 of file tests.py.

Member Function Documentation

◆ _checkOutput()

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

Definition at line 813 of file tests.py.

◆ _checkRegisteredTransform()

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

Definition at line 862 of file tests.py.

◆ _populateCatalog()

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

Definition at line 803 of file tests.py.

◆ _runTransform()

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

Definition at line 824 of file tests.py.

◆ setUp()

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

Definition at line 791 of file tests.py.

◆ tearDown()

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

Definition at line 796 of file tests.py.

◆ testRegistration()

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

Definition at line 867 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 829 of file tests.py.

Member Data Documentation

◆ _runTransform

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

Definition at line 858 of file tests.py.

◆ algorithmClass

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

Definition at line 778 of file tests.py.

◆ calexp

lsst.meas.base.tests.TransformTestCase.calexp

Definition at line 793 of file tests.py.

◆ controlClass

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

Definition at line 777 of file tests.py.

◆ flagNames

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

Definition at line 781 of file tests.py.

◆ forcedPlugins

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

Definition at line 789 of file tests.py.

◆ inputCat

lsst.meas.base.tests.TransformTestCase.inputCat

Definition at line 814 of file tests.py.

◆ name

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

Definition at line 766 of file tests.py.

◆ outputCat

lsst.meas.base.tests.TransformTestCase.outputCat

Definition at line 814 of file tests.py.

◆ singleFramePlugins

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

Definition at line 788 of file tests.py.

◆ transformClass

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

Definition at line 779 of file tests.py.


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