Decorrelate the effect of convolution by Alard-Lupton matching kernel in image difference
Notes
-----
Pipe-task that removes the neighboring-pixel covariance in an
image difference that are added when the template image is
convolved with the Alard-Lupton PSF matching kernel.
This task is a simple wrapper around @ref DecorrelateALKernelTask,
which takes a `spatiallyVarying` parameter in its `run` method. If
it is `False`, then it simply calls the `run` method of @ref
DecorrelateALKernelTask. If it is True, then it uses the @ref
ImageMapReduceTask framework to break the exposures into
subExposures on a grid, and performs the `run` method of @ref
DecorrelateALKernelTask on each subExposure. This enables it to
account for spatially-varying PSFs and noise in the exposures when
performing the decorrelation.
This task has no standalone example, however it is applied as a
subtask of pipe.tasks.imageDifference.ImageDifferenceTask.
There is also an example of its use in `tests/testImageDecorrelation.py`.
Definition at line 591 of file imageDecorrelation.py.
def lsst.ip.diffim.imageDecorrelation.DecorrelateALKernelSpatialTask.run |
( |
|
self, |
|
|
|
scienceExposure, |
|
|
|
templateExposure, |
|
|
|
subtractedExposure, |
|
|
|
psfMatchingKernel, |
|
|
|
spatiallyVarying = True , |
|
|
|
preConvKernel = None |
|
) |
| |
Perform decorrelation of an image difference exposure.
Decorrelates the diffim due to the convolution of the
templateExposure with the A&L psfMatchingKernel. If
`spatiallyVarying` is True, it utilizes the spatially varying
matching kernel via the `imageMapReduce` framework to perform
spatially-varying decorrelation on a grid of subExposures.
Parameters
----------
scienceExposure : `lsst.afw.image.Exposure`
the science Exposure used for PSF matching
templateExposure : `lsst.afw.image.Exposure`
the template Exposure used for PSF matching
subtractedExposure : `lsst.afw.image.Exposure`
the subtracted Exposure produced by `ip_diffim.ImagePsfMatchTask.subtractExposures()`
psfMatchingKernel :
an (optionally spatially-varying) PSF matching kernel produced
by `ip_diffim.ImagePsfMatchTask.subtractExposures()`
spatiallyVarying : `bool`
if True, perform the spatially-varying operation
preConvKernel : `lsst.meas.algorithms.Psf`
if not none, the scienceExposure has been pre-filtered with this kernel. (Currently
this option is experimental.)
Returns
-------
results : `lsst.pipe.base.Struct`
a structure containing:
- ``correctedExposure`` : the decorrelated diffim
Definition at line 646 of file imageDecorrelation.py.