You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as I can tell, there is no simple way to get these out of an astropy.io.fits.Header object, and into a astropy.time.Time object. The best I have is
It would be nice if there was a way for astropy to automatically apply the scale and any other necessary keywords, e.g. MJDREF. Perhaps a Header.get_time(key) method where key could be e.g. DATE-OBS would be helpful?
I would be happy to implement such a helper, but thought it would be best to first seek advice on whether this would be welcomed/what the API should be.
Additional context
There is #6676 already open, but I think that refers to times stored as data in columns as opposed to the header.
The text was updated successfully, but these errors were encountered:
Description
Several entries in FITS headers indicate a time, e.g. DATE-OBS, DATE-BEG, DATE-END etc. For more information, see section 9, table 35 of the FITS standard: https://fits.gsfc.nasa.gov/standard40/fits_standard40aa-le.pdf
As far as I can tell, there is no simple way to get these out of an
astropy.io.fits.Header
object, and into aastropy.time.Time
object. The best I have isIt would be nice if there was a way for astropy to automatically apply the scale and any other necessary keywords, e.g. MJDREF. Perhaps a
Header.get_time(key)
method wherekey
could be e.g. DATE-OBS would be helpful?I would be happy to implement such a helper, but thought it would be best to first seek advice on whether this would be welcomed/what the API should be.
Additional context
There is #6676 already open, but I think that refers to times stored as data in columns as opposed to the header.
The text was updated successfully, but these errors were encountered: