astropy.time.Time fits format incorrectly includes "(UTC)"
See original GitHub issuehi! When playing with astropy 1.2.1 I noticed this:
In [1]: import astropy.time
In [2]: t = astropy.time.Time('1999-01-01T00:00:00.123456789')
In [3]: t.format = 'fits'
In [4]: print(t)
1999-01-01T00:00:00.123(UTC)
I’m not sure why the (UTC) part is appended to the string, but the fits specification doesn’t mention this:
http://fits.gsfc.nasa.gov/year2000.html https://archive.stsci.edu/fits/fits_standard/node87.html#s:tsys
When this format is used in actual fits header, various fits header parser tools break.
there was a discussion on the astropy mailinglist, but it seems mail.scipy.org is down so I can’t add a link.
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Time — Astropy v5.2
A Time object is initialized with one or more times in the val argument. The input times in val must conform to the...
Read more >Time and Dates (astropy.time) — Astropy v5.2
The TimeFITS format implements most of the FITS standard 2, including support for the LOCAL timescale. Note, though, that FITS supports some deprecated...
Read more >Source code for astropy.time.formats
[docs]class TimeUnique(TimeFormat): """ Base class for time formats that can uniquely create a time object without requiring an explicit format specifier.
Read more >Source code for astropy.time.core
Specific emphasis is placed on supporting time scales (e.g. UTC, TAI, ... has been # collected by the TimeAstropyTime format class up to...
Read more >TimeDelta — Astropy v5.2
The input times in val must conform to the specified format . ... For a similar reason, 'utc' is not a valid scale...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ll see if I can do a pull request next week.
I agree that in cases like this we should just change it even if it breaks things (it’s unlikely to break much)