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

Add required Timescale argument #10

Merged
merged 1 commit into from
Sep 27, 2016
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: 2 additions & 2 deletions python/lsst/pipe/drivers/constructCalibs.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ def getOutputId(self, expRefList, calibId):
outputId.update(calibId)
return outputId

def getMjd(self, dataId):
def getMjd(self, dataId, timescale=dafBase.DateTime.MJD):
Copy link
Member Author

Choose a reason for hiding this comment

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

@RobertLuptonTheGood this is still wrong. MJD is a DateSystem. The timescale you want is DateTime.UTC.

"""Determine the Modified Julian Date (MJD) from a data identifier"""
Copy link
Member Author

Choose a reason for hiding this comment

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

You might want to indicate that this is returning the MJD TAI.

dateObs = dataId[self.config.dateObs]

Expand All @@ -396,7 +396,7 @@ def getMjd(self, dataId):
elif not dateObs.endswith("Z"):
dateObs += "Z"

return dafBase.DateTime(dateObs).get(dafBase.DateTime.MJD)
return dafBase.DateTime(dateObs, timescale).get(dafBase.DateTime.MJD)

def getFilter(self, dataId):
"""Determine the filter from a data identifier"""
Expand Down