ReprocessVisitImageTask

ReprocessVisitImageTask applies calibration-model objects produced by upstream tasks to single-visit images, and performs the final round of detection, deblending, and measurement that will populate the Source table.

Processing summary

ReprocessVisitImageTask reads in the one or two post-ISR single-exposure images that correspond to a single {visit, detector} combination, combines them into a single image (via SnapCombineTask). It then applies calibration-model objects produced upstream. These include:

ReprocessVisitImageTask then detects new sources (SourceDetectionTask), deblends them (SourceDeblendTask), measures them (SingleFrameMeasurementTask), and applies the aperture corrections loaded previously (ApplyApCorrTaskTask). Additional subtasks or configurations of SingleFrameMeasurementTask may be used to ensure the calibration models are correctly reflected in all measurements, but these should be considered implementation details, despite being visible (and configurable) as regular subtasks.

The task’s outputs are an lsst.afw.image.ExposureF that has been reprocessed and calibrated with the input calibration models and the SourceCatalog of single-visit measurements on that exposure. The background model is subtracted from the image and the photometric calibration is used to scale it to nJy pixel values, while the other calibration model objects are just attached to the stored image.

See connection and run argument documentation for details.

Python API summary

from lsst.drp.tasks.reprocess_visit_image import ReprocessVisitImageTask
classReprocessVisitImageTask(sources_schema=None, **kwargs)

Use the visit-level calibrations to perform detection and measurement on the single frame exposures and produce a “final” exposure and catalog...

attributeconfig

Access configuration fields and retargetable subtasks.

methodrun(*, exposures, initial_photo_calib, psf, background, ap_corr, photo_calib, wcs, calib_sources, id_generator=None, result=None)

Detect and measure sources on the exposure(s) (snap combined as necessary), and make a “final” Processed Visit Image using all of the supplied metadata, plus a catalog measured on it...

See also

See the ReprocessVisitImageTask API reference for complete details.

Butler datasets

When run through the runQuantum method, ReprocessVisitImageTask obtains datasets from the input Butler data repository and persists outputs to the output Butler data repository.

In this mode, the inputs are:

  • a single-exposure, single-detector post-ISR image (postISRCCD, by default)

  • a visit-level catalog with per-detector rows (finalVisitSummary) that aggregates most calibration model objects.

  • two background models (calexpBackground`, skyCorr), to be concatenated to form the full background model.

The outputs are:

  • the final image, including all calibration models (pvi)

  • the catalog of measurements (sources_detector)

  • a separate catalog of deblended footprints (sources_detector_footprints)

  • a final background model, including both the input background models and a small adjustment that uses the new detections for masking (pvi_background).

Retargetable subtasks

apply_aperture_correction

Default

lsst.meas.base.applyApCorr.ApplyApCorrTask

Field type

ConfigurableField

Task to apply aperture corrections to the measured sources.

catalog_calculation

Default

lsst.meas.base.catalogCalculation.CatalogCalculationTask

Field type

ConfigurableField

Task to compute catalog values using only the catalog entries.

compute_summary_stats

Default

lsst.pipe.tasks.computeExposureSummaryStats.ComputeExposureSummaryStatsTask

Field type

ConfigurableField

Task to to compute summary statistics on the calibrated exposure.

deblend

Default

lsst.meas.deblender.sourceDeblendTask.SourceDeblendTask

Field type

ConfigurableField

Split blended sources into their components.

detection

Default

lsst.meas.algorithms.detection.SourceDetectionTask

Field type

ConfigurableField

Task to detect sources to return in the output catalog.

measurement

Default

lsst.meas.base.sfm.SingleFrameMeasurementTask

Field type

ConfigurableField

Task to measure sources to return in the output catalog.

normalized_calibration_flux

Default

lsst.meas.algorithms.normalizedCalibrationFlux.NormalizedCalibrationFluxTask

Field type

ConfigurableField

Task to normalize the calibration flux (e.g. compensated tophats).

post_calculations

Default

lsst.meas.base.sfm.SingleFrameMeasurementTask

Field type

ConfigurableField

Task to compute catalog values after all other calculations have been done.

repair

Default

lsst.pipe.tasks.repair.RepairTask

Field type

ConfigurableField

Task to repair cosmic rays on the exposure before PSF determination.

set_primary_flags

Default

lsst.meas.algorithms.setPrimaryFlags.SetPrimaryFlagsTask

Field type

ConfigurableField

Task to add isPrimary to the catalog.

sky_sources

Default

lsst.meas.algorithms.skyObjects.SkyObjectsTask

Field type

ConfigurableField

Task to generate sky sources (‘empty’ regions where there are no detections).

snap_combine

Default

lsst.pipe.tasks.snapCombine.SnapCombineTask

Field type

ConfigurableField

Task to combine two snaps to make one exposure.

Configuration fields

calib_match_radius

Default
0.2
Field type

float Field

Radius in arcseconds to cross-match calib_sources to the output catalog.

connections

Data type

lsst.pipe.base.config.ReprocessVisitImageConfigConnections

Field type

ConfigField

Configurations describing the connections of the PipelineTask to datatypes

do_use_sky_corr

Default
False
Field type

bool Field

Include the skyCorr input for background subtraction?

id_generator

Data type

lsst.meas.base._id_generator.DetectorVisitIdGeneratorConfig

Field type

ConfigField

Configuration for how to generate catalog IDs from data IDs.

remove_initial_photo_calib

Default
True
Field type

bool Field

Remove an already-applied photometric calibration from the backgrounds?

saveLogOutput

Default
True
Field type

bool Field

Flag to enable/disable saving of log output for a task, enabled by default.