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 DecorrelateALKernelTask, which takes a spatiallyVarying parameter in its run method. If it is False, then it simply calls the run method of DecorrelateALKernelTask. If it is True, then it uses the ImageMapReduceTask framework to break the exposures into subExposures on a grid, and performs the run method of 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 ImageDifferenceTask. There is also an example of its use in tests/

Python API summary

from lsst.ip.diffim.imageDecorrelation import DecorrelateALKernelSpatialTask
classDecorrelateALKernelSpatialTask(*args, **kwargs)

Decorrelate the effect of convolution by Alard-Lupton matching kernel in image difference...


Access configuration fields and retargetable subtasks.

methodrun(scienceExposure, templateExposure, subtractedExposure, psfMatchingKernel, spatiallyVarying=True, preConvKernel=None, templateMatched=True, preConvMode=False)

Perform decorrelation of an image difference exposure...

See also

See the DecorrelateALKernelSpatialTask API reference for complete details.

Retargetable subtasks

No subtasks.

Configuration fields


Data type


Field type


DecorrelateALKernel config to use when running on complete exposure (non spatially-varying)


Data type


Field type


DecorrelateALKernelMapReduce config to use when running on each sub-image (spatially-varying)


Field type

str ListField

Mask planes to ignore for sigma-clipped statistics