RepairTask#
- class lsst.pipe.tasks.repair.RepairTask(**kwargs)#
Bases:
TaskRepair an exposures defects and cosmic rays via interpolation.
This task operates on an lsst.afw.image.Exposure in place to interpolate over a set of
Defectobjects.It will also, optionally, find and interpolate any cosmic rays in the lsst.afw.image.Exposure.
Notes#
Debugging: The available debug variables in RepairTask are:
- display :
A dictionary containing debug point names as keys with frame number as value. Valid keys are:
- repair.before :
display image before any repair is done
- repair.after :
display image after cosmic ray and defect correction
- displayCR :
If True, display the exposure on ds9’s frame 1 and overlay bounding boxes around detects CRs.
To investigate the pipe_tasks_repair_Debug, put something like
import lsstDebug def DebugInfo(name): di = lsstDebug.getInfo(name) # N.b. lsstDebug.Info(name) would call us recursively if name == "lsst.pipe.tasks.repair": di.display = {'repair.before':2, 'repair.after':3} di.displayCR = True return dilsstDebug.Info = DebugInfo into your debug.py file and run runRepair.py with the –debug flag.
- Conversion notes:
Display code should be updated once we settle on a standard way of controlling what is displayed.
Methods Summary
cosmicRay(exposure[, keepCRs])Mask cosmic rays.
run(exposure[, defects, keepCRs])Repair an Exposure's defects and cosmic rays.
Methods Documentation
- cosmicRay(exposure, keepCRs=None)#
Mask cosmic rays.
Parameters#
- exposure
lsst.afw.image.Exposure Exposure to process.
- keepCRs
UnknownorNone, optional Don’t interpolate over the CR pixels (defer to
pex_configifNone).
- exposure
- run(exposure, defects=None, keepCRs=None)#
Repair an Exposure’s defects and cosmic rays.
Parameters#
- exposure
lsst.afw.image.Exposure Exposure must have a valid Psf. Modified in place.
- defects
lsst.meas.algorithms.DefectListTorNone, optional If
None, do no defect correction.- keepCRs
UnknownorNone, optional Don’t interpolate over the CR pixels (defer to
RepairConfigifNone).
Raises#
- AssertionError
Raised if any of the following occur: - No exposure provided. - The object provided as exposure evaluates to False. - No PSF provided. - The Exposure has no associated Psf.
- exposure