BaseMeasurementTask#
- class lsst.meas.base.BaseMeasurementTask(algMetadata=None, **kwds)#
Bases:
SimpleBaseMeasurementTaskUltimate base class for all measurement tasks other than SimpleForcedMeasurementTask.
Parameters#
- algMetadata
lsst.daf.base.PropertyListorNone Will be modified in-place to contain metadata about the plugins being run. If
None, an emptyPropertyListwill be created.- **kwds
Additional arguments passed to
lsst.pipe.base.Task.__init__.
Notes#
This base class for
SingleFrameMeasurementTaskandForcedMeasurementTaskmostly exists to share code between the two, and generally should not be used directly.Attributes Summary
Name by which the noise exposire ID is recorded in metadata ('str').
Name by which the noise offset is recorded in metadata ('str').
Name by which the noise seed multiplier is recorded in metadata ('str').
Name by which the noise source is recorded in metadata ('str').
Methods Summary
getFootprintsFromCatalog(catalog)Get a set of footprints from a catalog, keyed by id.
initNoiseReplacer(exposure, measCat, footprints)Replace all pixels in the exposure covered by the footprint of
measRecordwith noise.initializePlugins(**kwds)Initialize plugins (and slots) according to configuration.
Attributes Documentation
- NOISE_EXPOSURE_ID = 'NOISE_EXPOSURE_ID'#
Name by which the noise exposire ID is recorded in metadata (‘str’).
- NOISE_OFFSET = 'NOISE_OFFSET'#
Name by which the noise offset is recorded in metadata (‘str’).
- NOISE_SEED_MULTIPLIER = 'NOISE_SEED_MULTIPLIER'#
Name by which the noise seed multiplier is recorded in metadata (‘str’).
- NOISE_SOURCE = 'NOISE_SOURCE'#
Name by which the noise source is recorded in metadata (‘str’).
Methods Documentation
- static getFootprintsFromCatalog(catalog)#
Get a set of footprints from a catalog, keyed by id.
Parameters#
- catalog
lsst.afw.table.SourceCatalog Catalog with `lsst.afw.detection.Footprint`s attached.
Returns#
- footprints
dict[int: (int,lsst.afw.detection.Footprint)] Dictionary of footprint, keyed by id number, with a tuple of the parent id and footprint.
- catalog
- initNoiseReplacer(exposure, measCat, footprints, exposureId=None, noiseImage=None)#
Replace all pixels in the exposure covered by the footprint of
measRecordwith noise.Parameters#
- exposure
lsst.afw.image.Exposure Exposure in which to replace pixels.
- measCat
lsst.afw.table.SourceCatalog Catalog that will be measured.t
- footprints
dict[int: (int,lsst.afw.detection.Footprint)] Dictionary of footprints, keyed by id number, with a tuple of the parent id and footprint.
- exposureId
int, optional Unique identifier for the exposure.
- noiseImage
lsst.afw.image.ImageorNone, optional Image from which to draw noise pixels. If
None, noise will be drawn from the input exposure.
- exposure
- initializePlugins(**kwds)#
Initialize plugins (and slots) according to configuration.
Parameters#
- **kwds
Keyword arguments forwarded directly to plugin constructors.
Notes#
Derived class constructors should call this method to fill the
pluginsattribute and add corresponding output fields and slot aliases to the output schema.In addition to the attributes added by
BaseMeasurementTask.__init__, aschema`attribute holding the output schema must be present before this method is called.Keyword arguments are forwarded directly to plugin constructors, allowing derived classes to use plugins with different signatures.
- algMetadata