skyfielders / python-skyfield

Elegant astronomy for Python
MIT License
1.43k stars 213 forks source link

deltat.preds file downloads on every call to load.timescale() because file has expired and not been updated #170

Closed DimitriosTheodorakis closed 6 years ago

DimitriosTheodorakis commented 6 years ago

When I run my code it downloads the de423.bsp and deltat.data files fine and then never again when I run it a second time.

However on every function call which uses a skyfield function it downloads deltat.preds and renames the old file deltat.old.preds. So after the program is complete I have over 48 preds files (and a slowed down program).

Any idea why this might be happening? I just updated to the latest version of skyfield. The files all seem to have the same content... load.timescale() seems to be causing this behaivour but I'm not sure if this is intended.

DimitriosTheodorakis commented 6 years ago

On further inspection using log.load Expired on: 2018-04-01 (for deltat.preds)

http://maia.usno.navy.mil/ser7/deltat.preds Here the prediction column goes up to 2018.25 (around the end of March)

How often do these get updated? Can skyfield not tell it is downloading the same expired file?

brandon-rhodes commented 6 years ago

Thanks for the report! Before releasing the upcoming version of Skyfield, I'll figure out what's going on with that USNO file.

brandon-rhodes commented 6 years ago

Thanks again for the report! I can't tell whether the USNO is updating those files any more, or whether we should now switch to another data source; but I'll first release a new Skyfield version with this fix to correct its behavior.