IERSRangeError after downloading table from USNO
See original GitHub issueDescription
Recent dates don’t seem to be included in the IERS table when I force a fresh download
Expected behavior
I expected to convert a recent date
Actual behavior
astropy.utils.iers.iers.IERSRangeError: (some) times are outside of range covered by IERS table.
Steps to Reproduce
# Put your Python code snippet here.
from astropy.utils.data import download_file
from astropy.time import Time, TimeDelta
from astropy.utils import iers
url = 'https://maia.usno.navy.mil/ser7/finals2000A.all'
filename = download_file(url, cache=False) # Force download of latest copy
dat = iers.IERS_Auto.read(file=filename)
iers.IERS.iers_table = dat
iers.conf.auto_download = False
(Time.now()-TimeDelta(3)).ut1 #Raises Error
# astropy.utils.iers.iers.IERSRangeError: (some) times are outside of range covered by IERS table.
for i in range(1000):
try:
LastDate = (Time('2021-01-11')+TimeDelta(i)).ut1
except iers.iers.IERSRangeError:
print(Time('2021-01-11')+TimeDelta(i))
break
# 2022-02-06 00:00:00.000 is the first date that cannot be converted
System Details
Python 3.9.12 (main, Apr 5 2022, 06:56:58) [GCC 7.5.0] Numpy 1.21.5 pyerfa 2.0.0 astropy 5.0.4 Scipy 1.7.3 Matplotlib 3.5.1
Issue Analytics
- State:
- Created a year ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Source code for astropy.utils.iers.iers
Normally you should not see this error because this class automatically downloads the latest IERS-A table. Perhaps you are offline?
Read more >astropy.utils.iers.iers — Astropy v3.2.dev2792 - Read the Docs
[docs]class IERSRangeError(IndexError): """ Any error for when dates are outside ... IERS_A(IERS): """IERS Table class targeted to IERS A, provided by USNO.
Read more >statgen.us/files/software/seqpower/usr/local/lib/a...
IERSRangeError : (some) times are outside of range covered by IERS table. ... Instead of local copies of IERS files, one can also...
Read more >Duration of Daylight/Darkness Table for One Year
Specify the location of interest using the fields provided on the form. Use the buttons to find coordinates of cities or towns in...
Read more >Download - Redivis Documentation
Through the table export modal, you can easily export full data in several common file formats, as well as the table metadata. In...
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 FreeTop 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
Top GitHub Comments
Setting
earth_orientation_table
explicitly works for me. Thank you!@Warren-Porter , glad the workaround worked for you. Are you still interested to submit a PR to fix the underlying bug as mentioned in https://github.com/astropy/astropy/issues/13227#issuecomment-1120071914 ? 😸