MatchBackgroundsTask#
- class lsst.pipe.tasks.matchBackgrounds.MatchBackgroundsTask(*args, **kwargs)#
Bases:
PipelineTaskMatch the backgrounds of a list of warped exposures to a reference
Attributes#
- config
MatchBackgroundsConfig Configuration for this task.
- statsCtrl
StatisticsControl Statistics control object.
Notes#
This task is a part of the background subtraction pipeline. It matches the backgrounds of a list of warped science exposures to that of a reference image.
Methods Summary
matchBackgrounds(warps, skyMap, refVisitId)Match science visit's background level to that of reference visit
run(warps, skyMap)Match the backgrounds of a list of warped exposures to the same patches in a reference visit
Methods Documentation
- matchBackgrounds(warps, skyMap, refVisitId)#
Match science visit’s background level to that of reference visit
Process creates binned images of the full focal plane (in tract coordinates) for all visit IDs, subtracts each from a similarly binned FFP reference image, then generates TractBackground objects.
The TractBackground objects representing the difference image backgrounds are then used to generate ‘offset’ images for each warp comprising the full science exposure visit, which are then added to each warp to match the background to that of the reference visit at the warp’s location within the tract.
Best practice uses
psf_matched_warpimages without the detections mask plane set. When usingdirect_warp, sources may bias the difference image background estimation. Mask planes are set in TractBackgroundConfig.Fit diagnostics are also calculated and returned.
Parameters#
- warps
list`[`~lsst.daf.butler.DeferredDatasetHandle] List of warped exposures (of type
ExposureF). This is ordered by patch ID, then by visit ID- skyMap
lsst.skyMap.SkyMap SkyMap for deriving the patch/tract dimensions.
- refVisitId
int Chosen reference visit ID to match to.
Returns#
- backgroundInfoList
list`[`TractBackground] List of all difference image backgrounds used to match to reference visit warps, in nanojanskies.
- matchedImageList
list`[`~lsst.afw.image.ExposureF] List of all background-matched warps, in nanojanskies.
- warps
- run(warps, skyMap)#
Match the backgrounds of a list of warped exposures to the same patches in a reference visit
A reference visit ID will be chosen automatically if none is supplied.
Parameters#
- warps
list`[`~lsst.afw.image.Exposure] List of warped science exposures to be background-matched.
- skyMap
lsst.skyMap.SkyMap SkyMap for deriving the patch/tract dimensions.
Returns#
- result
BackgroundList,Exposure Differential background models and associated background-matched images.
- warps
- config