LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
|
A subtask for measuring the properties of sources on a single exposure, using an existing "reference" catalog to constrain some aspects of the measurement. More...
Public Member Functions | |
def | __init__ |
Initialize the task. More... | |
def | run |
Perform forced measurement. More... | |
def | generateMeasCat |
Initialize an output SourceCatalog using information from the reference catalog. More... | |
def | attachTransformedFootprints |
Default implementation for attaching Footprints to blank sources prior to measurement. More... | |
Public Attributes | |
mapper | |
schema | |
Static Public Attributes | |
ConfigClass = ForcedMeasurementConfig | |
A subtask for measuring the properties of sources on a single exposure, using an existing "reference" catalog to constrain some aspects of the measurement.
The task is configured with a list of "plugins": each plugin defines the values it measures (i.e. the columns in a table it will fill) and conducts that measurement on each detected source (see ForcedPlugin). The job of the measurement task is to initialize the set of plugins (which includes setting up the catalog schema) from their configuration, and then invoke each plugin on each source.
Most of the time, ForcedMeasurementTask will be used via one of the subclasses of ForcedPhotImageTask, ForcedPhotCcdTask and ForcedPhotCoaddTask. These combine this measurement subtask with a "references" subtask (see BaseReferencesTask and CoaddSrcReferencesTask) to perform forced measurement using measurements performed on another image as the references. There is generally little reason to use ForcedMeasurementTask outside of one of these drivers, unless it is necessary to avoid using the Butler for I/O.
ForcedMeasurementTask has only three methods: init(), run(), and generateMeasCat(). For configuration options, see SingleFrameMeasurementConfig.
Definition at line 175 of file forcedMeasurement.py.
def lsst.meas.base.forcedMeasurement.ForcedMeasurementTask.__init__ | ( | self, | |
refSchema, | |||
algMetadata = None , |
|||
kwds | |||
) |
Initialize the task.
Set up the execution order of the plugins and initialize the plugins, giving each plugin an opportunity to add its measurement fields to the output schema and to record information in the task metadata.
Note that while SingleFrameMeasurementTask is passed an initial Schema that is appended to in order to create the output Schema, ForcedMeasurementTask is initialized with the Schema of the reference catalog, from which a new Schema for the output catalog is created. Fields to be copied directly from the reference Schema are added before Plugin fields are added.
[in] | refSchema | Schema of the reference catalog. Must match the catalog later passed to generateMeasCat() and/or run(). |
[in,out] | algMetadata | lsst.daf.base.PropertyList used to record information about each algorithm. An empty PropertyList will be created if None. |
[in] | **kwds | Keyword arguments passed from lsst.pipe.base.Task.__init__ |
Definition at line 204 of file forcedMeasurement.py.
def lsst.meas.base.forcedMeasurement.ForcedMeasurementTask.attachTransformedFootprints | ( | self, | |
sources, | |||
refCat, | |||
exposure, | |||
refWcs | |||
) |
Default implementation for attaching Footprints to blank sources prior to measurement.
Footprints for forced photometry must be in the pixel coordinate system of the image being measured, while the actual detections may start out in a different coordinate system. This default implementation transforms the Footprints from the reference catalog from the refWcs to the exposure's Wcs, which downgrades HeavyFootprints into regular Footprints, destroying deblend information.
Note that ForcedPhotImageTask delegates to this method in its own attachFootprints method. attachFootprints can then be overridden by its subclasses to define how their Footprints should be generated.
See the documentation for run() for information about the relationships between run(), generateMeasCat(), and attachTransformedFootprints().
Definition at line 364 of file forcedMeasurement.py.
def lsst.meas.base.forcedMeasurement.ForcedMeasurementTask.generateMeasCat | ( | self, | |
exposure, | |||
refCat, | |||
refWcs, | |||
idFactory = None |
|||
) |
Initialize an output SourceCatalog using information from the reference catalog.
This generates a new blank SourceRecord for each record in refCat. Note that this method does not attach any Footprints. Doing so is up to the caller (who may call attachedTransformedFootprints or define their own method - see run() for more information).
[in] | exposure | Exposure to be measured |
[in] | refCat | Sequence (not necessarily a SourceCatalog) of reference SourceRecords. |
[in] | refWcs | Wcs that defines the X,Y coordinate system of refCat |
[in] | idFactory | factory for creating IDs for sources |
Definition at line 337 of file forcedMeasurement.py.
def lsst.meas.base.forcedMeasurement.ForcedMeasurementTask.run | ( | self, | |
measCat, | |||
exposure, | |||
refCat, | |||
refWcs, | |||
exposureId = None , |
|||
beginOrder = None , |
|||
endOrder = None , |
|||
allowApCorr = True |
|||
) |
Perform forced measurement.
[in] | exposure | lsst.afw.image.ExposureF to be measured; must have at least a Wcs attached. |
[in] | measCat | Source catalog for measurement results; must be initialized with empty records already corresponding to those in refCat (via e.g. generateMeasCat). |
[in] | refCat | A sequence of SourceRecord objects that provide reference information for the measurement. These will be passed to each Plugin in addition to the output SourceRecord. |
[in] | refWcs | Wcs that defines the X,Y coordinate system of refCat |
[in] | exposureId | optional unique exposureId used to calculate random number generator seed in the NoiseReplacer. |
[in] | beginOrder | beginning execution order (inclusive): measurements with executionOrder < beginOrder are not executed. None for no limit. |
[in] | endOrder | ending execution order (exclusive): measurements with executionOrder >= endOrder are not executed. None for no limit. |
[in] | allowApCorr | allow application of aperture correction? |
Fills the initial empty SourceCatalog with forced measurement results. Two steps must occur before run() can be called:
Definition at line 235 of file forcedMeasurement.py.
|
static |
Definition at line 202 of file forcedMeasurement.py.
lsst.meas.base.forcedMeasurement.ForcedMeasurementTask.mapper |
Definition at line 223 of file forcedMeasurement.py.
lsst.meas.base.forcedMeasurement.ForcedMeasurementTask.schema |
Definition at line 231 of file forcedMeasurement.py.