22 from __future__
import absolute_import, division, print_function
25 from . addToCoadd
import addToCoadd
32 def __init__(self, bbox, wcs, badMaskPlanes, logName="coadd.chisquared.Coadd"):
33 """Create a chi-squared coadd 36 @param[in] bbox: bounding box of coadd Exposure with respect to parent (afwGeom.Box2I): 37 coadd dimensions = bbox.getDimensions(); xy0 = bbox.getMin() 38 @param[in] wcs: WCS of coadd exposure (lsst.afw.geom.SkyWcs) 39 @param[in] badMaskPlanes: mask planes to pay attention to when rejecting masked pixels. 40 Specify as a collection of names. 41 badMaskPlanes should always include "EDGE". 42 @param[in] logName: name by which messages are logged 44 coaddUtils.Coadd.__init__(self,
47 badMaskPlanes=badMaskPlanes,
52 """Add a an exposure to the coadd; it is assumed to have the same WCS as the coadd 55 @param[in] exposure: Exposure to add to coadd; this must be: 56 - background-subtracted or background-matched to the other images being coadded 57 - psf-matched to the desired PSF model (optional) 58 - warped to match the coadd 59 @param[in] weightFactor: weight with which to add exposure to coadd 62 - overlapBBox: region of overlap between exposure and coadd in parent coordinates (afwGeom.Box2I) 63 - weight: weight with which exposure was added to coadd; weight = weightFactor for this kind of coadd 65 self._log.info(
"add exposure to coadd")
68 filter = exposure.getFilter()
69 self._filterDict.setdefault(filter.getName(), filter)
71 overlapBBox =
addToCoadd(self._coadd.getMaskedImage(), self._weightMap,
72 exposure.getMaskedImage(), self._badPixelMask, weightFactor)
74 return overlapBBox, weightFactor
def __init__(self, bbox, wcs, badMaskPlanes, logName="coadd.chisquared.Coadd")
def addExposure(self, exposure, weightFactor=1.0)