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:
the point-spread function model (
lsst.afw.detection.Psf
)aperture corrections (
lsst.afw.image.ApCorrMap
)the astrometric solution (
lsst.afw.geom.SkyWcs
)the photometric solution (
lsst.afw.image.PhotoCalib
)a background model (
lsst.afw.math.BackgroundList
)
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
-
class
ReprocessVisitImageTask
(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.
-
method
run
(*, 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
- Field type
Task to apply aperture corrections to the measured sources.
catalog_calculation¶
Task to compute catalog values using only the catalog entries.
compute_summary_stats¶
Task to to compute summary statistics on the calibrated exposure.
deblend¶
- Default
lsst.meas.deblender.sourceDeblendTask.SourceDeblendTask
- Field type
Split blended sources into their components.
detection¶
- Default
- Field type
Task to detect sources to return in the output catalog.
measurement¶
- Default
- Field type
Task to measure sources to return in the output catalog.
normalized_calibration_flux¶
Task to normalize the calibration flux (e.g. compensated tophats).
post_calculations¶
- Default
- Field type
Task to compute catalog values after all other calculations have been done.
repair¶
- Default
- Field type
Task to repair cosmic rays on the exposure before PSF determination.
set_primary_flags¶
- Default
lsst.meas.algorithms.setPrimaryFlags.SetPrimaryFlagsTask
- Field type
Task to add isPrimary to the catalog.
sky_sources¶
- Default
- Field type
Task to generate sky sources (‘empty’ regions where there are no detections).
snap_combine¶
- Default
- Field type
Task to combine two snaps to make one exposure.
Configuration fields¶
calib_match_radius¶
Radius in arcseconds to cross-match calib_sources to the output catalog.
connections¶
- Data type
lsst.pipe.base.config.ReprocessVisitImageConfigConnections
- Field type
Configurations describing the connections of the PipelineTask to datatypes
do_use_sky_corr¶
Include the skyCorr input for background subtraction?
id_generator¶
- Data type
lsst.meas.base._id_generator.DetectorVisitIdGeneratorConfig
- Field type
Configuration for how to generate catalog IDs from data IDs.
remove_initial_photo_calib¶
Remove an already-applied photometric calibration from the backgrounds?
saveLogOutput¶
Flag to enable/disable saving of log output for a task, enabled by default.