question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

astropy.time.Time fits format incorrectly includes "(UTC)"

See original GitHub issue

hi! 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:closed
  • Created 7 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
timjcommented, Sep 11, 2018

I’ll see if I can do a pull request next week.

1reaction
astrofrogcommented, Sep 11, 2018

I agree that in cases like this we should just change it even if it breaks things (it’s unlikely to break much)

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found