lsst.pipe.tasks g281251e7f9+9d3b0d3b84
Loading...
Searching...
No Matches
Classes | Functions
lsst.pipe.tasks.coaddBase Namespace Reference

Classes

class  CoaddBaseConfig
 
class  CoaddBaseTask
 

Functions

 makeSkyInfo (skyMap, tractId, patchId)
 
 scaleVariance (maskedImage, maskPlanes, log=None)
 
 reorderAndPadList (inputList, inputKeys, outputKeys, padWith=None)
 
 subBBoxIter (bbox, subregionSize)
 

Function Documentation

◆ makeSkyInfo()

lsst.pipe.tasks.coaddBase.makeSkyInfo (   skyMap,
  tractId,
  patchId 
)
Constructs SkyInfo used by coaddition tasks for multiple
patchId formats.

Parameters
----------
skyMap : `lsst.skyMap.SkyMap`
    Sky map.
tractId : `int`
    The ID of the tract.
patchId : `str` or `int` or `tuple` of `int`
    Either Gen2-style comma delimited string (e.g. '4,5'),
    tuple of integers (e.g (4, 5), Gen3-style integer.

Returns
-------
makeSkyInfo : `lsst.pipe.base.Struct`
    pipe_base Struct with attributes:

    ``skyMap``
        Sky map (`lsst.skyMap.SkyMap`).
    ``tractInfo``
        Information for chosen tract of sky map (`lsst.skyMap.TractInfo`).
    ``patchInfo``
        Information about chosen patch of tract (`lsst.skyMap.PatchInfo`).
    ``wcs``
        WCS of tract (`lsst.afw.image.SkyWcs`).
    ``bbox``
        Outer bbox of patch, as an geom Box2I (`lsst.afw.geom.Box2I`).

Definition at line 149 of file coaddBase.py.

◆ reorderAndPadList()

lsst.pipe.tasks.coaddBase.reorderAndPadList (   inputList,
  inputKeys,
  outputKeys,
  padWith = None 
)
Match the order of one list to another, padding if necessary

Parameters
----------
inputList : `list`
    List to be reordered and padded. Elements can be any type.
inputKeys :  `iterable`
    Iterable of values to be compared with outputKeys. Length must match `inputList`.
outputKeys : `iterable`
    Iterable of values to be compared with inputKeys.
padWith : `Unknown`
    Any value to be inserted where inputKey not in outputKeys.

Returns
-------
outputList : `list`
    Copy of inputList reordered per outputKeys and padded with `padWith`
    so that the length matches length of outputKeys.

Definition at line 232 of file coaddBase.py.

◆ scaleVariance()

lsst.pipe.tasks.coaddBase.scaleVariance (   maskedImage,
  maskPlanes,
  log = None 
)
Scale the variance in a maskedImage

This is deprecated. Use the ScaleVarianceTask instead.

Parameters
----------
maskedImage : `lsst.afw.image.MaskedImage`
    MaskedImage to operate on; variance will be scaled.
maskPlanes : `list`
    List of mask planes for pixels to reject.
log : `Unknown`
    Log for reporting the renormalization factor; or None.

Returns
-------
task.run : `Unknown`
    Renormalization factor.

Notes
-----
The variance plane in a convolved or warped image (or a coadd derived
from warped images) does not accurately reflect the noise properties of
the image because variance has been lost to covariance. This function
attempts to correct for this by scaling the variance plane to match
the observed variance in the image. This is not perfect (because we're
not tracking the covariance) but it's simple and is often good enough.

Definition at line 198 of file coaddBase.py.

◆ subBBoxIter()

lsst.pipe.tasks.coaddBase.subBBoxIter (   bbox,
  subregionSize 
)
Iterate over subregions of a bbox.

Parameters
----------
bbox : `lsst.geom.Box2I`
    Bounding box over which to iterate.
subregionSize : `lsst.geom.Extent2I`
    Size of sub-bboxes.

Yields
------
subBBox : `lsst.geom.Box2I`
    Next sub-bounding box of size ``subregionSize`` or smaller; each ``subBBox``
    is contained within ``bbox``, so it may be smaller than ``subregionSize`` at
    the edges of ``bbox``, but it will never be empty.

Raises
------
RuntimeError
    Raised if any of the following occur:
    - The given bbox is empty.
    - The subregionSize is 0.

Definition at line 261 of file coaddBase.py.