BaseMeasurementTask#

class lsst.meas.base.BaseMeasurementTask(algMetadata=None, **kwds)#

Bases: SimpleBaseMeasurementTask

Ultimate base class for all measurement tasks other than SimpleForcedMeasurementTask.

Parameters#

algMetadatalsst.daf.base.PropertyList or None

Will be modified in-place to contain metadata about the plugins being run. If None, an empty PropertyList will be created.

**kwds

Additional arguments passed to lsst.pipe.base.Task.__init__.

Notes#

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

Attributes Summary

NOISE_EXPOSURE_ID

Name by which the noise exposire ID is recorded in metadata ('str').

NOISE_OFFSET

Name by which the noise offset is recorded in metadata ('str').

NOISE_SEED_MULTIPLIER

Name by which the noise seed multiplier is recorded in metadata ('str').

NOISE_SOURCE

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 measRecord with 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#

cataloglsst.afw.table.SourceCatalog

Catalog with `lsst.afw.detection.Footprint`s attached.

Returns#

footprintsdict [int: (int, lsst.afw.detection.Footprint)]

Dictionary of footprint, keyed by id number, with a tuple of the parent id and footprint.

initNoiseReplacer(exposure, measCat, footprints, exposureId=None, noiseImage=None)#

Replace all pixels in the exposure covered by the footprint of measRecord with noise.

Parameters#

exposurelsst.afw.image.Exposure

Exposure in which to replace pixels.

measCatlsst.afw.table.SourceCatalog

Catalog that will be measured.t

footprintsdict [int: (int, lsst.afw.detection.Footprint)]

Dictionary of footprints, keyed by id number, with a tuple of the parent id and footprint.

exposureIdint, optional

Unique identifier for the exposure.

noiseImagelsst.afw.image.Image or None, optional

Image from which to draw noise pixels. If None, noise will be drawn from the input 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 plugins attribute and add corresponding output fields and slot aliases to the output schema.

In addition to the attributes added by BaseMeasurementTask.__init__, a schema` 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.