mzechmeister / serval

calculate radial velocities from stellar spectra
MIT License
36 stars 9 forks source link

serval slowed down by warning about polar motions and IERS data #47

Closed mzechmeister closed 2 years ago

mzechmeister commented 2 years ago

The following warning slows down the fits file scanning:

WARNING: Tried to get polar motions for times after IERS data is valid.
Defaulting to polar motion from the 50-yr mean for those.
This may affect precision at the 10s of arcsec level [astropy.coordinates.builtin_frames.utils]
mzechmeister commented 2 years ago

A quick work-around is the option -moonsep 0 -brvref MH or -brvref AP (astropy).

mzechmeister commented 2 years ago

The critical line seems: request = urllib.request.urlopen(url, timeout=10) # timeout in 10 seconds if no response from server in https://github.com/shbhuk/barycorrpy/blob/4f48f89980b5e2b3ebc8030a3c98211b24688f1b/barycorrpy/utc_tdb.py#L63 which requests: url = 'http://maia.usno.navy.mil/ser7/tai-utc.dat' hardcoded in https://github.com/shbhuk/barycorrpy/blob/4f48f89980b5e2b3ebc8030a3c98211b24688f1b/barycorrpy/utc_tdb.py#L59

See also #33.

mzechmeister commented 2 years ago

It turns out that .astropy/cache/download/py2/urlmap translates https://astroconda.org/aux/astropy_mirror/iers_a_1/finals2000A.all into ~/.astropy/cache/download/py2/84a1e1ebba6504be13832894bfee4598 which looks like

20 821 59082.00 P  0.246039 0.017524  0.366371 0.028540  P-0.3561762 0.0253578                                                                                                             
20 822 59083.00 P  0.246201 0.017550  0.364557 0.028595  P-0.3569432 0.0254096                                                                                                             
20 823 59084.00                                                                                                                                                                            
20 824 59085.00

Hmm, the cache is up to date with the url. 2459085.00 corresponds to 2020-8-23.5.

However, https://datacenter.iers.org/data/9/finals2000A.all goes to 2459937.00 (2022-12-23.5).