|
lsst.ip.isr g7ad7012e6f+e5dcc010a7
|
Functions | |
| createPsf (fwhm) | |
| transposeMaskedImage (maskedImage) | |
| interpolateDefectList (maskedImage, defectList, fwhm, fallbackValue=None, maskNameList=None, useLegacyInterp=True) | |
| makeThresholdMask (maskedImage, threshold, growFootprints=1, maskName='SAT') | |
| growMasks (mask, radius=0, maskNameList=['BAD'], maskValue="BAD") | |
| maskE2VEdgeBleed (exposure, e2vEdgeBleedSatMinArea=10000, e2vEdgeBleedSatMaxArea=100000, e2vEdgeBleedYMax=350, saturatedMaskName="SAT", log=None) | |
| maskDECamEdgeBleed (exposure, satMinArea=10000, approachRows=20, nSigma=5.0, nRowsCheck=20, nRowsCheckShort=5, minUsablePixelsPerRow=30, minLowFraction=0.03, minLowFractionExtent=0.01, minBlockedRows=5, marginFraction=0.125, saturatedMaskName="SAT", log=None) | |
| maskITLEdgeBleed (ccdExposure, badAmpDict, fpCore, itlEdgeBleedSatMinArea=10000, itlEdgeBleedSatMaxArea=100000, itlEdgeBleedThreshold=5000., itlEdgeBleedModelConstant=0.02, saturatedMaskName="SAT", log=None) | |
| _applyMaskITLEdgeBleed (ccdExposure, xCore, satLevel, widthSat, itlEdgeBleedThreshold=5000., itlEdgeBleedModelConstant=0.03, saturatedMaskName="SAT", log=None) | |
| maskITLSatSag (ccdExposure, fpCore, saturatedMaskName="SAT") | |
| maskITLDip (exposure, detectorConfig, maskPlaneNames=["SUSPECT", "ITL_DIP"], log=None) | |
| interpolateFromMask (maskedImage, fwhm, growSaturatedFootprints=1, maskNameList=['SAT'], fallbackValue=None, useLegacyInterp=True) | |
| saturationCorrection (maskedImage, saturation, fwhm, growFootprints=1, interpolate=True, maskName='SAT', fallbackValue=None, useLegacyInterp=True) | |
| trimToMatchCalibBBox (rawMaskedImage, calibMaskedImage) | |
| biasCorrection (maskedImage, biasMaskedImage, trimToFit=False) | |
| darkCorrection (maskedImage, darkMaskedImage, expScale, darkScale, invert=False, trimToFit=False) | |
| updateVariance (maskedImage, gain, readNoise, replace=True) | |
| flatCorrection (maskedImage, flatMaskedImage, scalingType, userScale=1.0, invert=False, trimToFit=False) | |
| illuminationCorrection (maskedImage, illumMaskedImage, illumScale, trimToFit=True) | |
| gainContext (exp, image, apply, gains=None, invert=False, isTrimmed=True) | |
| attachTransmissionCurve (exposure, opticsTransmission=None, filterTransmission=None, sensorTransmission=None, atmosphereTransmission=None) | |
| applyGains (exposure, normalizeGains=False, ptcGains=None, isTrimmed=True) | |
| widenSaturationTrails (mask) | |
| setBadRegions (exposure, badStatistic="MEDIAN") | |
| checkFilter (exposure, filterList, log) | |
| getPhysicalFilter (filterLabel, log) | |
| countMaskedPixels (maskedIm, maskPlane) | |
| getExposureGains (exposure) | |
| getExposureReadNoises (exposure) | |
| isTrimmedExposure (exposure) | |
| isTrimmedImage (image, detector) | |
| compareCameraKeywords (doRaiseOnCalibMismatch, cameraKeywordsToCompare, exposureMetadata, calib, calibName, log=None) | |
| symmetrize (inputArray) | |
|
protected |
Apply ITL edge bleed masking model.
Parameters
----------
ccdExposure : `lsst.afw.image.Exposure`
Exposure to apply masking to.
xCore: `int`
X coordinate of the saturated core.
satLevel: `float`
Minimum saturation level of the detector.
widthSat: `float`
Width of the saturated core.
itlEdgeBleedThreshold : `float`, optional
Threshold above median sky background for edge bleed detection
(electron units).
itlEdgeBleedModelConstant : `float`, optional
Constant in the decaying exponential in the edge bleed masking.
saturatedMaskName : `str`, optional
Mask name for saturation.
log : `logging.Logger`, optional
Logger to handle messages.
Definition at line 573 of file isrFunctions.py.
| applyGains | ( | exposure, | |
| normalizeGains = False, | |||
| ptcGains = None, | |||
| isTrimmed = True ) |
Scale an exposure by the amplifier gains.
Parameters
----------
exposure : `lsst.afw.image.Exposure`
Exposure to process. The image is modified.
normalizeGains : `Bool`, optional
If True, then amplifiers are scaled to force the median of
each amplifier to equal the median of those medians.
ptcGains : `dict`[`str`], optional
Dictionary keyed by amp name containing the PTC gains.
isTrimmed : `bool`, optional
Is the input image trimmed?
Definition at line 1229 of file isrFunctions.py.
| 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.
Returns
-------
combined : `lsst.afw.image.TransmissionCurve`
The TransmissionCurve attached to the exposure.
Notes
-----
All ``TransmissionCurve`` arguments are optional; if none are provided, the
attached ``TransmissionCurve`` will have unit transmission everywhere.
Definition at line 1177 of file isrFunctions.py.
| biasCorrection | ( | maskedImage, | |
| biasMaskedImage, | |||
| trimToFit = False ) |
Apply bias correction in place.
Parameters
----------
maskedImage : `lsst.afw.image.MaskedImage`
Image to process. The image is modified by this method.
biasMaskedImage : `lsst.afw.image.MaskedImage`
Bias image of the same size as ``maskedImage``
trimToFit : `Bool`, optional
If True, raw data is symmetrically trimmed to match
calibration size.
Raises
------
RuntimeError
Raised if ``maskedImage`` and ``biasMaskedImage`` do not have
the same size.
Definition at line 931 of file isrFunctions.py.
| checkFilter | ( | exposure, | |
| filterList, | |||
| log ) |
Check to see if an exposure is in a filter specified by a list.
The goal of this is to provide a unified filter checking interface
for all filter dependent stages.
Parameters
----------
exposure : `lsst.afw.image.Exposure`
Exposure to examine.
filterList : `list` [`str`]
List of physical_filter names to check.
log : `logging.Logger`
Logger to handle messages.
Returns
-------
result : `bool`
True if the exposure's filter is contained in the list.
Definition at line 1367 of file isrFunctions.py.
| compareCameraKeywords | ( | doRaiseOnCalibMismatch, | |
| cameraKeywordsToCompare, | |||
| exposureMetadata, | |||
| calib, | |||
| calibName, | |||
| log = None ) |
Compare header keywords to confirm camera states match.
Parameters
----------
doRaiseOnCalibMismatch : `bool`
Raise on calibration mismatch? Otherwise, log a warning.
cameraKeywordsToCompare : `list` [`str`]
List of camera keywords to compare.
exposureMetadata : `lsst.daf.base.PropertyList`
Header for the exposure being processed.
calib : `lsst.afw.image.Exposure` or `lsst.ip.isr.IsrCalib`
Calibration to be applied.
calibName : `str`
Calib type for log message.
log : `logging.Logger`, optional
Logger to handle messages.
Definition at line 1559 of file isrFunctions.py.
| countMaskedPixels | ( | maskedIm, | |
| maskPlane ) |
Count the number of pixels in a given mask plane.
Parameters
----------
maskedIm : `~lsst.afw.image.MaskedImage`
Masked image to examine.
maskPlane : `str`
Name of the mask plane to examine.
Returns
-------
nPix : `int`
Number of pixels in the requested mask plane.
Definition at line 1439 of file isrFunctions.py.
| createPsf | ( | fwhm | ) |
Make a double Gaussian PSF.
Parameters
----------
fwhm : scalar
FWHM of double Gaussian smoothing kernel.
Returns
-------
psf : `lsst.meas.algorithms.DoubleGaussianPsf`
The created smoothing kernel.
Definition at line 74 of file isrFunctions.py.
| darkCorrection | ( | maskedImage, | |
| darkMaskedImage, | |||
| expScale, | |||
| darkScale, | |||
| invert = False, | |||
| trimToFit = False ) |
Apply dark correction in place.
Parameters
----------
maskedImage : `lsst.afw.image.MaskedImage`
Image to process. The image is modified by this method.
darkMaskedImage : `lsst.afw.image.MaskedImage`
Dark image of the same size as ``maskedImage``.
expScale : scalar
Dark exposure time for ``maskedImage``.
darkScale : scalar
Dark exposure time for ``darkMaskedImage``.
invert : `Bool`, optional
If True, re-add the dark to an already corrected image.
trimToFit : `Bool`, optional
If True, raw data is symmetrically trimmed to match
calibration size.
Raises
------
RuntimeError
Raised if ``maskedImage`` and ``darkMaskedImage`` do not have
the same size.
Notes
-----
The dark correction is applied by calculating:
maskedImage -= dark * expScaling / darkScaling
Definition at line 960 of file isrFunctions.py.
| flatCorrection | ( | maskedImage, | |
| flatMaskedImage, | |||
| scalingType, | |||
| userScale = 1.0, | |||
| invert = False, | |||
| trimToFit = False ) |
Apply flat correction in place.
Parameters
----------
maskedImage : `lsst.afw.image.MaskedImage`
Image to process. The image is modified.
flatMaskedImage : `lsst.afw.image.MaskedImage`
Flat image of the same size as ``maskedImage``
scalingType : str
Flat scale computation method. Allowed values are 'MEAN',
'MEDIAN', or 'USER'.
userScale : scalar, optional
Scale to use if ``scalingType='USER'``.
invert : `Bool`, optional
If True, unflatten an already flattened image.
trimToFit : `Bool`, optional
If True, raw data is symmetrically trimmed to match
calibration size.
Raises
------
RuntimeError
Raised if ``maskedImage`` and ``flatMaskedImage`` do not have
the same size or if ``scalingType`` is not an allowed value.
Definition at line 1032 of file isrFunctions.py.
| gainContext | ( | exp, | |
| image, | |||
| apply, | |||
| gains = None, | |||
| invert = False, | |||
| isTrimmed = True ) |
Context manager that applies and removes gain.
Parameters
----------
exp : `lsst.afw.image.Exposure`
Exposure to apply/remove gain.
image : `lsst.afw.image.Image`
Image to apply/remove gain.
apply : `bool`
If True, apply and remove the amplifier gain.
gains : `dict` [`str`, `float`], optional
A dictionary, keyed by amplifier name, of the gains to use.
If gains is None, the nominal gains in the amplifier object are used.
invert : `bool`, optional
Invert the gains (e.g. convert electrons to adu temporarily)?
isTrimmed : `bool`, optional
Is this a trimmed exposure?
Yields
------
exp : `lsst.afw.image.Exposure`
Exposure with the gain applied.
Definition at line 1115 of file isrFunctions.py.
| getExposureGains | ( | exposure | ) |
Get the per-amplifier gains used for this exposure.
Parameters
----------
exposure : `lsst.afw.image.Exposure`
The exposure to find gains for.
Returns
-------
gains : `dict` [`str` `float`]
Dictionary of gain values, keyed by amplifier name.
Returns empty dict when detector is None.
Definition at line 1459 of file isrFunctions.py.
| getExposureReadNoises | ( | exposure | ) |
Get the per-amplifier read noise used for this exposure.
Parameters
----------
exposure : `lsst.afw.image.Exposure`
The exposure to find read noise for.
Returns
-------
readnoises : `dict` [`str` `float`]
Dictionary of read noise values, keyed by amplifier name.
Returns empty dict when detector is None.
Definition at line 1491 of file isrFunctions.py.
| getPhysicalFilter | ( | filterLabel, | |
| log ) |
Get the physical filter label associated with the given filterLabel.
If ``filterLabel`` is `None` or there is no physicalLabel attribute
associated with the given ``filterLabel``, the returned label will be
"Unknown".
Parameters
----------
filterLabel : `lsst.afw.image.FilterLabel`
The `lsst.afw.image.FilterLabel` object from which to derive the
physical filter label.
log : `logging.Logger`
Logger to handle messages.
Returns
-------
physicalFilter : `str`
The value returned by the physicalLabel attribute of ``filterLabel`` if
it exists, otherwise set to \"Unknown\".
Definition at line 1406 of file isrFunctions.py.
| growMasks | ( | mask, | |
| radius = 0, | |||
| maskNameList = ['BAD'], | |||
| maskValue = "BAD" ) |
Grow a mask by an amount and add to the requested plane.
Parameters
----------
mask : `lsst.afw.image.Mask`
Mask image to process.
radius : scalar
Amount to grow the mask.
maskNameList : `str` or `list` [`str`]
Mask names that should be grown.
maskValue : `str`
Mask plane to assign the newly masked pixels to.
Definition at line 203 of file isrFunctions.py.
| illuminationCorrection | ( | maskedImage, | |
| illumMaskedImage, | |||
| illumScale, | |||
| trimToFit = True ) |
Apply illumination correction in place.
Parameters
----------
maskedImage : `lsst.afw.image.MaskedImage`
Image to process. The image is modified.
illumMaskedImage : `lsst.afw.image.MaskedImage`
Illumination correction image of the same size as ``maskedImage``.
illumScale : scalar
Scale factor for the illumination correction.
trimToFit : `Bool`, optional
If True, raw data is symmetrically trimmed to match
calibration size.
Raises
------
RuntimeError
Raised if ``maskedImage`` and ``illumMaskedImage`` do not have
the same size.
Definition at line 1083 of file isrFunctions.py.
| interpolateDefectList | ( | maskedImage, | |
| defectList, | |||
| fwhm, | |||
| fallbackValue = None, | |||
| maskNameList = None, | |||
| useLegacyInterp = True ) |
Interpolate over defects specified in a defect list.
Parameters
----------
maskedImage : `lsst.afw.image.MaskedImage`
Image to process.
defectList : `lsst.meas.algorithms.Defects`
List of defects to interpolate over.
fwhm : `float`
FWHM of double Gaussian smoothing kernel.
fallbackValue : scalar, optional
Fallback value if an interpolated value cannot be determined.
If None, then the clipped mean of the image is used.
maskNameList : `list [string]`
List of the defects to interpolate over (used for GP interpolator).
useLegacyInterp : `bool`
Use the legacy interpolation (polynomial interpolation) if True. Use
Gaussian Process interpolation if False.
Notes
-----
The ``fwhm`` parameter is used to create a PSF, but the underlying
interpolation code (`lsst.meas.algorithms.interpolateOverDefects`) does
not currently make use of this information in legacy Interpolation, but use
if for the Gaussian Process as an estimation of the correlation lenght.
Definition at line 111 of file isrFunctions.py.
| interpolateFromMask | ( | maskedImage, | |
| fwhm, | |||
| growSaturatedFootprints = 1, | |||
| maskNameList = ['SAT'], | |||
| fallbackValue = None, | |||
| useLegacyInterp = True ) |
Interpolate over defects identified by a particular set of mask planes.
Parameters
----------
maskedImage : `lsst.afw.image.MaskedImage`
Image to process.
fwhm : `float`
FWHM of double Gaussian smoothing kernel.
growSaturatedFootprints : scalar, optional
Number of pixels to grow footprints for saturated pixels.
maskNameList : `List` of `str`, optional
Mask plane name.
fallbackValue : scalar, optional
Value of last resort for interpolation.
Notes
-----
The ``fwhm`` parameter is used to create a PSF, but the underlying
interpolation code (`lsst.meas.algorithms.interpolateOverDefects`) does
not currently make use of this information.
Definition at line 802 of file isrFunctions.py.
| isTrimmedExposure | ( | exposure | ) |
Check if the unused pixels (pre-/over-scan pixels) have
been trimmed from an exposure.
Parameters
----------
exposure : `lsst.afw.image.Exposure`
The exposure to check.
Returns
-------
result : `bool`
True if the image is trimmed, else False.
Definition at line 1523 of file isrFunctions.py.
| isTrimmedImage | ( | image, | |
| detector ) |
Check if the unused pixels (pre-/over-scan pixels) have
been trimmed from an image
Parameters
----------
image : `lsst.afw.image.Image`
The image to check.
detector : `lsst.afw.cameraGeom.Detector`
The detector associated with the image.
Returns
-------
result : `bool`
True if the image is trimmed, else False.
Definition at line 1540 of file isrFunctions.py.
| makeThresholdMask | ( | maskedImage, | |
| threshold, | |||
| growFootprints = 1, | |||
| maskName = 'SAT' ) |
Mask pixels based on threshold detection.
Parameters
----------
maskedImage : `lsst.afw.image.MaskedImage`
Image to process. Only the mask plane is updated.
threshold : scalar
Detection threshold.
growFootprints : scalar, optional
Number of pixels to grow footprints of detected regions.
maskName : str, optional
Mask plane name, or list of names to convert
Returns
-------
defectList : `lsst.meas.algorithms.Defects`
Defect list constructed from pixels above the threshold.
Definition at line 168 of file isrFunctions.py.
| maskDECamEdgeBleed | ( | exposure, | |
| satMinArea = 10000, | |||
| approachRows = 20, | |||
| nSigma = 5.0, | |||
| nRowsCheck = 20, | |||
| nRowsCheckShort = 5, | |||
| minUsablePixelsPerRow = 30, | |||
| minLowFraction = 0.03, | |||
| minLowFractionExtent = 0.01, | |||
| minBlockedRows = 5, | |||
| marginFraction = 0.125, | |||
| saturatedMaskName = "SAT", | |||
| log = None ) |
Mask DECam-style edge bleeds with low rows next to the read register.
For each amplifier that contains a large saturated footprint reaching
within ``approachRows`` of its read edge, this function identifies a dip
using the per-row fraction of usable pixels more than ``nSigma`` below
the clipped sky, measures how far the dip extends inward, and marks
those rows (plus a margin) with the saturation mask plane.
Rows next to the read edge that are unusable are the signature of a
drained serial register, which the overscan correction flags as bad;
``minBlockedRows`` rows are also flagged, despite not having a
dip measurement.
Parameters
----------
exposure : `lsst.afw.image.Exposure`
Assembled exposure to mask.
satMinArea : `int`, optional
Minimum area (pixels) of a saturated footprint to be considered.
approachRows : `int`, optional
A saturated footprint must come within this many rows of the read edge
to trigger the edge bleed check.
nSigma : `float`, optional
A pixel is "low" if it is more than this many sigma below sky.
nRowsCheck : `int`, optional
Number of rows from the read edge to check for an edge bleed dip.
nRowsCheckShort : `int`, optional
A second, shorter window from the read edge to check for a short
edge bleed dip.
minUsablePixelsPerRow : `int`, optional
Minimum number of pixels not saturated, bad or missing to search for
dips. Rows with fewer pixels may be "blocked" due to a drained
register.
minLowFraction : `float`, optional
Mean fraction of usable pixels that are low, over either ``nRowsCheck``
or ``nRowsCheckShort``, to confirm a dip.
minLowFractionExtent : `float`, optional
Fraction of usable pixels that are low that each row must exceed
to count toward the bleed height; the scan stops after five consecutive
rows that do not. Should not exceed ``minLowFraction``.
minBlockedRows : `int`, optional
Minimum number of blocked rows beyond the normal border at the read
edge to be masked if found.
marginFraction : `float`, optional
Extra rows masked beyond the measured height, as a fraction of
that height (plus one row).
saturatedMaskName : `str`, optional
Mask plane name for saturation.
log : `logging.Logger`, optional
Logger to handle messages.
Raises
------
RuntimeError
Raised if the exposure has no detector with amplifiers.
Definition at line 284 of file isrFunctions.py.
| maskE2VEdgeBleed | ( | exposure, | |
| e2vEdgeBleedSatMinArea = 10000, | |||
| e2vEdgeBleedSatMaxArea = 100000, | |||
| e2vEdgeBleedYMax = 350, | |||
| saturatedMaskName = "SAT", | |||
| log = None ) |
Mask edge bleeds in E2V detectors.
Parameters
----------
exposure : `lsst.afw.image.Exposure`
Exposure to apply masking to.
e2vEdgeBleedSatMinArea : `int`, optional
Minimum limit of saturated cores footprint area.
e2vEdgeBleedSatMaxArea : `int`, optional
Maximum limit of saturated cores footprint area.
e2vEdgeBleedYMax: `float`, optional
Height of edge bleed masking.
saturatedMaskName : `str`, optional
Mask name for saturation.
log : `logging.Logger`, optional
Logger to handle messages.
Definition at line 226 of file isrFunctions.py.
| maskITLDip | ( | exposure, | |
| detectorConfig, | |||
| maskPlaneNames = ["SUSPECT", "ITL_DIP"], | |||
| log = None ) |
Add mask bits according to the ITL dip model.
Parameters
----------
exposure : `lsst.afw.image.Exposure`
Exposure to do ITL dip masking.
detectorConfig : `lsst.ip.isr.overscanAmpConfig.OverscanDetectorConfig`
Configuration for this detector.
maskPlaneNames : `list [`str`], optional
Name of the ITL Dip mask planes.
log : `logging.Logger`, optional
If not set, a default logger will be used.
Definition at line 718 of file isrFunctions.py.
| maskITLEdgeBleed | ( | ccdExposure, | |
| badAmpDict, | |||
| fpCore, | |||
| itlEdgeBleedSatMinArea = 10000, | |||
| itlEdgeBleedSatMaxArea = 100000, | |||
| itlEdgeBleedThreshold = 5000., | |||
| itlEdgeBleedModelConstant = 0.02, | |||
| saturatedMaskName = "SAT", | |||
| log = None ) |
Mask edge bleeds in ITL detectors.
Parameters
----------
ccdExposure : `lsst.afw.image.Exposure`
Exposure to apply masking to.
badAmpDict : `dict` [`str`, `bool`]
Dictionary of amplifiers, keyed by name, value is True if
amplifier is fully masked.
fpCore : `lsst.afw.detection._detection.Footprint`
Footprint of saturated core.
itlEdgeBleedThreshold : `float`, optional
Threshold above median sky background for edge bleed detection
(electron units).
itlEdgeBleedModelConstant : `float`, optional
Constant in the decaying exponential in the edge bleed masking.
saturatedMaskName : `str`, optional
Mask name for saturation.
log : `logging.Logger`, optional
Logger to handle messages.
Definition at line 457 of file isrFunctions.py.
| maskITLSatSag | ( | ccdExposure, | |
| fpCore, | |||
| saturatedMaskName = "SAT" ) |
Mask columns presenting saturation sag in saturated footprints in
ITL detectors.
Parameters
----------
ccdExposure : `lsst.afw.image.Exposure`
Exposure to apply masking to.
fpCore : `lsst.afw.detection._detection.Footprint`
Footprint of saturated core.
saturatedMaskName : `str`, optional
Mask name for saturation.
Definition at line 690 of file isrFunctions.py.
| saturationCorrection | ( | maskedImage, | |
| saturation, | |||
| fwhm, | |||
| growFootprints = 1, | |||
| interpolate = True, | |||
| maskName = 'SAT', | |||
| fallbackValue = None, | |||
| useLegacyInterp = True ) |
Mark saturated pixels and optionally interpolate over them
Parameters
----------
maskedImage : `lsst.afw.image.MaskedImage`
Image to process.
saturation : scalar
Saturation level used as the detection threshold.
fwhm : `float`
FWHM of double Gaussian smoothing kernel.
growFootprints : scalar, optional
Number of pixels to grow footprints of detected regions.
interpolate : Bool, optional
If True, saturated pixels are interpolated over.
maskName : str, optional
Mask plane name.
fallbackValue : scalar, optional
Value of last resort for interpolation.
Notes
-----
The ``fwhm`` parameter is used to create a PSF, but the underlying
interpolation code (`lsst.meas.algorithms.interpolateOverDefects`) does
not currently make use of this information.
Definition at line 843 of file isrFunctions.py.
| setBadRegions | ( | exposure, | |
| badStatistic = "MEDIAN" ) |
Set all BAD areas of the chip to the average of the rest of the exposure
Parameters
----------
exposure : `lsst.afw.image.Exposure`
Exposure to mask. The exposure mask is modified.
badStatistic : `str`, optional
Statistic to use to generate the replacement value from the
image data. Allowed values are 'MEDIAN' or 'MEANCLIP'.
Returns
-------
badPixelCount : scalar
Number of bad pixels masked.
badPixelValue : scalar
Value substituted for bad pixels.
Raises
------
RuntimeError
Raised if `badStatistic` is not an allowed value.
Definition at line 1320 of file isrFunctions.py.
| symmetrize | ( | inputArray | ) |
Copy array over 4 quadrants prior to convolution.
Parameters
----------
inputarray : `numpy.array`
Input array to symmetrize.
Returns
-------
aSym : `numpy.array`
Symmetrized array.
Definition at line 1632 of file isrFunctions.py.
| transposeMaskedImage | ( | maskedImage | ) |
Make a transposed copy of a masked image.
Parameters
----------
maskedImage : `lsst.afw.image.MaskedImage`
Image to process.
Returns
-------
transposed : `lsst.afw.image.MaskedImage`
The transposed copy of the input image.
Definition at line 91 of file isrFunctions.py.
| trimToMatchCalibBBox | ( | rawMaskedImage, | |
| calibMaskedImage ) |
Compute number of edge trim pixels to match the calibration data.
Use the dimension difference between the raw exposure and the
calibration exposure to compute the edge trim pixels. This trim
is applied symmetrically, with the same number of pixels masked on
each side.
Parameters
----------
rawMaskedImage : `lsst.afw.image.MaskedImage`
Image to trim.
calibMaskedImage : `lsst.afw.image.MaskedImage`
Calibration image to draw new bounding box from.
Returns
-------
replacementMaskedImage : `lsst.afw.image.MaskedImage`
``rawMaskedImage`` trimmed to the appropriate size.
Raises
------
RuntimeError
Raised if ``rawMaskedImage`` cannot be symmetrically trimmed to
match ``calibMaskedImage``.
Definition at line 883 of file isrFunctions.py.
| updateVariance | ( | maskedImage, | |
| gain, | |||
| readNoise, | |||
| replace = True ) |
Set the variance plane based on the image plane.
The maskedImage must have units of `adu` (if gain != 1.0) or
electron (if gain == 1.0). This routine will always produce a
variance plane in the same units as the image.
Parameters
----------
maskedImage : `lsst.afw.image.MaskedImage`
Image to process. The variance plane is modified.
gain : scalar
The amplifier gain in electron/adu.
readNoise : scalar
The amplifier read noise in electron/pixel.
replace : `bool`, optional
Replace the current variance? If False, the image
variance will be added to the current variance plane.
Definition at line 1004 of file isrFunctions.py.
| widenSaturationTrails | ( | mask | ) |
Grow the saturation trails by an amount dependent on the width of the
trail.
Parameters
----------
mask : `lsst.afw.image.Mask`
Mask which will have the saturated areas grown.
Definition at line 1272 of file isrFunctions.py.