UpdateVisitSummaryTask#

class lsst.drp.tasks.update_visit_summary.UpdateVisitSummaryTask(*, initInputs: dict[str, Any] | None = None, **kwargs: Any)#

Bases: PipelineTask

A pipeline task that creates a new visit-summary table after all lsst.afw.image.Exposure components have been finalized.

Notes#

This task is designed to be run just prior to making warps for coaddition, as it aggregates all inputs other than the images and backgrounds into a single ExposureCatalog dataset and recomputes summary statistics that are useful in selecting which images should go into a coadd. Its output can also be used to reconstruct a final processed visit image when combined with a post-ISR image, the background model, and the final mask.

Methods Summary

run(*, result, input_summary_catalog, ...[, ...])

Build an updated version of a visit summary catalog.

runQuantum(butlerQC, inputRefs, outputRefs)

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

Methods Documentation

run(*, result: Struct, input_summary_catalog: ExposureCatalog, input_exposures: Mapping[int, DeferredDatasetHandle], psf_overrides: ExposureCatalog, psf_star_catalog: Table, ap_corr_overrides: ExposureCatalog, camera: Camera | None = None, photo_calib_overrides: PossiblyMultipleInput | None = None, wcs_overrides: PossiblyMultipleInput | None = None, background_originals: Mapping[int, DeferredDatasetHandle] | None = None, background_overrides: Mapping[int, DeferredDatasetHandle] | None = None)#

Build an updated version of a visit summary catalog.

Parameters#

resultlsst.pipe.base.Struct

Output struct to modify in-place. On successful return, this will have the following attributes:

  • output_summary_catalog (lsst.afw.table.ExposureCatalog)

    The output visit summary catalog.

  • visit_geometry (lsst.obs.base.visit_geometry.VisitGeometry)

    Updated visit[, detector] regions that can be used to update butler dimension records.

input_summary_cataloglsst.afw.table.ExposureCatalog

Input catalog. Each row in this catalog will be used to produce a row in the output catalog. Any override parameter that is None will leave the corresponding values unchanged from those in this input catalog.

input_exposurescollections.abc.Mapping [int,

Deferred-load objects that fetch lsst.afw.image.Exposure instances. Only the image, mask, and variance are used; all other components are assumed to be superceded by at least input_summary_catalog and probably some _overrides arguments as well. This usually corresponds to the calexp dataset.

psf_overrideslsst.afw.table.ExposureCatalog

Catalog with attached lsst.afw.detection.Psf objects that supersede the input catalog’s PSFs.

psf_star_catalogastropy.table.Table

Table containing PSF stars for use in computing PSF summary statistics.

ap_corr_overrideslsst.afw.table.ExposureCatalog

Catalog with attached lsst.afw.image.ApCorrMap objects that supersede the input catalog’s aperture corrections.

cameralsst.afw.cameraGeom.Camera, optional

Camera geometry.

photo_calib_overridesPossiblyMultipleInput, optional

Catalog wrappers with attached lsst.afw.image.PhotoCalib objects that supersede the input catalog’s photometric calibrations.

wcs_overridesPossiblyMultipleInput, optional

Catalog wrappers with attached lsst.afw.geom.SkyWcs objects that supersede the input catalog’s astrometric calibrations.

background_originalscollections.abc.Mapping [int,

Deferred-load objects that fetch lsst.afw.math.BackgroundList instances. These should correspond to the background already subtracted from input_exposures. If not provided and background_overrides is, it is assumed that the background in input_exposures has not been subtracted. If provided, all keys in background_overrides must also be present in background_originals.

background_overridescollections.abc.Mapping [int,

Deferred-load objects that fetch lsst.afw.math.BackgroundList instances. These should correspond to the background that should now be subtracted from``input_exposures`` to yield the final background-subtracted image.

Returns#

resultlsst.pipe.base.Struct

The same output struct passed in.

Notes#

If any override parameter is provided but does not have a value for a particular detector, that component will be set to None in the returned catalog for that detector and all summary statistics derived from that component will be reset (usually to NaN) as well. Not passing an override parameter at all will instead pass through the original component and values from the input catalog unchanged.

runQuantum(butlerQC: QuantumContext, inputRefs: InputQuantizedConnection, outputRefs: OutputQuantizedConnection) None#

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.