lsst.ip.isr  13.0-15-g0af5a6c+12
 All Classes Namespaces Files Functions Variables Typedefs Macros Groups
Functions
lsst.ip.isr.isrFunctions Namespace Reference

Functions

def createPsf
 
def transposeMaskedImage
 
def interpolateDefectList
 
def defectListFromFootprintList
 
def transposeDefectList
 
def maskPixelsFromDefectList
 
def getDefectListFromMask
 
def makeThresholdMask
 
def interpolateFromMask
 
def saturationCorrection
 
def biasCorrection
 
def darkCorrection
 
def updateVariance
 
def flatCorrection
 
def illuminationCorrection
 
def overscanCorrection
 

Function Documentation

def lsst.ip.isr.isrFunctions.biasCorrection (   maskedImage,
  biasMaskedImage 
)
Apply bias correction in place

@param[in,out] maskedImage  masked image to correct
@param[in] biasMaskedImage  bias, as a masked image

Definition at line 203 of file isrFunctions.py.

def lsst.ip.isr.isrFunctions.createPsf (   fwhm)
Make a double Gaussian PSF

@param[in] fwhm  FWHM of double Gaussian smoothing kernel
@return measAlg.DoubleGaussianPsf

Definition at line 37 of file isrFunctions.py.

def lsst.ip.isr.isrFunctions.darkCorrection (   maskedImage,
  darkMaskedImage,
  expScale,
  darkScale 
)
Apply dark correction in place

maskedImage -= dark * expScaling / darkScaling

@param[in,out] maskedImage  afw.image.MaskedImage to correct
@param[in] darkMaskedImage  dark afw.image.MaskedImage
@param[in] expScale  exposure scale
@param[in] darkScale  dark scale

Definition at line 215 of file isrFunctions.py.

def lsst.ip.isr.isrFunctions.defectListFromFootprintList (   fpList,
  growFootprints = 1 
)
Compute a defect list from a footprint list, optionally growing the footprints

@param[in] fpList  footprint list
@param[in] growFootprints  amount by which to grow footprints of detected regions
@return a list of defects (meas.algorithms.Defect)

Definition at line 76 of file isrFunctions.py.

def lsst.ip.isr.isrFunctions.flatCorrection (   maskedImage,
  flatMaskedImage,
  scalingType,
  userScale = 1.0 
)
Apply flat correction in place

@param[in,out] maskedImage  afw.image.MaskedImage to correct
@param[in] flatMaskedImage  flat field afw.image.MaskedImage
@param[in] scalingType  how to compute flat scale; one of 'MEAN', 'MEDIAN' or 'USER'
@param[in] userScale  scale to use if scalingType is 'USER', else ignored

Definition at line 246 of file isrFunctions.py.

def lsst.ip.isr.isrFunctions.getDefectListFromMask (   maskedImage,
  maskName,
  growFootprints = 1 
)
Compute a defect list from a specified mask plane

@param[in] maskedImage  masked image to process
@param[in] maskName  mask plane name, or list of names
@param[in] growFootprints  amount by which to grow footprints of detected regions
@return a list of defects (each an meas.algrithms.Defect) of regions in mask

Definition at line 129 of file isrFunctions.py.

def lsst.ip.isr.isrFunctions.illuminationCorrection (   maskedImage,
  illumMaskedImage,
  illumScale 
)
Apply illumination correction in place

@param[in,out] maskedImage  afw.image.MaskedImage to correct
@param[in] illumMaskedImage  illumination correction masked image
@param[in] illumScale  scale value for illumination correction

Definition at line 274 of file isrFunctions.py.

def lsst.ip.isr.isrFunctions.interpolateDefectList (   maskedImage,
  defectList,
  fwhm,
  fallbackValue = None 
)
Interpolate over defects specified in a defect list

@param[in,out] maskedImage  masked image to process
@param[in] defectList  defect list
@param[in] fwhm  FWHM of double Gaussian smoothing kernel
@param[in] fallbackValue  fallback value if an interpolated value cannot be determined;
                          if None then use clipped mean image value

Definition at line 59 of file isrFunctions.py.

def lsst.ip.isr.isrFunctions.interpolateFromMask (   maskedImage,
  fwhm,
  growFootprints = 1,
  maskName = 'SAT',
  fallbackValue = None 
)
Interpolate over defects identified by a particular mask plane

@param[in,out] maskedImage  afw.image.MaskedImage to process
@param[in] fwhm  FWHM of double Gaussian smoothing kernel
@param[in] growFootprints  amount by which to grow footprints of detected regions
@param[in] maskName  mask plane name
@param[in] fallbackValue  value of last resort for interpolation

Definition at line 168 of file isrFunctions.py.

def lsst.ip.isr.isrFunctions.makeThresholdMask (   maskedImage,
  threshold,
  growFootprints = 1,
  maskName = 'SAT' 
)
Mask pixels based on threshold detection

@param[in,out] maskedImage  afw.image.MaskedImage to process; the mask is altered
@param[in] threshold  detection threshold
@param[in] growFootprints  amount by which to grow footprints of detected regions
@param[in] maskName  mask plane name
@return a list of defects (meas.algrithms.Defect) of regions set in the mask.

Definition at line 143 of file isrFunctions.py.

def lsst.ip.isr.isrFunctions.maskPixelsFromDefectList (   maskedImage,
  defectList,
  maskName = 'BAD' 
)
Set mask plane based on a defect list

@param[in,out] maskedImage  afw.image.MaskedImage to process; mask plane is updated
@param[in] defectList  a list of defects (afw.meas.algorithms.Defect)
@param[in] maskName  mask plane name

Definition at line 114 of file isrFunctions.py.

def lsst.ip.isr.isrFunctions.overscanCorrection (   ampMaskedImage,
  overscanImage,
  fitType = 'MEDIAN',
  order = 1,
  collapseRej = 3.0,
  statControl = None 
)
Apply overscan correction in place

@param[in,out] ampMaskedImage  masked image to correct
@param[in] overscanImage  overscan data as an afw.image.Image or afw.image.MaskedImage.
                          If a masked image is passed in the mask plane will be used
                          to constrain the fit of the bias level.
@param[in] fitType  type of fit for overscan correction; one of:
                    - 'MEAN'
                    - 'MEDIAN'
                    - 'POLY' (ordinary polynomial)
                    - 'CHEB' (Chebyshev polynomial)
                    - 'LEG' (Legendre polynomial)
                    - 'NATURAL_SPLINE', 'CUBIC_SPLINE', 'AKIMA_SPLINE' (splines)
@param[in] order  polynomial order or spline knots (ignored unless fitType
                  indicates a polynomial or spline)
@param[in] collapseRej  Rejection threshold (sigma) for collapsing dimension of overscan
@param[in] statControl  Statistics control object

Definition at line 289 of file isrFunctions.py.

def lsst.ip.isr.isrFunctions.saturationCorrection (   maskedImage,
  saturation,
  fwhm,
  growFootprints = 1,
  interpolate = True,
  maskName = 'SAT',
  fallbackValue = None 
)
Mark saturated pixels and optionally interpolate over them

@param[in,out] maskedImage  afw.image.MaskedImage to process
@param[in] saturation  saturation level (used as a detection threshold)
@param[in] fwhm  FWHM of double Gaussian smoothing kernel
@param[in] growFootprints  amount by which to grow footprints of detected regions
@param[in] interpolate  interpolate over saturated pixels?
@param[in] maskName  mask plane name
@param[in] fallbackValue  value of last resort for interpolation

Definition at line 182 of file isrFunctions.py.

def lsst.ip.isr.isrFunctions.transposeDefectList (   defectList)
Make a transposed copy of a defect list

@param[in] defectList  a list of defects (afw.meas.algorithms.Defect)
@return a defect list with transposed defects

Definition at line 99 of file isrFunctions.py.

def lsst.ip.isr.isrFunctions.transposeMaskedImage (   maskedImage)
Make a transposed copy of a masked image

@param[in] maskedImage  afw.image.MaskedImage to process
@return transposed masked image

Definition at line 46 of file isrFunctions.py.

def lsst.ip.isr.isrFunctions.updateVariance (   maskedImage,
  gain,
  readNoise 
)
Set the variance plane based on the image plane

@param[in,out] maskedImage  afw.image.MaskedImage; image plane is read and variance plane is written
@param[in] gain  amplifier gain (e-/ADU)
@param[in] readNoise  amplifier read noise (ADU/pixel)

Definition at line 233 of file isrFunctions.py.