ImageReducer#
- class lsst.ip.diffim.ImageReducer(config: Config | None = None, *, name: str | None = None, parentTask: Task | None = None, log: logging.Logger | lsst.utils.logging.LsstLogAdapter | None = None)#
Bases:
TaskBase class for any ‘reduce’ task that is to be used as
ImageMapReduceConfig.reducer.Basic reduce operations are provided by the
runmethod of this class, to be selected by its config.Methods Summary
run(mapperResults, exposure, **kwargs)Reduce a list of items produced by
ImageMapper.Methods Documentation
- run(mapperResults, exposure, **kwargs)#
Reduce a list of items produced by
ImageMapper.Either stitch the passed
mapperResultslist together into a new Exposure (default) or pass it through (ifself.config.reduceOperationis ‘none’).If
self.config.reduceOperationis not ‘none’, then expect that thepipeBase.Struct`s in the `mapperResultslist contain sub-exposures named ‘subExposure’, to be stitched back into a single Exposure with the same dimensions, PSF, and mask as the inputexposure. Otherwise, themapperResultslist is simply returned directly.Parameters#
- mapperResults
list list of
lsst.pipe.base.Structreturned byImageMapper.run.- exposure
lsst.afw.image.Exposure the original exposure which is cloned to use as the basis for the resulting exposure (if
self.config.mapper.reduceOperationis not ‘None’)- kwargs :
additional keyword arguments propagated from
ImageMapReduceTask.run.
Returns#
A
lsst.pipe.base.Structcontaining either anlsst.afw.image.Exposure(named ‘exposure’) or a list (named ‘result’), depending onconfig.reduceOperation.Notes#
This currently correctly handles overlapping sub-exposures. For overlapping sub-exposures, use
config.reduceOperation='average'.This correctly handles varying PSFs, constructing the resulting exposure’s PSF via CoaddPsf (DM-9629).
Known issues
To be done: correct handling of masks (nearly there)
This logic currently makes two copies of the original exposure (one here and one in
mapper.run()). Possibly of concern for large images on memory-constrained systems.
- mapperResults