lsst.ip.diffim  13.0-26-g703d095+11
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Public Member Functions | Static Public Attributes | Private Member Functions | Static Private Attributes | List of all members
lsst.ip.diffim.imageMapReduce.ImageReducer Class Reference
Inheritance diagram for lsst.ip.diffim.imageMapReduce.ImageReducer:

Public Member Functions

def run
 

Static Public Attributes

 ConfigClass = ImageReducerConfig
 

Private Member Functions

def _constructPsf
 

Static Private Attributes

string _DefaultName = "ip_diffim_ImageReducer"
 

Detailed Description

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.

Definition at line 180 of file imageMapReduce.py.

Member Function Documentation

def lsst.ip.diffim.imageMapReduce.ImageReducer._constructPsf (   self,
  mapperResults,
  exposure 
)
private
Construct a CoaddPsf based on PSFs from individual subExposures

Currently uses (and returns) a CoaddPsf. TBD if we want to
create a custom subclass of CoaddPsf to differentiate it.

Parameters
----------
mapperResults : list
    list of `pipeBase.Struct` returned by `ImageMapper.run`.
    For this to work, each element of `mapperResults` must contain
    a `subExposure` element, from which the component Psfs are
    extracted (thus the reducerTask cannot have
    `reduceOperation = 'none'`.
exposure : lsst.afw.image.Exposure
    the original exposure which is used here solely for its
    bounding-box and WCS.

Returns
-------
A `measAlg.CoaddPsf` constructed from the PSFs of the individual
subExposures.

Definition at line 323 of file imageMapReduce.py.

def lsst.ip.diffim.imageMapReduce.ImageReducer.run (   self,
  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
(if `self.config.reduceOperation` is 'none').

If `self.config.reduceOperation` is not 'none', then expect
that the `pipeBase.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 input `exposure`. Otherwise, the `mapperResults` list
is simply returned directly.

Parameters
----------
mapperResults : list
    list of `pipeBase.Struct` returned by `ImageMapper.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
-----
1. This currently correctly handles overlapping sub-exposures.
   For overlapping sub-exposures, use `config.reduceOperation='average'`.
2. This correctly handles varying PSFs, constructing the resulting
   exposure's PSF via CoaddPsf (DM-9629).

Known issues
------------
1. To be done: correct handling of masks (nearly there)
2. 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.

Definition at line 190 of file imageMapReduce.py.

Member Data Documentation

string lsst.ip.diffim.imageMapReduce.ImageReducer._DefaultName = "ip_diffim_ImageReducer"
staticprivate

Definition at line 188 of file imageMapReduce.py.

lsst.ip.diffim.imageMapReduce.ImageReducer.ConfigClass = ImageReducerConfig
static

Definition at line 187 of file imageMapReduce.py.


The documentation for this class was generated from the following file: