DecorrelateALKernelSpatialTask¶
- 
class lsst.ip.diffim.DecorrelateALKernelSpatialTask(*args, **kwargs)¶
- Bases: - lsst.pipe.base.Task- ! @anchor DecorrelateALKernelSpatialTask - @brief Decorrelate the effect of convolution by Alard-Lupton matching kernel in image difference - @section ip_diffim_imageDecorrelation_DecorrelateALKernelSpatialTask_Contents Contents - @ref ip_diffim_imageDecorrelation_DecorrelateALKernelSpatialTask_Purpose
- @ref ip_diffim_imageDecorrelation_DecorrelateALKernelSpatialTask_Config
- @ref ip_diffim_imageDecorrelation_DecorrelateALKernelSpatialTask_Run
- @ref ip_diffim_imageDecorrelation_DecorrelateALKernelSpatialTask_Debug
- @ref ip_diffim_imDecorr_DecorrALKerSpatTask_Example
 - @section ip_diffim_imageDecorrelation_DecorrelateALKernelSpatialTask_Purpose Description - 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 - spatiallyVaryingparameter in its- runmethod. If it is- False, then it simply calls the- runmethod 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- runmethod of @ref DecorrelateALKernelTask on each subExposure. This enables it to account for spatially-varying PSFs and noise in the exposures when performing the decorrelation.- @section ip_diffim_imageDecorrelation_DecorrelateALKernelSpatialTask_Initialize Task initialization - @copydoc __init__ - @section ip_diffim_imageDecorrelation_DecorrelateALKernelSpatialTask_Run Invoking the Task - @copydoc run - @section ip_diffim_imageDecorrelation_DecorrelateALKernelSpatialTask_Config Configuration parameters - See @ref DecorrelateALKernelSpatialConfig - @section ip_diffim_imageDecorrelation_DecorrelateALKernelSpatialTask_Debug Debug variables - This task has no debug variables - @section ip_diffim_imDecorr_DecorrALKerSpatTask_Example Example of using DecorrelateALKernelSpatialTask - 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.- Methods Summary - computeVarianceMean(exposure)- Compute the mean of the variance plane of - exposure.- run(scienceExposure, templateExposure, …)- ! Perform decorrelation of an image difference exposure. - Methods Documentation - 
computeVarianceMean(exposure)¶
- Compute the mean of the variance plane of - exposure.
 - 
run(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 - spatiallyVaryingis True, it utilizes the spatially varying matching kernel via the- imageMapReduceframework 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: - a `pipeBase.Struct` containing:
- correctedExposure: the decorrelated diffim