-
Notifications
You must be signed in to change notification settings - Fork 7
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-48375: cpCombine should optionally erase all mask planes except NO_DATA #290
Conversation
e07f9b3
to
9d56c1a
Compare
python/lsst/cp/pipe/cpCombine.py
Outdated
|
||
self.interpolateNans(combined) | ||
self.interpolateNans(combined, self.noGoodPixelsMask) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explicitly use the keyword here, maskPlane=self.noGoodPixelsMask
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, and I've fixed the missing .config
.
python/lsst/cp/pipe/cpCombine.py
Outdated
if np.any(bad): | ||
median = np.median(array[np.logical_not(bad)]) | ||
medianVariance = np.median(variance[np.logical_not(bad)]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be variance[~bad]
.
python/lsst/cp/pipe/cpCombine.py
Outdated
@@ -701,6 +738,9 @@ def calibStats(self, exp, calibrationType): | |||
bad = ((ampImage.mask.array & noGoodPixelsBit) > 0) | |||
key = f"LSST CALIB {calibrationType.upper()} {amp.getName()} BADPIX-NUM" | |||
metadata[key] = bad.sum() | |||
self.log.warn(f"Found {metadata[key]} pixels with " | |||
f"mask plane {self.config.noGoodPixelsMask} " | |||
f"for amp {amp.getName()}.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two things. First, this must be self.log.warning()
and not self.log.warn()
. Second, this should only trigger if metadata[key] > 0
or else we'll get flooded with non-warnings.
ea3e11e
to
4c26d09
Compare
The code as it is looks good. I do wonder about tests, however. |
ca3656c
to
4b216b8
Compare
4b216b8
to
b3fd2de
Compare
No description provided.