lsst.ip.isr  15.0-2-g947dc0d+9
Functions
lsst.ip.isr.isrFunctions Namespace Reference

Functions

def createPsf (fwhm)
 
def transposeMaskedImage (maskedImage)
 
def interpolateDefectList (maskedImage, defectList, fwhm, fallbackValue=None)
 
def defectListFromFootprintList (fpList)
 
def transposeDefectList (defectList)
 
def maskPixelsFromDefectList (maskedImage, defectList, maskName='BAD')
 
def getDefectListFromMask (maskedImage, maskName)
 
def makeThresholdMask (maskedImage, threshold, growFootprints=1, maskName='SAT')
 
def interpolateFromMask (maskedImage, fwhm, growFootprints=1, maskName='SAT', fallbackValue=None)
 
def saturationCorrection (maskedImage, saturation, fwhm, growFootprints=1, interpolate=True, maskName='SAT', fallbackValue=None)
 
def biasCorrection (maskedImage, biasMaskedImage)
 
def darkCorrection (maskedImage, darkMaskedImage, expScale, darkScale, invert=False)
 
def updateVariance (maskedImage, gain, readNoise)
 
def flatCorrection (maskedImage, flatMaskedImage, scalingType, userScale=1.0, invert=False)
 
def illuminationCorrection (maskedImage, illumMaskedImage, illumScale)
 
def overscanCorrection (ampMaskedImage, overscanImage, fitType='MEDIAN', order=1, collapseRej=3.0, statControl=None)
 
def attachTransmissionCurve (exposure, opticsTransmission=None, filterTransmission=None, sensorTransmission=None, atmosphereTransmission=None)
 

Function Documentation

◆ attachTransmissionCurve()

def lsst.ip.isr.isrFunctions.attachTransmissionCurve (   exposure,
  opticsTransmission = None,
  filterTransmission = None,
  sensorTransmission = None,
  atmosphereTransmission = None 
)
Attach a TransmissionCurve to an Exposure, given separate curves for
different components.

Parameters
----------
exposure : `lsst.afw.image.Exposure`
    Exposure object to modify by attaching the product of all given
    ``TransmissionCurves`` in post-assembly trimmed detector coordinates.
    Must have a valid ``Detector`` attached that matches the detector
    associated with sensorTransmission.
opticsTransmission : `lsst.afw.image.TransmissionCurve`
    A ``TransmissionCurve`` that represents the throughput of the optics,
    to be evaluated in focal-plane coordinates.
filterTransmission : `lsst.afw.image.TransmissionCurve`
    A ``TransmissionCurve`` that represents the throughput of the filter
    itself, to be evaluated in focal-plane coordinates.
sensorTransmission : `lsst.afw.image.TransmissionCurve`
    A ``TransmissionCurve`` that represents the throughput of the sensor
    itself, to be evaluated in post-assembly trimmed detector coordinates.
atmosphereTransmission : `lsst.afw.image.TransmissionCurve`
    A ``TransmissionCurve`` that represents the throughput of the
    atmosphere, assumed to be spatially constant.

All ``TransmissionCurve`` arguments are optional; if none are provided, the
attached ``TransmissionCurve`` will have unit transmission everywhere.

Returns
-------
combined : ``lsst.afw.image.TransmissionCurve``
    The TransmissionCurve attached to the exposure.

Definition at line 452 of file isrFunctions.py.

◆ biasCorrection()

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 200 of file isrFunctions.py.

◆ createPsf()

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 38 of file isrFunctions.py.

◆ darkCorrection()

def lsst.ip.isr.isrFunctions.darkCorrection (   maskedImage,
  darkMaskedImage,
  expScale,
  darkScale,
  invert = False 
)
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
@param[in] invert     if True, remove the dark from an already-corrected image

Definition at line 212 of file isrFunctions.py.

◆ defectListFromFootprintList()

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

@param[in] fpList  footprint list

Definition at line 77 of file isrFunctions.py.

◆ flatCorrection()

def lsst.ip.isr.isrFunctions.flatCorrection (   maskedImage,
  flatMaskedImage,
  scalingType,
  userScale = 1.0,
  invert = False 
)
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
@param[in] invert  if True, unflatten an already-flattened image instead.

Definition at line 247 of file isrFunctions.py.

◆ getDefectListFromMask()

def lsst.ip.isr.isrFunctions.getDefectListFromMask (   maskedImage,
  maskName 
)
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

Definition at line 120 of file isrFunctions.py.

◆ illuminationCorrection()

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 279 of file isrFunctions.py.

◆ interpolateDefectList()

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 60 of file isrFunctions.py.

◆ interpolateFromMask()

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 157 of file isrFunctions.py.

◆ makeThresholdMask()

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 132 of file isrFunctions.py.

◆ maskPixelsFromDefectList()

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 105 of file isrFunctions.py.

◆ overscanCorrection()

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 294 of file isrFunctions.py.

◆ saturationCorrection()

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 179 of file isrFunctions.py.

◆ transposeDefectList()

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 90 of file isrFunctions.py.

◆ transposeMaskedImage()

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 47 of file isrFunctions.py.

◆ updateVariance()

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 234 of file isrFunctions.py.