Details
-
Type:
Story
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: daf_base
-
Labels:None
-
Story Points:1
-
Epic Link:
-
Sprint:AP S23-3 (February)
-
Team:Alert Production
-
Urgent?:No
Description
Merlin Fisher-Levine asked on slack about the how to correctly get an astropy time from our DateTime object. We should just add `toAstropy()` in datetimeContinued.py to handle that correctly for users.
I believe all that is necessary is:
astropy.time.Time(date.get(system=DateTime.MJD, scale=DateTime.TAI), scale="tai", format="mjd")
|
Tim Jenness: do you mind doing this small review? It's pretty trivial code, but it's easy for a user to forget the right specification to astropy.Time. Ideas for other tests are welcome.
One question I have is that the existing toPython method does the import datetime internally, but I've put the import astropy outside the continue class itself. I don't see a reason to do the import inside the functions here: do you?
PR: https://github.com/lsst/daf_base/pull/79