Interpolated over bad pixels using CloughTocher2DInterpolator.
Pixels with mask bits set to any of those listed ``badMaskPlanes`` config
are considered bad and are interpolated over. All good (non-bad) pixels
within ``interpLength`` pixels of a bad pixel in either direction are used
to construct the interpolant. An extended streak of bad pixels at an edge,
longer than ``interpLength``, is set to `fillValue`` specified in config.
Definition at line 56 of file cloughTocher2DInterpolator.py.
lsst.meas.algorithms.cloughTocher2DInterpolator.CloughTocher2DInterpolateTask.run |
( |
| self, |
|
|
| maskedImage, |
|
|
| badpix = None, |
|
|
| goodpix = None ) |
Interpolate over bad pixels in a masked image.
This modifies the ``image`` attribute of the ``maskedImage`` in place.
This method returns, and accepts, the coordinates of the bad pixels
that were interpolated over, and the coordinates and values of the
good pixels that were used to construct the interpolant. This avoids
having to search for the bad and the good pixels repeatedly when the
mask plane is shared among many images, as would be the case with
noise realizations.
Parameters
----------
maskedImage : `~lsst.afw.image.MaskedImageF`
Image on which to perform interpolation (and modify in-place).
badpix: `numpy.ndarray`, optional
N x 3 numpy array, where N is the number of bad pixels.
The coordinates of the bad pixels to interpolate over in the first
two columns, and the pixel values (unused) in the third column.
If None, then the coordinates of the bad pixels are determined by
an exhaustive search over the image. If ``goodpix`` is not
provided, then this parameter is ignored.
goodpix: `numpy.ndarray`, optional
M x 3 numpy array, where M is the number of good pixels.
The first two columns are the coordinates of the good pixels around
``badpix`` that must be included when constructing the interpolant.
the interpolant. The values are populated from the image plane of
the ``maskedImage`` and returned (provided values will be ignored).
If ``badpix`` is not provided, then this parameter is ignored.
Returns
-------
badpix: `numpy.ndarray`
N x 3 numpy array, where N is the number of bad pixels.
The coordinates of the bad pixels that were interpolated over are
in the first two columns, and the corresponding pixel values in the
third. If ``badpix`` was provided, this is the same as the input.
goodpix: `numpy.ndarray`
M x 3 numpy array, where M is the number of bad pixels.
The coordinates of the good pixels that were used to construct the
interpolant arein the first two columns, and the corresponding
pixel values in the third. If ``goodpix`` was provided, the first
two columns are same as the input, with the third column updated
with the pixel values from the image plane of the ``maskedImage``.
Definition at line 69 of file cloughTocher2DInterpolator.py.