lsst.meas.base gdd9490a0bf+839504dd15
Loading...
Searching...
No Matches
lsst.meas.base.plugins.VariancePlugin Class Reference
Inheritance diagram for lsst.meas.base.plugins.VariancePlugin:
lsst.meas.base.wrappers.GenericPlugin lsst.meas.base.pluginsBase.BasePlugin

Public Member Functions

 getExecutionOrder (cls)
 
 __init__ (self, config, name, schema, metadata)
 
 measure (self, measRecord, exposure, center)
 
 fail (self, measRecord, error=None)
 

Public Attributes

 varValue = schema.addField(name + '_value', type="D", doc="Variance at object position")
 
 emptyFootprintFlag
 

Static Public Attributes

 ConfigClass = VarianceConfig
 
int FAILURE_BAD_CENTROID = 1
 
int FAILURE_EMPTY_FOOTPRINT = 2
 

Detailed Description

Compute the median variance corresponding to a footprint.

The aim here is to measure the background variance, rather than that of
the object itself. In order to achieve this, the variance is calculated
over an area scaled up from the shape of the input footprint.

Parameters
----------
config : `VarianceConfig`
    Plugin configuraion.
name : `str`
    Plugin name.
schema : `lsst.afw.table.Schema`
    The schema for the measurement output catalog. New fields will be
    added to hold measurements produced by this plugin.
metadata : `lsst.daf.base.PropertySet`
    Plugin metadata that will be attached to the output catalog

Definition at line 241 of file plugins.py.

Constructor & Destructor Documentation

◆ __init__()

lsst.meas.base.plugins.VariancePlugin.__init__ ( self,
config,
name,
schema,
metadata )

Reimplemented from lsst.meas.base.wrappers.GenericPlugin.

Definition at line 275 of file plugins.py.

Member Function Documentation

◆ fail()

lsst.meas.base.plugins.VariancePlugin.fail ( self,
measRecord,
error = None )
Record a measurement failure.

This default implementation simply records the failure in the source
record.

Parameters
----------
measRecord : `lsst.afw.table.SourceRecord`
    Catalog record for the source being measured.
error : `Exception`
    Error causing failure, or `None`.

Reimplemented from lsst.meas.base.wrappers.GenericPlugin.

Definition at line 314 of file plugins.py.

◆ getExecutionOrder()

lsst.meas.base.plugins.VariancePlugin.getExecutionOrder ( cls)
Get the relative execution order of this plugin.

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

Reimplemented from lsst.meas.base.wrappers.GenericPlugin.

Definition at line 272 of file plugins.py.

◆ measure()

lsst.meas.base.plugins.VariancePlugin.measure ( self,
measRecord,
exposure,
center )
Measure a single source.

It is the responsibility of this method to perform the desired
measurement and record the result in the `measRecord`.

Parameters
----------
measRecord : `lsst.afw.table.SourceRecord`
    Catalog record for the source being measured.
exposure : `lsst.afw.image.Exposure`
    Exposure on which the source is being measured.
center : `lsst.geom.Point2D`
    Pixel coordinates of the object.

Raises
------
MeasurementError
    Raised if the measurement fails for a known/justifiable reason.

Reimplemented from lsst.meas.base.wrappers.GenericPlugin.

Definition at line 286 of file plugins.py.

Member Data Documentation

◆ ConfigClass

lsst.meas.base.plugins.VariancePlugin.ConfigClass = VarianceConfig
static

Definition at line 261 of file plugins.py.

◆ emptyFootprintFlag

lsst.meas.base.plugins.VariancePlugin.emptyFootprintFlag
Initial value:
= schema.addField(name + '_flag_emptyFootprint', type="Flag",
doc="Set to True when the footprint has no usable pixels")

Definition at line 278 of file plugins.py.

◆ FAILURE_BAD_CENTROID

lsst.meas.base.plugins.VariancePlugin.FAILURE_BAD_CENTROID = 1
static

Definition at line 263 of file plugins.py.

◆ FAILURE_EMPTY_FOOTPRINT

lsst.meas.base.plugins.VariancePlugin.FAILURE_EMPTY_FOOTPRINT = 2
static

Definition at line 267 of file plugins.py.

◆ varValue

lsst.meas.base.plugins.VariancePlugin.varValue = schema.addField(name + '_value', type="D", doc="Variance at object position")

Definition at line 277 of file plugins.py.


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