lsst.ip.isr g06d8191974+b5247657d3
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Public Attributes | Static Protected Attributes | List of all members
lsst.ip.isr.isrTaskLSST.IsrTaskLSST Class Reference
Inheritance diagram for lsst.ip.isr.isrTaskLSST.IsrTaskLSST:

Public Member Functions

 __init__ (self, **kwargs)
 
 runQuantum (self, butlerQC, inputRefs, outputRefs)
 
 validateInput (self, inputs)
 
 diffNonLinearCorrection (self, ccdExposure, dnlLUT, **kwargs)
 
 maskFullDefectAmplifiers (self, ccdExposure, detector, defects)
 
 maskSaturatedPixels (self, badAmpDict, ccdExposure, detector)
 
 overscanCorrection (self, mode, detectorConfig, detector, badAmpDict, ccdExposure)
 
 getLinearizer (self, detector)
 
 gainsCorrection (self, **kwargs)
 
 updateVariance (self, ampExposure, amp, ptcDataset=None)
 
 maskNegativeVariance (self, exposure)
 
 variancePlane (self, ccdExposure, ccd, ptc)
 
 maskDefect (self, exposure, defectBaseList)
 
 maskEdges (self, exposure, numEdgePixels=0, maskPlane="SUSPECT", level='DETECTOR')
 
 maskNan (self, exposure)
 
 countBadPixels (self, exposure)
 
 flatContext (self, exp, flat, dark=None)
 
 getBrighterFatterKernel (self, detector, bfKernel)
 
 applyBrighterFatterCorrection (self, ccdExposure, flat, dark, bfKernel, bfGains)
 
 darkCorrection (self, exposure, darkExposure, invert=False)
 
 doLinearize (self, detector)
 
 flatCorrection (self, exposure, flatExposure, invert=False)
 
 makeBinnedImages (self, exposure)
 
 run (self, *ccdExposure, dnlLUT=None, bias=None, deferredChargeCalib=None, linearizer=None, ptc=None, crosstalk=None, defects=None, bfKernel=None, bfGains=None, dark=None, flat=None, camera=None, **kwargs)
 

Static Public Member Functions

 extractCalibDate (calib)
 

Static Public Attributes

 ConfigClass = IsrTaskLSSTConfig
 

Static Protected Attributes

str _DefaultName = "isr"
 

Detailed Description

Definition at line 483 of file isrTaskLSST.py.

Constructor & Destructor Documentation

◆ __init__()

lsst.ip.isr.isrTaskLSST.IsrTaskLSST.__init__ ( self,
** kwargs )

Definition at line 487 of file isrTaskLSST.py.

Member Function Documentation

◆ applyBrighterFatterCorrection()

lsst.ip.isr.isrTaskLSST.IsrTaskLSST.applyBrighterFatterCorrection ( self,
ccdExposure,
flat,
dark,
bfKernel,
bfGains )

Definition at line 1021 of file isrTaskLSST.py.

◆ countBadPixels()

lsst.ip.isr.isrTaskLSST.IsrTaskLSST.countBadPixels ( self,
exposure )
Notes
-----
Reset and interpolate bad pixels.

Large contiguous bad regions (which should have the BAD mask
bit set) should have their values set to the image median.
This group should include defects and bad amplifiers. As the
area covered by these defects are large, there's little
reason to expect that interpolation would provide a more
useful value.

Smaller defects can be safely interpolated after the larger
regions have had their pixel values reset.  This ensures
that the remaining defects adjacent to bad amplifiers (as an
example) do not attempt to interpolate extreme values.

Definition at line 950 of file isrTaskLSST.py.

◆ darkCorrection()

lsst.ip.isr.isrTaskLSST.IsrTaskLSST.darkCorrection ( self,
exposure,
darkExposure,
invert = False )
Apply dark correction in place.

Parameters
----------
exposure : `lsst.afw.image.Exposure`
    Exposure to process.
darkExposure : `lsst.afw.image.Exposure`
    Dark exposure of the same size as ``exposure``.
invert : `Bool`, optional
    If True, re-add the dark to an already corrected image.

Raises
------
RuntimeError
    Raised if either ``exposure`` or ``darkExposure`` do not
    have their dark time defined.

See Also
--------
lsst.ip.isr.isrFunctions.darkCorrection

Definition at line 1081 of file isrTaskLSST.py.

◆ diffNonLinearCorrection()

lsst.ip.isr.isrTaskLSST.IsrTaskLSST.diffNonLinearCorrection ( self,
ccdExposure,
dnlLUT,
** kwargs )

Definition at line 524 of file isrTaskLSST.py.

◆ doLinearize()

lsst.ip.isr.isrTaskLSST.IsrTaskLSST.doLinearize ( self,
detector )
Check if linearization is needed for the detector cameraGeom.

Checks config.doLinearize and the linearity type of the first
amplifier.

Parameters
----------
detector : `lsst.afw.cameraGeom.Detector`
    Detector to get linearity type from.

Returns
-------
doLinearize : `Bool`
    If True, linearization should be performed.

Definition at line 1148 of file isrTaskLSST.py.

◆ extractCalibDate()

lsst.ip.isr.isrTaskLSST.IsrTaskLSST.extractCalibDate ( calib)
static
Extract common calibration metadata values that will be written to
output header.

Parameters
----------
calib : `lsst.afw.image.Exposure` or `lsst.ip.isr.IsrCalib`
    Calibration to pull date information from.

Returns
-------
dateString : `str`
    Calibration creation date string to add to header.

Definition at line 1124 of file isrTaskLSST.py.

◆ flatContext()

lsst.ip.isr.isrTaskLSST.IsrTaskLSST.flatContext ( self,
exp,
flat,
dark = None )
Context manager that applies and removes flats and darks,
if the task is configured to apply them.

Parameters
----------
exp : `lsst.afw.image.Exposure`
    Exposure to process.
flat : `lsst.afw.image.Exposure`
    Flat exposure the same size as ``exp``.
dark : `lsst.afw.image.Exposure`, optional
    Dark exposure the same size as ``exp``.

Yields
------
exp : `lsst.afw.image.Exposure`
    The flat and dark corrected exposure.

Definition at line 973 of file isrTaskLSST.py.

◆ flatCorrection()

lsst.ip.isr.isrTaskLSST.IsrTaskLSST.flatCorrection ( self,
exposure,
flatExposure,
invert = False )
Apply flat correction in place.

Parameters
----------
exposure : `lsst.afw.image.Exposure`
    Exposure to process.
flatExposure : `lsst.afw.image.Exposure`
    Flat exposure of the same size as ``exposure``.
invert : `Bool`, optional
    If True, unflatten an already flattened image.

See Also
--------
lsst.ip.isr.isrFunctions.flatCorrection

Definition at line 1167 of file isrTaskLSST.py.

◆ gainsCorrection()

lsst.ip.isr.isrTaskLSST.IsrTaskLSST.gainsCorrection ( self,
** kwargs )

Definition at line 776 of file isrTaskLSST.py.

◆ getBrighterFatterKernel()

lsst.ip.isr.isrTaskLSST.IsrTaskLSST.getBrighterFatterKernel ( self,
detector,
bfKernel )

Definition at line 1003 of file isrTaskLSST.py.

◆ getLinearizer()

lsst.ip.isr.isrTaskLSST.IsrTaskLSST.getLinearizer ( self,
detector )

Definition at line 766 of file isrTaskLSST.py.

◆ makeBinnedImages()

lsst.ip.isr.isrTaskLSST.IsrTaskLSST.makeBinnedImages ( self,
exposure )
Make visualizeVisit style binned exposures.

Parameters
----------
exposure : `lsst.afw.image.Exposure`
    Exposure to bin.

Returns
-------
bin1 : `lsst.afw.image.Exposure`
    Binned exposure using binFactor1.
bin2 : `lsst.afw.image.Exposure`
    Binned exposure using binFactor2.

Definition at line 1191 of file isrTaskLSST.py.

◆ maskDefect()

lsst.ip.isr.isrTaskLSST.IsrTaskLSST.maskDefect ( self,
exposure,
defectBaseList )
Mask defects using mask plane "BAD", in place.

Parameters
----------
exposure : `lsst.afw.image.Exposure`
    Exposure to process.

defectBaseList : defect-type
    List of defects to mask. Can be of type  `lsst.ip.isr.Defects`
    or `list` of `lsst.afw.image.DefectBase`.

Definition at line 870 of file isrTaskLSST.py.

◆ maskEdges()

lsst.ip.isr.isrTaskLSST.IsrTaskLSST.maskEdges ( self,
exposure,
numEdgePixels = 0,
maskPlane = "SUSPECT",
level = 'DETECTOR' )
Mask edge pixels with applicable mask plane.

Parameters
----------
exposure : `lsst.afw.image.Exposure`
    Exposure to process.
numEdgePixels : `int`, optional
    Number of edge pixels to mask.
maskPlane : `str`, optional
    Mask plane name to use.
level : `str`, optional
    Level at which to mask edges.

Definition at line 890 of file isrTaskLSST.py.

◆ maskFullDefectAmplifiers()

lsst.ip.isr.isrTaskLSST.IsrTaskLSST.maskFullDefectAmplifiers ( self,
ccdExposure,
detector,
defects )
Check for fully masked bad amplifiers and mask them.

Full defect masking happens later to allow for defects which
cross amplifier boundaries.

Parameters
----------
ccdExposure : `lsst.afw.image.Exposure`
    Input exposure to be masked.
detector : `lsst.afw.cameraGeom.Detector`
    Detector object.
defects : `lsst.ip.isr.Defects`
    List of defects.  Used to determine if an entire
    amplifier is bad.

Returns
-------
badAmpDict : `str`[`bool`]
    Dictionary of amplifiers, keyed by name, value is True if
    amplifier is fully masked.

Definition at line 529 of file isrTaskLSST.py.

◆ maskNan()

lsst.ip.isr.isrTaskLSST.IsrTaskLSST.maskNan ( self,
exposure )
Mask NaNs using mask plane "UNMASKEDNAN", in place.

Parameters
----------
exposure : `lsst.afw.image.Exposure`
    Exposure to process.

Notes
-----
We mask over all non-finite values (NaN, inf), including those
that are masked with other bits (because those may or may not be
interpolated over later, and we want to remove all NaN/infs).
Despite this behaviour, the "UNMASKEDNAN" mask plane is used to
preserve the historical name.

Definition at line 924 of file isrTaskLSST.py.

◆ maskNegativeVariance()

lsst.ip.isr.isrTaskLSST.IsrTaskLSST.maskNegativeVariance ( self,
exposure )
Identify and mask pixels with negative variance values.

Parameters
----------
exposure : `lsst.afw.image.Exposure`
    Exposure to process.

See Also
--------
lsst.ip.isr.isrFunctions.updateVariance

Definition at line 837 of file isrTaskLSST.py.

◆ maskSaturatedPixels()

lsst.ip.isr.isrTaskLSST.IsrTaskLSST.maskSaturatedPixels ( self,
badAmpDict,
ccdExposure,
detector )
Mask SATURATED and SUSPECT pixels and check if any amplifiers
are fully masked.

Parameters
----------
badAmpDict : `str` [`bool`]
    Dictionary of amplifiers, keyed by name, value is True if
    amplifier is fully masked.
ccdExposure : `lsst.afw.image.Exposure`
    Input exposure to be masked.
detector : `lsst.afw.cameraGeom.Detector`
    Detector object.
defects : `lsst.ip.isr.Defects`
    List of defects.  Used to determine if an entire
    amplifier is bad.

Returns
-------
badAmpDict : `str`[`bool`]
    Dictionary of amplifiers, keyed by name.

Definition at line 580 of file isrTaskLSST.py.

◆ overscanCorrection()

lsst.ip.isr.isrTaskLSST.IsrTaskLSST.overscanCorrection ( self,
mode,
detectorConfig,
detector,
badAmpDict,
ccdExposure )
Apply serial overscan correction in place to all amps.

The actual overscan subtraction is performed by the
`lsst.ip.isr.overscan.OverscanTask`, which is called here.

Parameters
----------
mode : `str`
    Must be `SERIAL` or `PARALLEL`.
detectorConfig : `lsst.ip.isr.OverscanDetectorConfig`
    Per-amplifier configurations.
detector : `lsst.afw.cameraGeom.Detector`
    Detector object.
badAmpDict : `dict`
    Dictionary of amp name to whether it is a bad amp.
ccdExposure : `lsst.afw.image.Exposure`
    Exposure to have overscan correction performed.

Returns
-------
overscans : `list` [`lsst.pipe.base.Struct` or None]
    Each result struct has components:

    ``imageFit``
        Value or fit subtracted from the amplifier image data.
        (scalar or `lsst.afw.image.Image`)
    ``overscanFit``
        Value or fit subtracted from the overscan image data.
        (scalar or `lsst.afw.image.Image`)
    ``overscanImage``
        Image of the overscan region with the overscan
        correction applied. This quantity is used to estimate
        the amplifier read noise empirically.
        (`lsst.afw.image.Image`)
    ``overscanMean``
        Mean overscan fit value. (`float`)
    ``overscanMedian``
        Median overscan fit value. (`float`)
    ``overscanSigma``
        Clipped standard deviation of the overscan fit. (`float`)
    ``residualMean``
        Mean of the overscan after fit subtraction. (`float`)
    ``residualMedian``
        Median of the overscan after fit subtraction. (`float`)
    ``residualSigma``
        Clipped standard deviation of the overscan after fit
        subtraction. (`float`)

See Also
--------
lsst.ip.isr.overscan.OverscanTask

Definition at line 646 of file isrTaskLSST.py.

◆ run()

lsst.ip.isr.isrTaskLSST.IsrTaskLSST.run ( self,
* ccdExposure,
dnlLUT = None,
bias = None,
deferredChargeCalib = None,
linearizer = None,
ptc = None,
crosstalk = None,
defects = None,
bfKernel = None,
bfGains = None,
dark = None,
flat = None,
camera = None,
** kwargs )

Definition at line 1213 of file isrTaskLSST.py.

◆ runQuantum()

lsst.ip.isr.isrTaskLSST.IsrTaskLSST.runQuantum ( self,
butlerQC,
inputRefs,
outputRefs )

Definition at line 495 of file isrTaskLSST.py.

◆ updateVariance()

lsst.ip.isr.isrTaskLSST.IsrTaskLSST.updateVariance ( self,
ampExposure,
amp,
ptcDataset = None )
Set the variance plane using the gain and read noise.

Parameters
----------
ampExposure : `lsst.afw.image.Exposure`
    Exposure to process.
amp : `lsst.afw.cameraGeom.Amplifier` or `FakeAmp`
    Amplifier detector data.
ptcDataset : `lsst.ip.isr.PhotonTransferCurveDataset`, optional
    PTC dataset containing the gains and read noise.

Raises
------
RuntimeError
    Raised if ptcDataset is not provided.

See also
--------
lsst.ip.isr.isrFunctions.updateVariance

Definition at line 783 of file isrTaskLSST.py.

◆ validateInput()

lsst.ip.isr.isrTaskLSST.IsrTaskLSST.validateInput ( self,
inputs )
This is a check that all the inputs required by the config
are available.

Definition at line 501 of file isrTaskLSST.py.

◆ variancePlane()

lsst.ip.isr.isrTaskLSST.IsrTaskLSST.variancePlane ( self,
ccdExposure,
ccd,
ptc )

Definition at line 853 of file isrTaskLSST.py.

Member Data Documentation

◆ _DefaultName

str lsst.ip.isr.isrTaskLSST.IsrTaskLSST._DefaultName = "isr"
staticprotected

Definition at line 485 of file isrTaskLSST.py.

◆ ConfigClass

lsst.ip.isr.isrTaskLSST.IsrTaskLSST.ConfigClass = IsrTaskLSSTConfig
static

Definition at line 484 of file isrTaskLSST.py.


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