ApPipeTask

class lsst.ap.pipe.ApPipeTask(butler, *args, **kwargs)

Bases: lsst.pipe.base.CmdLineTask

Command-line task representing the entire AP pipeline.

ApPipeTask processes raw DECam images from basic processing through source association. Other observatories will be supported in the future.

ApPipeTask can be run from the command line, but it can also be called from other pipeline code. It provides public methods for executing each major step of the pipeline by itself.

Parameters:
butler : lsst.daf.persistence.Butler

A Butler providing access to the science, calibration, and (unless config.differencer.getTemplate is overridden) template data to be processed. Its output repository must be both readable and writable.

Methods Summary

runAssociation(sensorRef) Do source association.
runDataRef(rawRef[, templateIds, reuse]) Execute the ap_pipe pipeline on a single image.
runDiffIm(sensorRef[, templateIds]) Do difference imaging with a template and a science image
runProcessCcd(sensorRef) Perform ISR with ingested images and calibrations via processCcd.

Methods Documentation

runAssociation(sensorRef)

Do source association.

Parameters:
sensorRef : lsst.daf.persistence.ButlerDataRef

Data reference for multiple input dataset types.

Returns:
result : lsst.pipe.base.Struct

Result struct with components:

  • l1Database : handle for accessing the final association database, conforming to
    ap_association’s DB access API
  • taskResults : output of config.associator.run (lsst.pipe.base.Struct).
runDataRef(rawRef, templateIds=None, reuse=None)

Execute the ap_pipe pipeline on a single image.

Parameters:
rawRef : lsst.daf.persistence.ButlerDataRef

A reference to the raw data to process.

templateIds : list of dict, optional

A list of parsed data IDs for templates to use. Only used if config.differencer is configured to do so. differencer or its subtasks may restrict the allowed IDs.

reuse : list of str, optional

The names of all subtasks that may be skipped if their output is present. Defaults to skipping nothing.

Returns:
result : lsst.pipe.base.Struct

Result struct with components:

runDiffIm(sensorRef, templateIds=None)

Do difference imaging with a template and a science image

The output repository associated with sensorRef will be populated with difference images and catalogs of detected sources (diaSrc, diffexp, and metadata files)

Parameters:
sensorRef : lsst.daf.persistence.ButlerDataRef

Data reference for multiple dataset types, both input and output.

templateIds : list of dict, optional

A list of parsed data IDs for templates to use. Only used if config.differencer is configured to do so. differencer or its subtasks may restrict the allowed IDs.

Returns:
result : lsst.pipe.base.Struct

Output of config.differencer.runDataRef.

runProcessCcd(sensorRef)

Perform ISR with ingested images and calibrations via processCcd.

The output repository associated with sensorRef will be populated with the usual post-ISR data (bkgd, calexp, icExp, icSrc, postISR).

Parameters:
sensorRef : lsst.daf.persistence.ButlerDataRef

Data reference for raw data.

Returns:
result : lsst.pipe.base.Struct

Output of config.ccdProcessor.runDataRef.

Notes

The input repository corresponding to sensorRef must already contain the refcats.