LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
|
Interpolate over defects in an exposure and handle cosmic rays. More...
Public Member Functions | |
def | run |
Repair an Exposure's defects and cosmic rays. More... | |
def | interpolate |
def | cosmicRay |
Static Public Attributes | |
ConfigClass = RepairConfig | |
Interpolate over defects in an exposure and handle cosmic rays.
This task operates on an lsst.afw.image.Exposure in place to interpolate over a set of lsst.meas.algorithms.Defect objects. It will also, optionally, find and interpolate any cosmic rays in the lsst.afw.image.Exposure.
See: lsst.pipe.base.task.Task.__init__
Repair an Exposure's defects and cosmic rays.
[in,out] | exposure | lsst.afw.image.Exposure to process. Exposure must have a valid Psf. Modified in place. |
[in] | defects | an lsst.meas.algorithms.DefectListT object. If None, do no defect correction. |
[in] | keepCRs | don't interpolate over the CR pixels (defer to RepairConfig if None) |
AssertionError | with the following strings: |
See RepairConfig
The command line task interface supports a flag -d
to import debug.py from your PYTHONPATH
; see Using lsstDebug to control debugging output for more about debug.py files.
The available variables in RepairTask are:
display
displayCR
This code is in runRepair.py in the examples directory, and can be run as e.g.
Import the task. There are other imports. Read the source file for more info.For this example, we manufacture a test image to run on.
First, create a pure Poisson noise image and a Psf to go with it. The mask plane and variance can be constructed at the same time.
Inject some cosmic rays and generate the Exposure. Exposures are MaskedImages (image + mask + variance) with other metadata (e.g. Psf and Wcs objects).
Defects are represented as bad columns of random lengths. A defect list must be constructed to pass on to the RepairTask.
Finally, the exposure can be repaired. Create an instance of the task and run it. The exposure is modified in place.
To investigate the Debug variables, put something like
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.
def lsst.pipe.tasks.repair.RepairTask.cosmicRay | ( | self, | |
exposure, | |||
keepCRs = None |
|||
) |
Mask cosmic rays @param[in,out] exposure Exposure to process @param keepCRs Don't interpolate over the CR pixels (defer to pex_config if None)
Definition at line 208 of file repair.py.
def lsst.pipe.tasks.repair.RepairTask.interpolate | ( | self, | |
exposure, | |||
defects | |||
) |
Interpolate over defects @param[in,out] exposure Exposure to process @param defects Defect list
Definition at line 192 of file repair.py.
def lsst.pipe.tasks.repair.RepairTask.run | ( | self, | |
exposure, | |||
defects = None , |
|||
keepCRs = None |
|||
) |
Repair an Exposure's defects and cosmic rays.
[in,out] | exposure | lsst.afw.image.Exposure to process. Exposure must have a valid Psf. Modified in place. |
[in] | defects | an lsst.meas.algorithms.DefectListT object. If None, do no defect correction. |
[in] | keepCRs | don't interpolate over the CR pixels (defer to RepairConfig if None) |
AssertionError | with the following strings: |
Definition at line 163 of file repair.py.
|
static |