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

tickets/DM-10252: Use Butler to retrieve keys in getOutputid() #24

Merged
merged 2 commits into from Apr 21, 2017

Conversation

fred3m
Copy link
Contributor

@fred3m fred3m commented Apr 21, 2017

No description provided.

Copy link
Contributor

@PaulPrice PaulPrice left a comment

Choose a reason for hiding this comment

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

I think some changes should be re-considered.

if self.config.dateObs in dataId:
dateObs = dataId[self.config.dateObs]
else:
dateObs = butler.queryMetadata('raw', ['dateObs'], dataId)[0]
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be butler.queryMetadata('raw', [self.config.dateObs], dataId)[0]?
i.e., use the field we're told to, rather than hard-coding dateObs.

@@ -452,7 +452,8 @@ def getMjd(self, butler, dataId, timescale=dafBase.DateTime.UTC):

def getFilter(self, butler, dataId):
"""Determine the filter from a data identifier"""
return dataId[self.config.filter]
filt = butler.queryMetadata('raw', ['filter'], dataId)[0]
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems like a regression --- hard-coding filter instead of using what we're told to in the config.

Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch there, thank you :) (And likewise below)

@mfisherlevine mfisherlevine merged commit 634fdee into master Apr 21, 2017
@ktlim ktlim deleted the tickets/DM-10252 branch August 25, 2018 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants