-
Notifications
You must be signed in to change notification settings - Fork 13
DM-53153: Add safeguards on image statistics based scalings in detectCoaddPeaks #449
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
Conversation
| and threshResults.multiplicative < self.config.minThresholdScaleFactor): | ||
| self.log.warning("Measured threshold scaling factor (%.2f) is outside [min, max] " | ||
| "bounds [%.2f, %.2f]. Setting lower limit to %.2f.", | ||
| threshResults.multiplicative, self.config.minThresholdScaleFacto, |
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.
typo, minThresholdScaleFacto. Makes me worried this code path isn't tested.
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.
Oooh, good catch. Fixed and added more test coverage.
| if (self.config.minThresholdScaleFactor | ||
| and threshResults.multiplicative < self.config.minThresholdScaleFactor): | ||
| self.log.warning("Measured threshold scaling factor (%.2f) is outside [min, max] " | ||
| "bounds [%.2f, %.2f]. Setting lower limit to %.2f.", |
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.
Setting the scale factor to lower limit, not setting the lower limit. Same comment on other messages.
| if self.config.doBrightPrelimDetection: | ||
| brightDetectedMask = self._computeBrightDetectionMask(maskedImage, convolveResults) | ||
| else: | ||
| prelim = None |
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.
preliminary what?
Are you ok with results.prelim being None? If nothing uses it downstream, might as well remove it.
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.
I'm too nervous to do this just in case somewhere/somehow expects the parameter to exist...
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.
I'm ok with "not on this ticket on a wednesday".
Also add configurable upper and lower limits to the value the scaling can take.
abe085a to
167514a
Compare
No description provided.