LSSTApplications  18.1.0
LSSTDataManagementBasePackage
Public Member Functions | Static Public Attributes | List of all members
lsst.obs.decam.decamCpIsr.DecamCpIsrTask Class Reference
Inheritance diagram for lsst.obs.decam.decamCpIsr.DecamCpIsrTask:

Public Member Functions

def biasCorrection (self, exposure, biasExposure)
 
def flatCorrection (self, exposure, flatExposure)
 

Static Public Attributes

 ConfigClass = DecamCpIsrConfig
 

Detailed Description

Perform ISR task using Community Pipeline Calibration Products MasterCal.

The CP MasterCal products have butler dataset types cpBias and cpFlat,
different from the LSST-generated calibration products (bias/flat).

Definition at line 65 of file decamCpIsr.py.

Member Function Documentation

◆ biasCorrection()

def lsst.obs.decam.decamCpIsr.DecamCpIsrTask.biasCorrection (   self,
  exposure,
  biasExposure 
)
Apply bias correction in place

DECam bias products have been trimmed and are smaller than
the raw exposure.  The size of edge trim is computed based
on the dimensions of the input data.  Only process the inner
part of the raw exposure, and mask the outer pixels as EDGE.

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

Definition at line 73 of file decamCpIsr.py.

73  def biasCorrection(self, exposure, biasExposure):
74  """Apply bias correction in place
75 
76  DECam bias products have been trimmed and are smaller than
77  the raw exposure. The size of edge trim is computed based
78  on the dimensions of the input data. Only process the inner
79  part of the raw exposure, and mask the outer pixels as EDGE.
80 
81  Parameters
82  ----------
83  exposure : `lsst.afw.image.Exposure`
84  Exposure to process.
85  biasExposure : `lsst.afw.image.Exposure`
86  Bias exposure.
87  """
88  nEdge = _computeEdgeSize(exposure, biasExposure)
89  if nEdge > 0:
90  rawMaskedImage = exposure.maskedImage[nEdge:-nEdge, nEdge:-nEdge, LOCAL]
91  else:
92  rawMaskedImage = exposure.getMaskedImage()
93  biasCorrection(rawMaskedImage, biasExposure.getMaskedImage())
94  # Mask the unprocessed edge pixels as EDGE
95  SourceDetectionTask.setEdgeBits(
96  exposure.getMaskedImage(),
97  rawMaskedImage.getBBox(),
98  exposure.getMaskedImage().getMask().getPlaneBitMask("EDGE")
99  )
100 
def biasCorrection(maskedImage, biasMaskedImage, trimToFit=False)

◆ flatCorrection()

def lsst.obs.decam.decamCpIsr.DecamCpIsrTask.flatCorrection (   self,
  exposure,
  flatExposure 
)
Apply flat correction in place.

DECam flat products have been trimmed and are smaller than
the raw exposure.  The size of edge trim is computed based
on the dimensions of the input data.  Only process the inner
part of the raw exposure, and mask the outer pixels as EDGE.

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

Definition at line 101 of file decamCpIsr.py.

101  def flatCorrection(self, exposure, flatExposure):
102  """Apply flat correction in place.
103 
104  DECam flat products have been trimmed and are smaller than
105  the raw exposure. The size of edge trim is computed based
106  on the dimensions of the input data. Only process the inner
107  part of the raw exposure, and mask the outer pixels as EDGE.
108 
109  Parameters
110  ----------
111  exposure : `lsst.afw.image.Exposure`
112  Exposure to process.
113  flatExposure : `lsst.afw.image.Exposure`
114  Flatfield exposure.
115  """
116  nEdge = _computeEdgeSize(exposure, flatExposure)
117  if nEdge > 0:
118  rawMaskedImage = exposure.maskedImage[nEdge:-nEdge, nEdge:-nEdge, LOCAL]
119  else:
120  rawMaskedImage = exposure.getMaskedImage()
122  rawMaskedImage,
123  flatExposure.getMaskedImage(),
124  self.config.flatScalingType,
125  self.config.flatUserScale
126  )
127  # Mask the unprocessed edge pixels as EDGE
128  SourceDetectionTask.setEdgeBits(
129  exposure.getMaskedImage(),
130  rawMaskedImage.getBBox(),
131  exposure.getMaskedImage().getMask().getPlaneBitMask("EDGE")
132  )
133 
def flatCorrection(maskedImage, flatMaskedImage, scalingType, userScale=1.0, invert=False, trimToFit=False)

Member Data Documentation

◆ ConfigClass

lsst.obs.decam.decamCpIsr.DecamCpIsrTask.ConfigClass = DecamCpIsrConfig
static

Definition at line 71 of file decamCpIsr.py.


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