ImageReducer¶
-
class
lsst.ip.diffim.
ImageReducer
(config=None, name=None, parentTask=None, log=None)¶ Bases:
lsst.pipe.base.Task
Base class for any ‘reduce’ task that is to be used as
ImageMapReduceConfig.reducer
.Basic reduce operations are provided by the
run
method 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
mapperResults
list together into a new Exposure (default) or pass it through (ifself.config.reduceOperation
is ‘none’).If
self.config.reduceOperation
is not ‘none’, then expect that thepipeBase.Struct`s in the `mapperResults
list contain sub-exposures named ‘subExposure’, to be stitched back into a single Exposure with the same dimensions, PSF, and mask as the inputexposure
. Otherwise, themapperResults
list is simply returned directly.Parameters: - mapperResults : list
list of
pipeBase.Struct
returned 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.reduceOperation is not ‘none’)
- kwargs :
additional keyword arguments propagated from
ImageMapReduceTask.run
.
Returns: - A `pipeBase.Struct` containing either an `lsst.afw.image.Exposure` (named ‘exposure’)
- or a list (named ‘result’), depending on `config.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).
-