ClassificationDipolePlugin

class lsst.ip.diffim.ClassificationDipolePlugin(config, name, schema, metadata)

Bases: lsst.meas.base.sfm.SingleFramePlugin

A plugin to classify whether a diaSource is a dipole.

Attributes Summary

APCORR_ORDER
CENTROID_ORDER
DEFAULT_CATALOGCALCULATION
FLUX_ORDER
SHAPE_ORDER
registry

Methods Summary

fail(measRecord[, error]) !
getExecutionOrder() Sets the relative order of plugins (smaller numbers run first).
getLogName()
getTransformClass() !
measure(measRecord, exposure) !
measureN(measCat, exposure) !

Attributes Documentation

APCORR_ORDER = 3.0
CENTROID_ORDER = 0.0
DEFAULT_CATALOGCALCULATION = 4.0
FLUX_ORDER = 2.0
SHAPE_ORDER = 1.0
registry = <lsst.meas.base.pluginRegistry.PluginRegistry object>

Methods Documentation

fail(measRecord, error=None)

! Record a failure of the measure or measureN() method.

When the plugin raises an exception, framework will call fail() to allow the plugin to set its failure flag field(s). When measureN() raises an exception, fail() will be called repeatedly with all the records that were being measured.

If the exception is a MeasurementError, it will be passed as the error argument; in all other cases the error argument will be None, and the failure will be logged by the measurement framework as a warning.

classmethod getExecutionOrder()

Sets the relative order of plugins (smaller numbers run first).

In general, the following class constants should be used (other values are also allowed, but should be avoided unless they are needed): CENTROID_ORDER centroids and other algorithms that require only a Footprint

and its Peaks as input
SHAPE_ORDER shape measurements and other algorithms that require getCentroid() to return
a good centroid (in addition to a Footprint and its Peaks).
FLUX_ORDER flux algorithms that require both getShape() and getCentroid(),
in addition to a Footprint and its Peaks

DEFAULT_CATALOGCALCULATION plugins that only operate on the catalog

Must be reimplemented as a class method by concrete derived classes.

This approach was chosen instead of a full graph-based analysis of dependencies because algorithm dependencies are usually both quite simple and entirely substitutable: an algorithm that requires a centroid can typically make use of any centroid algorithms outputs. That makes it relatively easy to figure out the correct value to use for any particular algorithm.

getLogName()
static getTransformClass()

! Get the measurement transformation appropriate to this plugin.

This returns a subclass of MeasurementTransform, which may be instantiated with details of the algorithm configuration and then called with information about calibration and WCS to convert from raw measurement quantities to calibrated units. Calibrated data is then provided in a separate output table.

By default, we copy everything from the input to the output without transformation.

measure(measRecord, exposure)

! Measure the properties of a source on a single image (single-epoch image or coadd).

@param[in,out] measRecord lsst.afw.table.SourceRecord to be filled with outputs,
and from which previously-measured quantities can be retreived.
@param[in] exposure lsst.afw.image.ExposureF, containing the pixel data to
be measured and the associated Psf, Wcs, etc. All other sources in the image will have been replaced by noise according to deblender outputs.
measureN(measCat, exposure)

! Measure the properties of a group of blended sources on a single image (single-epoch image or coadd).

@param[in,out] measCat lsst.afw.table.SourceCatalog to be filled with outputs,
and from which previously-measured quantities can be retrieved, containing only the sources that should be measured together in this call.
@param[in] exposure lsst.afw.image.ExposureF, containing the pixel data to
be measured and the associated Psf, Wcs, etc. Sources not in the blended hierarchy to be measured will have been replaced with noise using deblender outputs.

Derived classes that do not implement measureN() should just inherit this disabled version. Derived classes that do implement measureN() should additionally add a bool doMeasureN config field to their config class to signal that measureN-mode is available.