lsst.meas.base  16.0-17-g7e0e4ff+11
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
lsst.meas.base.baseMeasurement.BaseMeasurementTask Class Reference

Ultimate base class for all measurement tasks. More...

Inheritance diagram for lsst.meas.base.baseMeasurement.BaseMeasurementTask:
lsst.meas.base.forcedMeasurement.ForcedMeasurementTask lsst.meas.base.sfm.SingleFrameMeasurementTask

Public Member Functions

def __init__ (self, algMetadata=None, kwds)
 Constructor; only called by derived classes. More...
 
def getPluginLogName (self, pluginName)
 
def initializePlugins (self, kwds)
 
def callMeasure (self, measRecord, args, kwds)
 Call the measure() method on all plugins, handling exceptions in a consistent way. More...
 
def doMeasurement (self, plugin, measRecord, args, kwds)
 Call the measure() method on the nominated plugin, handling exceptions in a consistent way. More...
 
def callMeasureN (self, measCat, args, kwds)
 Call the measureN() method on all plugins, handling exceptions in a consistent way. More...
 
def doMeasurementN (self, plugin, measCat, args, kwds)
 Call the measureN() method on the nominated plugin, handling exceptions in a consistent way. More...
 

Public Attributes

 plugins
 
 undeblendedPlugins
 
 algMetadata
 

Static Public Attributes

 ConfigClass = BaseMeasurementConfig
 

Detailed Description

Ultimate base class for all measurement tasks.

This base class for SingleFrameMeasurementTask and ForcedMeasurementTask mostly exists to share code between the two, and generally should not be used directly.

Definition at line 182 of file baseMeasurement.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.meas.base.baseMeasurement.BaseMeasurementTask.__init__ (   self,
  algMetadata = None,
  kwds 
)

Constructor; only called by derived classes.

Parameters
[in]algMetadataAn lsst.daf.base.PropertyList that will be filled with metadata about the plugins being run. If None, an empty PropertyList will be created.
[in]**kwdsAdditional arguments passed to lsst.pipe.base.Task.__init__.

This attaches two public attributes to the class for use by derived classes and parent tasks:

  • plugins: an empty PluginMap, which will eventually contain all active plugins that will by invoked by the run() method (to be filled by subclasses). This should be considered read-only.
  • algMetadata: a lsst.daf.base.PropertyList that will contain additional information about the active plugins to be saved with the output catalog (to be filled by subclasses).

Definition at line 193 of file baseMeasurement.py.

Member Function Documentation

◆ callMeasure()

def lsst.meas.base.baseMeasurement.BaseMeasurementTask.callMeasure (   self,
  measRecord,
  args,
  kwds 
)

Call the measure() method on all plugins, handling exceptions in a consistent way.

Parameters
[in,out]measRecordlsst.afw.table.SourceRecord that corresponds to the object being measured, and where outputs should be written.
[in]*argsPositional arguments forwarded to Plugin.measure()
[in]**kwdsKeyword arguments. Two are handled locally:
  • beginOrder: beginning execution order (inclusive): measurements with executionOrder < beginOrder are not executed. None for no limit.
  • endOrder: ending execution order (exclusive): measurements with executionOrder >= endOrder are not executed. None for no limit. the rest are forwarded to Plugin.measure()

This method can be used with plugins that have different signatures; the only requirement is that 'measRecord' be the first argument. Subsequent positional arguments and keyword arguments are forwarded directly to the plugin.

This method should be considered "protected"; it is intended for use by derived classes, not users.

Definition at line 256 of file baseMeasurement.py.

◆ callMeasureN()

def lsst.meas.base.baseMeasurement.BaseMeasurementTask.callMeasureN (   self,
  measCat,
  args,
  kwds 
)

Call the measureN() method on all plugins, handling exceptions in a consistent way.

Parameters
[in,out]measCatlsst.afw.table.SourceCatalog containing records for just the source family to be measured, and where outputs should be written.
[in]beginOrderbeginning execution order (inclusive): measurements with executionOrder < beginOrder are not executed. None for no limit.
[in]endOrderending execution order (exclusive): measurements with executionOrder >= endOrder are not executed. None for no limit.
[in]*argsPositional arguments forwarded to Plugin.measure()
[in]**kwdsKeyword arguments. Two are handled locally:
  • beginOrder: beginning execution order (inclusive): measurements with executionOrder < beginOrder are not executed. None for no limit.
  • endOrder: ending execution order (exclusive): measurements with executionOrder >= endOrder are not executed. None for no limit. the rest are forwarded to Plugin.measure()

This method can be used with plugins that have different signatures; the only requirement is that 'measRecord' be the first argument. Subsequent positional arguments and keyword arguments are forwarded directly to the plugin.

This method should be considered "protected"; it is intended for use by derived classes, not users.

Definition at line 316 of file baseMeasurement.py.

◆ doMeasurement()

def lsst.meas.base.baseMeasurement.BaseMeasurementTask.doMeasurement (   self,
  plugin,
  measRecord,
  args,
  kwds 
)

Call the measure() method on the nominated plugin, handling exceptions in a consistent way.

Parameters
[in]pluginPlugin that will measure
[in,out]measRecordlsst.afw.table.SourceRecord that corresponds to the object being measured, and where outputs should be written.
[in]*argsPositional arguments forwarded to plugin.measure()
[in]**kwdsKeyword arguments forwarded to plugin.measure()

This method can be used with plugins that have different signatures; the only requirement is that the 'plugin' and 'measRecord' be the first two arguments. Subsequent positional arguments and keyword arguments are forwarded directly to the plugin.

This method should be considered "protected"; it is intended for use by derived classes, not users.

Definition at line 285 of file baseMeasurement.py.

◆ doMeasurementN()

def lsst.meas.base.baseMeasurement.BaseMeasurementTask.doMeasurementN (   self,
  plugin,
  measCat,
  args,
  kwds 
)

Call the measureN() method on the nominated plugin, handling exceptions in a consistent way.

Parameters
[in]pluginPlugin that will measure
[in,out]measCatlsst.afw.table.SourceCatalog containing records for just the source family to be measured, and where outputs should be written.
[in]*argsPositional arguments forwarded to plugin.measureN()
[in]**kwdsKeyword arguments forwarded to plugin.measureN()

This method can be used with plugins that have different signatures; the only requirement is that the 'plugin' and 'measCat' be the first two arguments. Subsequent positional arguments and keyword arguments are forwarded directly to the plugin.

This method should be considered "protected"; it is intended for use by derived classes, not users.

Definition at line 350 of file baseMeasurement.py.

◆ getPluginLogName()

def lsst.meas.base.baseMeasurement.BaseMeasurementTask.getPluginLogName (   self,
  pluginName 
)

Definition at line 215 of file baseMeasurement.py.

◆ initializePlugins()

def lsst.meas.base.baseMeasurement.BaseMeasurementTask.initializePlugins (   self,
  kwds 
)
Initialize the plugins (and slots) according to the configuration.

Derived class constructors should call this method to fill the self.plugins
attribute and add correspond output fields and slot aliases to the output schema.

In addition to the attributes added by BaseMeasurementTask.__init__, a self.schema
attribute holding the output schema must also be present before this method is called, .

Keyword arguments are forwarded directly to plugin constructors, allowing derived
classes to use plugins with different signatures.

Definition at line 218 of file baseMeasurement.py.

Member Data Documentation

◆ algMetadata

lsst.meas.base.baseMeasurement.BaseMeasurementTask.algMetadata

Definition at line 213 of file baseMeasurement.py.

◆ ConfigClass

lsst.meas.base.baseMeasurement.BaseMeasurementTask.ConfigClass = BaseMeasurementConfig
static

Definition at line 190 of file baseMeasurement.py.

◆ plugins

lsst.meas.base.baseMeasurement.BaseMeasurementTask.plugins

Definition at line 209 of file baseMeasurement.py.

◆ undeblendedPlugins

lsst.meas.base.baseMeasurement.BaseMeasurementTask.undeblendedPlugins

Definition at line 210 of file baseMeasurement.py.


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