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
Use HDU in instcal templates instead of ccdnum. #41
Conversation
infoList.append(info) | ||
extnames.discard(ext) | ||
phuInfo, infoList = super(DecamParseTask, self).getInfo(filename) | ||
for idx, info in enumerate(infoList): |
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.
for info in infoList
?
@@ -160,6 +159,7 @@ def getInfo(self, filename, filetype="raw"): | |||
info[self.instcalPrefix] = self.expnumMapper[expnum][self.instcalPrefix] | |||
info[self.dqmaskPrefix] = self.expnumMapper[expnum][self.dqmaskPrefix] | |||
info[self.wtmapPrefix] = self.expnumMapper[expnum][self.wtmapPrefix] | |||
|
|||
elif filetype == "raw": | |||
md = afwImage.readMetadata(filename, self.config.hdu) | |||
phuInfo = self.getInfoFromMetadata(md) |
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.
Maybe remove the two lines above, and move the following six lines to after line 172 (the call to the base method)?
@@ -68,7 +68,8 @@ def __init__(self, inputPolicy=None, **kwargs): | |||
# The data ID key ccdnum is not directly used in the current policy | |||
# template of the raw dataset, so is not in its keyDict automatically. | |||
# Add it so raw dataset know about the data ID key ccdnum. | |||
self.mappings["raw"].keyDict.update({'ccdnum': int}) | |||
for datasetType in ("raw", "instcal", "dqmask", "wtmap"): | |||
self.mappings[datasetType].keyDict.update({'ccdnum': int}) |
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.
May you please update the comments above these lines as well?
Since an HDU's position in an instcal file does not necessarily correspond to its CCD number, this template had been mislabling CCDs. Also removes special handling of decam raw files that was required to track the hdu field. This code was largely a duplication of the pipe_tasks ingest task, and can be alleviated with the minor changes to that task (also implemented on this ticket.)
02088b4
to
0a13fd3
Compare
Since an HDU's position in an instcal file does not necessarily correspond to
its CCD number, this template had been mislabling CCDs.
Also removes special handling of decam raw files that was required to track the
hdu field. This code was largely a duplication of the pipe_tasks ingest task,
and can be alleviated with the minor changes to that task (also implemented on
this ticket.)