LSST Applications g0265f82a02+0e5473021a,g02d81e74bb+0dd8ce4237,g1470d8bcf6+3ea6592b6f,g2079a07aa2+86d27d4dc4,g2305ad1205+5ca4c0b359,g295015adf3+d10818ec9d,g2a9a014e59+6f9be1b9cd,g2bbee38e9b+0e5473021a,g337abbeb29+0e5473021a,g3ddfee87b4+703ba97ebf,g487adcacf7+4fa16da234,g50ff169b8f+96c6868917,g52b1c1532d+585e252eca,g591dd9f2cf+ffa42b374e,g5a732f18d5+53520f316c,g64a986408d+0dd8ce4237,g858d7b2824+0dd8ce4237,g8a8a8dda67+585e252eca,g99cad8db69+d39438377f,g9ddcbc5298+9a081db1e4,ga1e77700b3+15fc3df1f7,ga8c6da7877+f1d96605c8,gb0e22166c9+60f28cb32d,gb6a65358fc+0e5473021a,gba4ed39666+c2a2e4ac27,gbb8dafda3b+e5339d463f,gc120e1dc64+da31e9920e,gc28159a63d+0e5473021a,gcf0d15dbbd+703ba97ebf,gdaeeff99f8+f9a426f77a,ge6526c86ff+889fc9d533,ge79ae78c31+0e5473021a,gee10cc3b42+585e252eca,gf18bd8381d+7268b93478,gff1a9f87cc+0dd8ce4237,w.2024.16
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
lsst.meas.base.plugins.SingleFrameFPPositionPlugin Class Reference
Inheritance diagram for lsst.meas.base.plugins.SingleFrameFPPositionPlugin:
lsst.meas.base.sfm.SingleFramePlugin lsst.meas.base.baseMeasurement.BaseMeasurementPlugin lsst.meas.base.pluginsBase.BasePlugin

Public Member Functions

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

Public Attributes

 focalValue
 
 focalFlag
 
 detectorFlag
 

Static Public Attributes

 ConfigClass = SingleFrameFPPositionConfig
 

Detailed Description

Algorithm to calculate the position of a centroid on the focal plane.

Parameters
----------
config : `SingleFrameFPPositionConfig`
    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 129 of file plugins.py.

Constructor & Destructor Documentation

◆ __init__()

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

Reimplemented from lsst.meas.base.sfm.SingleFramePlugin.

Definition at line 151 of file plugins.py.

151 def __init__(self, config, name, schema, metadata):
152 SingleFramePlugin.__init__(self, config, name, schema, metadata)
153 self.focalValue = lsst.afw.table.Point2DKey.addFields(schema, name, "Position on the focal plane",
154 "mm")
155 self.focalFlag = schema.addField(name + "_flag", type="Flag", doc="Set to True for any fatal failure")
156 self.detectorFlag = schema.addField(name + "_missingDetector_flag", type="Flag",
157 doc="Set to True if detector object is missing")
158

Member Function Documentation

◆ fail()

lsst.meas.base.plugins.SingleFrameFPPositionPlugin.fail ( self,
measRecord,
error = None )
Record a failure of the `measure` or `measureN` method.

Parameters
----------
measRecord : `lsst.afw.table.SourceRecord`
    Table record describing the source being measured.
error : `MeasurementError`, optional
    Only provided if the measurement failed due to a
    `MeasurementError` being raised; otherwise, will be `None`.

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

If the exception is an `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.

Reimplemented from lsst.meas.base.pluginsBase.BasePlugin.

Definition at line 169 of file plugins.py.

169 def fail(self, measRecord, error=None):
170 measRecord.set(self.focalFlag, True)
171
172

◆ getExecutionOrder()

lsst.meas.base.plugins.SingleFrameFPPositionPlugin.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.pluginsBase.BasePlugin.

Definition at line 148 of file plugins.py.

148 def getExecutionOrder(cls):
149 return cls.SHAPE_ORDER
150

◆ measure()

lsst.meas.base.plugins.SingleFrameFPPositionPlugin.measure ( self,
measRecord,
exposure )
Measure the properties of a source on a single image.

The image may be from a single epoch, or it may be a coadd.

Parameters
----------
measRecord : `lsst.afw.table.SourceRecord`
    Record describing the object being measured. Previously-measured
    quantities may be retrieved from here, and it will be updated
    in-place tih the outputs of this plugin.
exposure : `lsst.afw.image.ExposureF`
    The pixel data to be measured, together with the associated PSF,
    WCS, etc. All other sources in the image should have been replaced
    by noise according to deblender outputs.

Reimplemented from lsst.meas.base.sfm.SingleFramePlugin.

Definition at line 159 of file plugins.py.

159 def measure(self, measRecord, exposure):
160 det = exposure.getDetector()
161 if not det:
162 measRecord.set(self.detectorFlag, True)
163 fp = lsst.geom.Point2D(np.nan, np.nan)
164 else:
165 center = measRecord.getCentroid()
166 fp = det.transform(center, lsst.afw.cameraGeom.PIXELS, lsst.afw.cameraGeom.FOCAL_PLANE)
167 measRecord.set(self.focalValue, fp)
168

Member Data Documentation

◆ ConfigClass

lsst.meas.base.plugins.SingleFrameFPPositionPlugin.ConfigClass = SingleFrameFPPositionConfig
static

Definition at line 145 of file plugins.py.

◆ detectorFlag

lsst.meas.base.plugins.SingleFrameFPPositionPlugin.detectorFlag

Definition at line 156 of file plugins.py.

◆ focalFlag

lsst.meas.base.plugins.SingleFrameFPPositionPlugin.focalFlag

Definition at line 155 of file plugins.py.

◆ focalValue

lsst.meas.base.plugins.SingleFrameFPPositionPlugin.focalValue

Definition at line 153 of file plugins.py.


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