Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-24708 Quick fix of type mismatch runtime errors in decorrelation afterburner #158

Merged
merged 1 commit into from
May 2, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions python/lsst/ip/diffim/imageDecorrelation.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,13 +244,13 @@ def run(self, exposure, templateExposure, subtractedExposure, psfMatchingKernel,
psfNew = measAlg.KernelPsf(psfcK)

correctedExposure = subtractedExposure.clone()
correctedExposure.image.array = diffExpArr
correctedExposure.image.array[...] = diffExpArr # Allow for numpy type casting
# The subtracted exposure variance plane is already correlated, we cannot propagate
# it through another convolution; instead we need to use the uncorrelated originals
# The whitening should scale it to svar + tvar on average
varImg = correctedExposure.variance
varImg.assign(exposure.variance)
varImg += templateExposure.variance
varImg = correctedExposure.variance.array
# Allow for numpy type casting
varImg[...] = exposure.variance.array + templateExposure.variance.array
correctedExposure.setPsf(psfNew)

newVarMean = self.computeVarianceMean(correctedExposure)
Expand Down