lsst.ip.isr
16.0+5
|
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) |
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 483 of file isrFunctions.py.
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.
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, | |||
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.
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.
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.
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.
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.
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.
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.
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.
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.
def lsst.ip.isr.isrFunctions.overscanCorrection | ( | ampMaskedImage, | |
overscanImage, | |||
fitType = 'MEDIAN' , |
|||
order = 1 , |
|||
collapseRej = 3.0 , |
|||
statControl = None |
|||
) |
Apply overscan correction in-place The ``ampMaskedImage`` and ``overscanImage`` are modified, with the fit subtracted. Note that the ``overscanImage`` should not be a subimage of the ``ampMaskedImage``, to avoid being subtracted twice. Parameters ---------- ampMaskedImage : `lsst.afw.image.MaskedImage` Image of amplifier to correct; modified. overscanImage : `lsst.afw.image.Image` or `lsst.afw.image.MaskedImage` Image of overscan; modified. fitType : `str` Type of fit for overscan correction. May be one of: - ``MEAN``: use mean of overscan. - ``MEDIAN``: use median of overscan. - ``POLY``: fit with ordinary polynomial. - ``CHEB``: fit with Chebyshev polynomial. - ``LEG``: fit with Legendre polynomial. - ``NATURAL_SPLINE``: fit with natural spline. - ``CUBIC_SPLINE``: fit with cubic spline. - ``AKIMA_SPLINE``: fit with Akima spline. order : `int` Polynomial order or number of spline knots; ignored unless ``fitType`` indicates a polynomial or spline. collapseRej : `float` Rejection threshold (sigma) for collapsing dimension of overscan. statControl : `lsst.afw.math.StatisticsControl` Statistics control object. Returns ------- result : `lsst.pipe.base.Struct` Result struct with components: - ``imageFit``: Value(s) removed from image (scalar or `lsst.afw.image.Image`) - ``overscanFit``: Value(s) removed from overscan (scalar or `lsst.afw.image.Image`)
Definition at line 294 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 179 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 90 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 47 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 234 of file isrFunctions.py.