lsst.meas.base  14.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Groups Pages
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
lsst.meas.base.tests.TransformTestCase Class Reference

Base class for testing measurement transformations. More...

Inheritance diagram for lsst.meas.base.tests.TransformTestCase:
lsst.meas.base.tests.CentroidTransformTestCase lsst.meas.base.tests.FluxTransformTestCase

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 = ()
 

Detailed Description

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.

Definition at line 551 of file tests.py.

Member Function Documentation

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

Definition at line 585 of file tests.py.

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

Definition at line 590 of file tests.py.

def lsst.meas.base.tests.TransformTestCase.testRegistration (   self)
Test that the transformation is appropriately registered with the relevant measurement algorithms.

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

Member Data Documentation

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

Definition at line 572 of file tests.py.

lsst.meas.base.tests.TransformTestCase.calexp

Definition at line 587 of file tests.py.

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

Definition at line 571 of file tests.py.

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

Definition at line 577 of file tests.py.

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

Definition at line 583 of file tests.py.

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

Definition at line 568 of file tests.py.

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

Definition at line 582 of file tests.py.

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

Definition at line 573 of file tests.py.


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