Skip to content

Commit

Permalink
Set variance in coadd overlaps to mean of the coadd variances
Browse files Browse the repository at this point in the history
While mosaicking coadds to make templates, use the mean
variances of neighboring coadds to construct the template
variance plane in the patch overlap region. The
coadds have had identical visits contributing to them
and are approximately 100% correlated.

While they may not be exactly 100% correlated (they've had different
backgrounds applied) they are much much closer to 100% correlated
than 0% like calcErrorFromInputVariance assumes.
  • Loading branch information
yalsayyad committed Nov 9, 2022
1 parent fd94035 commit bb6e703
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/lsst/ip/diffim/getTemplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ def run(self, coaddExposures, bbox, wcs, dataIds, **kwargs):
statsCtrl = afwMath.StatisticsControl()
statsCtrl.setNanSafe(True)
statsCtrl.setWeighted(True)
statsCtrl.setCalcErrorFromInputVariance(True)
statsCtrl.setCalcErrorMosaicMode(True)

templateExposure = afwImage.ExposureF(finalBBox, finalWcs)
templateExposure.maskedImage.set(np.nan, afwImage.Mask.getPlaneBitMask("NO_DATA"), np.nan)
Expand Down

0 comments on commit bb6e703

Please sign in to comment.