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-42811: Log unexpected measurement exceptions as WARNING #900

Merged
merged 1 commit into from
Apr 18, 2024
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
4 changes: 3 additions & 1 deletion tests/test_calibrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,9 @@ def testNoAperCorrMap(self):
calibTask = CalibrateTask(config=calibConfig)
with self.assertLogs(level=logging.WARNING) as cm:
_ = calibTask.run(charImResults.exposure)
self.assertIn("Image does not have valid aperture correction map", cm.output[0])
# Other warnings may also be emitted.
warnings = '\n'.join(cm.output)
self.assertIn("Image does not have valid aperture correction map", warnings)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised to see this particular message in a warning at this stage. Is this because we're trying to continue even in the absence of aperture corrections, and we can only represent that by setting it to None on the Exposure? If not, it's a pipeline configuration error and that should be an exception.

I realize this is preexisting, but we should probably do something about it, even if it's "create a ticket".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CalibrateTask is a whole mess of "do this when that but this except that catch and log debug" nonsense. I'd rather spend as little time on it as possible, and just focus on CalibrateImageTask from here on.



def setup_module(module):
Expand Down