skyfielders / python-skyfield

Elegant astronomy for Python
MIT License
1.41k stars 211 forks source link

Format of deltat.preds changed? #237

Closed pastfalk closed 5 years ago

pastfalk commented 5 years ago

If I'm not mistaking, the format of deltat.preds provided by the USNO recently changed. While in the old format, it looked like this:

YEAR TT-UT PREDICTION UT1-UTC PREDICTION ERROR

2017.00 68.591 -0.408 0.000 2017.25 68.72 0.469 0.00 2017.50 68.81 0.376 0.01

The new layout is:

MJD YEAR TT-UT Pred UT1-UTC Pred ERROR

58484.000 2019.00 69.34 -0.152 0.117
58575.000 2019.25 69.48 -0.295 0.162
58666.000 2019.50 69.62 -0.440 0.215

Hence, when running

from skyfield.api import load ts = load.timescale()

Skyfield crashes with an error like

ValueError: year 58668 is out of range

brandon-rhodes commented 5 years ago

Thanks for the report! What version of Skyfield are you using? I released 1.10 this weekend in the hope of being able to correctly parse the new format:

https://rhodesmill.org/skyfield/installation.html#changelog

To check, you can run:

python -c 'import skyfield; print(skyfield.__version__)'
pastfalk commented 5 years ago

I see - I was still using version 1.9. I should have checked the changelog. Anyway, thanks for the quick reply and keep up the good work!

brandon-rhodes commented 5 years ago

Wonderful, I'm glad it's working for you now! Let me know in the future if you run into any more problems.

troyswanson commented 5 years ago

Came here to thank you for pointing this out and offering an easy fix! Appreciate your hard work!

brandon-rhodes commented 5 years ago

Thanks for the note! :)