|
lsst.ip.isr
19.0.0-19-ga9bf60b+1
|
Public Member Functions | |
| def | __init__ (self, statControl=None, kwargs) |
| def | run (self, ampImage, overscanImage) |
| def | measureConstantOverscan (self, image) |
| def | maskOutliers (self, imageArray) |
| def | collapseArrayMedian (self, maskedArray) |
| def | splineFit (self, indices, collapsed, numBins) |
| def | measureVectorOverscan (self, image) |
| def | debugView (self, image, model) |
Static Public Member Functions | |
| def | integerConvert (image) |
| def | getImageArray (image) |
| def | transpose (imageArray) |
| def | collapseArray (maskedArray) |
| def | splineEval (indices, interp) |
| def | maskExtrapolated (collapsed) |
Public Attributes | |
| statControl | |
Static Public Attributes | |
| ConfigClass = OverscanCorrectionTaskConfig | |
Correction task for overscan.
This class contains a number of utilities that are easier to
understand and use when they are not embedded in nested if/else
loops.
Parameters
----------
statControl : `lsst.afw.math.StatisticsControl`, optional
Statistics control object.
Definition at line 70 of file overscan.py.
| def lsst.ip.isr.overscan.OverscanCorrectionTask.__init__ | ( | self, | |
statControl = None, |
|||
| kwargs | |||
| ) |
Definition at line 85 of file overscan.py.
|
static |
Collapse overscan array (and mask) to a 1-D vector of values.
Parameters
----------
maskedArray : `numpy.ma.masked_array`
Masked array of input overscan data.
Returns
-------
collapsed : `numpy.ma.masked_array`
Single dimensional overscan data, combined with the mean.
Definition at line 300 of file overscan.py.
| def lsst.ip.isr.overscan.OverscanCorrectionTask.collapseArrayMedian | ( | self, | |
| maskedArray | |||
| ) |
Collapse overscan array (and mask) to a 1-D vector of using the
correct integer median of row-values.
Parameters
----------
maskedArray : `numpy.ma.masked_array`
Masked array of input overscan data.
Returns
-------
collapsed : `numpy.ma.masked_array`
Single dimensional overscan data, combined with the afwMath median.
Definition at line 318 of file overscan.py.
| def lsst.ip.isr.overscan.OverscanCorrectionTask.debugView | ( | self, | |
| image, | |||
| model | |||
| ) |
Debug display for the final overscan solution.
Parameters
----------
image : `lsst.afw.image.Image`
Input image the overscan solution was determined from.
model : `numpy.ndarray` or `float`
Overscan model determined for the image.
Definition at line 476 of file overscan.py.
|
static |
Extract the numpy array from the input image.
Parameters
----------
image : `lsst.afw.image.Image` or `lsst.afw.image.MaskedImage`
Image data to pull array from.
calcImage : `numpy.ndarray`
Image data array for numpy operating.
Definition at line 239 of file overscan.py.
|
static |
Return an integer version of the input image.
Parameters
----------
image : `numpy.ndarray`, `lsst.afw.image.Image` or `MaskedImage`
Image to convert to integers.
Returns
-------
outI : `numpy.ndarray`, `lsst.afw.image.Image` or `MaskedImage`
The integer converted image.
Raises
------
RuntimeError
Raised if the input image could not be converted.
Definition at line 175 of file overscan.py.
|
static |
Create mask if edges are extrapolated.
Parameters
----------
collapsed : `numpy.ma.masked_array`
Masked array to check the edges of.
Returns
-------
maskArray : `numpy.ndarray`
Boolean numpy array of pixels to mask.
Definition at line 395 of file overscan.py.
| def lsst.ip.isr.overscan.OverscanCorrectionTask.maskOutliers | ( | self, | |
| imageArray | |||
| ) |
Mask outliers in a row of overscan data from a robust sigma
clipping procedure.
Parameters
----------
imageArray : `numpy.ndarray`
Image to filter along numpy axis=1.
Returns
-------
maskedArray : `numpy.ma.masked_array`
Masked image marking outliers.
Definition at line 277 of file overscan.py.
| def lsst.ip.isr.overscan.OverscanCorrectionTask.measureConstantOverscan | ( | self, | |
| image | |||
| ) |
Measure a constant overscan value.
Parameters
----------
image : `lsst.afw.image.Image` or `lsst.afw.image.MaskedImage`
Image data to measure the overscan from.
Returns
-------
results : `lsst.pipe.base.Struct`
Overscan result with entries:
- ``overscanValue``: Overscan value to subtract (`float`)
- ``maskArray``: Placeholder for a mask array (`list`)
- ``isTransposed``: Orientation of the overscan (`bool`)
Definition at line 209 of file overscan.py.
| def lsst.ip.isr.overscan.OverscanCorrectionTask.measureVectorOverscan | ( | self, | |
| image | |||
| ) |
Calculate the 1-d vector overscan from the input overscan image.
Parameters
----------
image : `lsst.afw.image.MaskedImage`
Image containing the overscan data.
Returns
-------
results : `lsst.pipe.base.Struct`
Overscan result with entries:
- ``overscanValue``: Overscan value to subtract (`float`)
- ``maskArray`` : `list` [ `bool` ]
List of rows that should be masked as ``SUSPECT`` when the
overscan solution is applied.
- ``isTransposed`` : `bool`
Indicates if the overscan data was transposed during
calcuation, noting along which axis the overscan should be
subtracted.
Definition at line 423 of file overscan.py.
| def lsst.ip.isr.overscan.OverscanCorrectionTask.run | ( | self, | |
| ampImage, | |||
| overscanImage | |||
| ) |
Measure and remove an overscan from an amplifier image.
Parameters
----------
ampImage : `lsst.afw.image.Image`
Image data that will have the overscan removed.
overscanImage : `lsst.afw.image.Image`
Overscan data that the overscan is measured from.
Returns
-------
overscanResults : `lsst.pipe.base.Struct`
Result struct with components:
``imageFit``
Value or fit subtracted from the amplifier image data
(scalar or `lsst.afw.image.Image`).
``overscanFit``
Value or fit subtracted from the overscan image data
(scalar or `lsst.afw.image.Image`).
``overscanImage``
Image of the overscan region with the overscan
correction applied (`lsst.afw.image.Image`). This
quantity is used to estimate the amplifier read noise
empirically.
Raises
------
RuntimeError
Raised if an invalid overscan type is set.
Definition at line 93 of file overscan.py.
|
static |
Wrapper function to match spline evaluation API to polynomial fit API.
Parameters
----------
indices : `numpy.ndarray`
Locations to evaluate the spline.
interp : `lsst.afw.math.interpolate`
Interpolation object to use.
Returns
-------
values : `numpy.ndarray`
Evaluated spline values at each index.
Definition at line 376 of file overscan.py.
| def lsst.ip.isr.overscan.OverscanCorrectionTask.splineFit | ( | self, | |
| indices, | |||
| collapsed, | |||
| numBins | |||
| ) |
Wrapper function to match spline fit API to polynomial fit API.
Parameters
----------
indices : `numpy.ndarray`
Locations to evaluate the spline.
collapsed : `numpy.ndarray`
Collapsed overscan values corresponding to the spline
evaluation points.
numBins : `int`
Number of bins to use in constructing the spline.
Returns
-------
interp : `lsst.afw.math.Interpolate`
Interpolation object for later evaluation.
Definition at line 342 of file overscan.py.
|
static |
Transpose input numpy array if necessary.
Parameters
----------
imageArray : `numpy.ndarray`
Image data to transpose.
Returns
-------
imageArray : `numpy.ndarray`
Transposed image data.
isTransposed : `bool`
Indicates whether the input data was transposed.
Definition at line 257 of file overscan.py.
|
static |
Definition at line 82 of file overscan.py.
| lsst.ip.isr.overscan.OverscanCorrectionTask.statControl |
Definition at line 88 of file overscan.py.
1.8.13