-
Notifications
You must be signed in to change notification settings - Fork 19
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-16537: Rework exception handling and add tests. #237
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -363,19 +363,16 @@ def run(self, calexpRefList, skyInfo, visitId=0): | |
for calExpInd, calExpRef in enumerate(calexpRefList): | ||
self.log.info("Processing calexp %d of %d for this Warp: id=%s", | ||
calExpInd+1, len(calexpRefList), calExpRef.dataId) | ||
try: | ||
ccdId = calExpRef.get("ccdExposureId", immediate=True) | ||
except Exception: | ||
ccdId = calExpInd | ||
ccdId = calExpRef.get("ccdExposureId", immediate=True) | ||
try: | ||
# We augment the dataRef here with the tract, which is harmless for loading things | ||
# like calexps that don't need the tract, and necessary for meas_mosaic outputs, | ||
# like calexps that don't need the tract, and necessary for jointcal outputs, | ||
# which do. | ||
calExpRef = calExpRef.butlerSubset.butler.dataRef("calexp", dataId=calExpRef.dataId, | ||
tract=skyInfo.tractInfo.getId()) | ||
calExp = self.getCalibratedExposure(calExpRef, bgSubtracted=self.config.bgSubtracted) | ||
except Exception as e: | ||
self.log.warn("Calexp %s not found; skipping it: %s", calExpRef.dataId, e) | ||
except MissingExposureError as e: | ||
self.log.warn("Skipping missing data: %s", e) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why no longer include dataId? I would imagine the dataId of the missing calexp useful for debugging, though such information may be obtained through other means. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The assumption (and implementation) here is that the raised exception contains all the necessary information. Previously, the dataId was being duplicated. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The only error from Note: I'm moving all the Gen2 dataRef's out of |
||
continue | ||
|
||
if self.config.doApplySkyCorr: | ||
|
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.
obs_comCam
doesn't have abypass_ccdExposureId
, but that's not likely to survive. Your change is now requiring any new obs_package to write abypass_ccdExposureId
in order to be able to make a warp. I thought there MIGHT be some notebooks out there that make mock dataRefs.The conversion to Gen 3 is going to move this to runDataRef anyway.