lsst.cp.pipe  22.0.0-17-ga55b71b+1aac0c94dd
Public Member Functions | Static Public Attributes | List of all members
lsst.cp.pipe.defects.MeasureDefectsTask Class Reference
Inheritance diagram for lsst.cp.pipe.defects.MeasureDefectsTask:

Public Member Functions

def run (self, inputExp, camera)
 
def findHotAndColdPixels (self, exp, nSigma)
 
def maskBlocksIfIntermitentBadPixelsInColumn (self, defects)
 
def debugView (self, stepname, ampImage, defects, detector)
 
def debugHistogram (self, stepname, ampImage, nSigmaUsed, exp)
 

Static Public Attributes

 ConfigClass = MeasureDefectsTaskConfig
 

Detailed Description

Measure the defects from one exposure.

Definition at line 126 of file defects.py.

Member Function Documentation

◆ debugHistogram()

def lsst.cp.pipe.defects.MeasureDefectsTask.debugHistogram (   self,
  stepname,
  ampImage,
  nSigmaUsed,
  exp 
)
Make a histogram of the distribution of pixel values for each amp.

The main image data histogram is plotted in blue. Edge pixels,
if masked, are in red. Note that masked edge pixels do not contribute
to the underflow and overflow numbers.

Note that this currently only supports the 16-amp LSST detectors.

Parameters
----------
dataRef : `lsst.daf.persistence.ButlerDataRef`
    dataRef for the detector.
exp : `lsst.afw.image.exposure.Exposure`
    The exposure in which the defects were found.
visit : `int`
    The visit number.
nSigmaUsed : `float`
    The number of sigma used for detection

Definition at line 439 of file defects.py.

◆ debugView()

def lsst.cp.pipe.defects.MeasureDefectsTask.debugView (   self,
  stepname,
  ampImage,
  defects,
  detector 
)
Plot the defects found by the task.

Parameters
----------
exp : `lsst.afw.image.exposure.Exposure`
    The exposure in which the defects were found.
visit : `int`
    The visit number.
defects : `lsst.ip.isr.Defect`
    The defects to plot.
imageType : `str`
    The type of image, either 'dark' or 'flat'.

Definition at line 399 of file defects.py.

◆ findHotAndColdPixels()

def lsst.cp.pipe.defects.MeasureDefectsTask.findHotAndColdPixels (   self,
  exp,
  nSigma 
)
Find hot and cold pixels in an image.

Using config-defined thresholds on a per-amp basis, mask
pixels that are nSigma above threshold in dark frames (hot
pixels), or nSigma away from the clipped mean in flats (hot &
cold pixels).

Parameters
----------
exp : `lsst.afw.image.exposure.Exposure`
    The exposure in which to find defects.
nSigma : `list [ `float` ]
    Detection threshold to use.  Positive for DETECTED pixels,
    negative for DETECTED_NEGATIVE pixels.

Returns
-------
defects : `lsst.ip.isr.Defect`
    The defects found in the image.

Definition at line 190 of file defects.py.

◆ maskBlocksIfIntermitentBadPixelsInColumn()

def lsst.cp.pipe.defects.MeasureDefectsTask.maskBlocksIfIntermitentBadPixelsInColumn (   self,
  defects 
)
Mask blocks in a column if there are on-and-off bad pixels

If there's a column with on and off bad pixels, mask all the
pixels in between, except if there is a large enough gap of
consecutive good pixels between two bad pixels in the column.

Parameters
---------
defects: `lsst.ip.isr.Defect`
    The defects found in the image so far

Returns
------
defects: `lsst.ip.isr.Defect`
    If the number of bad pixels in a column is not larger or
    equal than self.config.badPixelColumnThreshold, the iput
    list is returned. Otherwise, the defects list returned
    will include boxes that mask blocks of on-and-of pixels.

Definition at line 298 of file defects.py.

◆ run()

def lsst.cp.pipe.defects.MeasureDefectsTask.run (   self,
  inputExp,
  camera 
)
Measure one exposure for defects.

Parameters
----------
inputExp : `lsst.afw.image.Exposure`
     Exposure to examine.
camera : `lsst.afw.cameraGeom.Camera`
     Camera to use for metadata.

Returns
-------
results : `lsst.pipe.base.Struct`
     Results struct containing:
     - ``outputDefects` : `lsst.ip.isr.Defects`
         The defects measured from this exposure.

Definition at line 132 of file defects.py.

Member Data Documentation

◆ ConfigClass

lsst.cp.pipe.defects.MeasureDefectsTask.ConfigClass = MeasureDefectsTaskConfig
static

Definition at line 129 of file defects.py.


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