DetectCoaddSourcesTask#

class lsst.pipe.tasks.multiBand.DetectCoaddSourcesTask(schema=None, **kwargs)#

Bases: PipelineTask

Detect sources on a single filter coadd.

Coadding individual visits requires each exposure to be warped. This introduces covariance in the noise properties across pixels. Before detection, we correct the coadd variance by scaling the variance plane in the coadd to match the observed variance. This is an approximate approach – strictly, we should propagate the full covariance matrix – but it is simple and works well in practice.

After scaling the variance plane, we detect sources and generate footprints by delegating to the @ref SourceDetectionTask_ “detection” subtask.

DetectCoaddSourcesTask is meant to be run after assembling a coadded image in a given band. The purpose of the task is to update the background, detect all sources in a single band and generate a set of parent footprints. Subsequent tasks in the multi-band processing procedure will merge sources across bands and, eventually, perform forced photometry.

Parameters#

schemalsst.afw.table.Schema, optional

Initial schema for the output catalog, modified-in place to include all fields set by this task. If None, the source minimal schema will be used.

**kwargs

Additional keyword arguments.

Methods Summary

run(exposure, idFactory, expId[, patchInfo])

Run detection on an exposure.

runQuantum(butlerQC, inputRefs, outputRefs)

Do butler IO and transform to provide in memory objects for tasks run method.

Methods Documentation

run(exposure, idFactory, expId, patchInfo=None)#

Run detection on an exposure.

First scale the variance plane to match the observed variance using ScaleVarianceTask. Then invoke the SourceDetectionTask_ “detection” subtask to detect sources.

Parameters#

exposurelsst.afw.image.Exposure

Exposure on which to detect (may be background-subtracted and scaled, depending on configuration).

idFactorylsst.afw.table.IdFactory

IdFactory to set source identifiers.

expIdint

Exposure identifier (integer) for RNG seed.

patchInfolsst.skymap.PatchInfo, optional

Description of the patch geometry. Only needed if forceExactBinning is True.

Returns#

resultlsst.pipe.base.Struct

Results as a struct with attributes:

sources

Catalog of detections (lsst.afw.table.SourceCatalog).

backgrounds

List of backgrounds (list).

runQuantum(butlerQC, inputRefs, outputRefs)#

Do butler IO and transform to provide in memory objects for tasks run method.

Parameters#

butlerQCQuantumContext

A butler which is specialized to operate in the context of a lsst.daf.butler.Quantum.

inputRefsInputQuantizedConnection

Datastructure whose attribute names are the names that identify connections defined in corresponding PipelineTaskConnections class. The values of these attributes are the lsst.daf.butler.DatasetRef objects associated with the defined input/prerequisite connections.

outputRefsOutputQuantizedConnection

Datastructure whose attribute names are the names that identify connections defined in corresponding PipelineTaskConnections class. The values of these attributes are the lsst.daf.butler.DatasetRef objects associated with the defined output connections.