AlardLuptonPreconvolveSubtractTask¶
AlardLuptonPreconvolveSubtractTask is a modification of AlardLuptonSubtractTask behavior, and it performs image differencing between the template
image and a custom kernel cross-correlated science
image.
Description¶
This task takes the pair of science and template exposures, together with the science image source catalog, and produces difference and matched template exposures as outputs.
The process involves pre-convolving the science
image with a predefined kernel (tipically its own PSF) before running the nominal set of steps for image subtraction, that is, selecting sources to obtain a matching convolution kernel, applying this to the template
image, and performing the image differencing.
In this case the subtraction produces a score image directly, and it can be used for maximum-likelihood source detection in a straightforward manner. This is done using DetectAndMeasureScoreTask
.
Python API summary¶
from lsst.ip.diffim.subtractImages import AlardLuptonPreconvolveSubtractTask
-
class
AlardLuptonPreconvolveSubtractTask
(**kwargs) Subtract a template from a science image, convolving the science image before computing the kernel, and also convolving the template before subtraction
...
- attributeconfig
Access configuration fields and retargetable subtasks.
-
method
run
(template, science, sources, visitSummary=None) Preconvolve the science image with its own PSF, convolve the template image with a PSF-matching kernel and subtract from the preconvolved science image
...
See also
See the AlardLuptonPreconvolveSubtractTask
API reference for complete details.
Retargetable subtasks¶
decorrelate¶
- Default
lsst.ip.diffim.imageDecorrelation.DecorrelateALKernelTask
- Field type
Task to decorrelate the image difference.
makeKernel¶
- Default
lsst.ip.diffim.makeKernel.MakeKernelTask
- Field type
Task to construct a matching kernel for convolution.
scaleVariance¶
- Default
lsst.meas.algorithms.scaleVariance.ScaleVarianceTask
- Field type
Subtask to rescale the variance of the template to the statistically expected level.
sourceSelector¶
Task to select sources to be used for PSF matching.
Configuration fields¶
allowKernelSourceDetection¶
Re-run source detection for kernel candidates if an error is encountered while calculating the matching kernel.
badMaskPlanes¶
Mask planes to interpolate over.
connections¶
- Data type
lsst.pipe.base.config.AlardLuptonPreconvolveSubtractConfigConnections
- Field type
Configurations describing the connections of the PipelineTask to datatypes
detectionThreshold¶
Minimum signal to noise ratio of detected sources to use for calculating the PSF matching kernel.
detectionThresholdMax¶
Maximum signal to noise ratio of detected sources to use for calculating the PSF matching kernel.
doApplyExternalCalibrations¶
Replace science Exposure’s calibration objects with those in visitSummary. Ignored if `doApplyFinalizedPsf is True.
doDecorrelation¶
Perform diffim decorrelation to undo pixel correlation due to A&L kernel convolution? If True, also update the diffim PSF.
doScaleVariance¶
Scale variance of the image difference?
doSubtractBackground¶
Subtract the background fit when solving the kernel?
excludeMaskPlanes¶
Mask planes to exclude when selecting sources for PSF matching.
maxKernelSources¶
Maximum number of sources to use for calculating the PSF matching kernel.Set to -1 to disable.
minKernelSources¶
Minimum number of sources needed for calculating the PSF matching kernel.
minTemplateFractionForExpectedSuccess¶
Raise NoWorkFound if PSF-matching fails and template covers less than this fraction of pixels. If the fraction of pixels covered by the template is less than this value (and greater than requiredTemplateFraction) this task is attempted but failure is anticipated and tolerated.
preserveTemplateMask¶
Mask planes from the template to propagate to the image difference.
renameTemplateMask¶
Mask planes from the template to propagate to the image differencewith ‘_TEMPLATE’ appended to the name.
requiredTemplateFraction¶
Raise NoWorkFound and do not attempt image subtraction if template covers less than this fraction of pixels. Setting to 0 will always attempt image subtraction.
saveLogOutput¶
Flag to enable/disable saving of log output for a task, enabled by default.