lsst.pipe.tasks gb62d540790+dc6f37d311
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
lsst.pipe.tasks.repair.RepairTask Class Reference
Inheritance diagram for lsst.pipe.tasks.repair.RepairTask:

Public Member Functions

def __init__ (self, **kwargs)
 
def run (self, exposure, defects=None, keepCRs=None)
 
def cosmicRay (self, exposure, keepCRs=None)
 

Static Public Attributes

 ConfigClass = RepairConfig
 

Detailed Description

Repair 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 `~lsst.meas.algorithms.Defect` objects.

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

.. code-block :: none

    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 di

lsstDebug.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.

Definition at line 61 of file repair.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.pipe.tasks.repair.RepairTask.__init__ (   self,
**  kwargs 
)

Definition at line 105 of file repair.py.

Member Function Documentation

◆ cosmicRay()

def lsst.pipe.tasks.repair.RepairTask.cosmicRay (   self,
  exposure,
  keepCRs = None 
)
Mask cosmic rays.

Parameters
----------
exposure : `lsst.afw.image.Exposure`
    Exposure to process.
keepCRs : `Unknown` or `None`, optional
    Don't interpolate over the CR pixels (defer to ``pex_config`` if `None`).

Definition at line 151 of file repair.py.

◆ run()

def lsst.pipe.tasks.repair.RepairTask.run (   self,
  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.DefectListT` or `None`, optional
    If `None`, do no defect correction.
keepCRs : `Unknown` or `None`, optional
    Don't interpolate over the CR pixels (defer to ``RepairConfig`` if `None`).

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.

Definition at line 111 of file repair.py.

Member Data Documentation

◆ ConfigClass

lsst.pipe.tasks.repair.RepairTask.ConfigClass = RepairConfig
static

Definition at line 102 of file repair.py.


The documentation for this class was generated from the following file: