astropy/astropy — pull request #1929 by taldcroft (2013-12-28 16:15:00+00:00)
Title: Bug in TDB to TT calculation

Hi,

I've recently been working on astropy-based pulsar timing software and ran across a problem with the TDB conversion routines: In the astropy.time._get_delta_tdb_tt() function erfa_time.era_gd2gc() is used to convert the input lat/lon to geocentric XYZ coordinates. The returned values are in meters. These are then passed to erfa_time.d_tdb_tt() which however expects input in km. The resulting TT-TDB is pretty far off, and messes up the pulsar timing results at the few-ms level.

Should be a pretty trivial fix though! I did this locally and got TT-TDB values consistent with TEMPO2 at the us level (may be better, but I'll need to do some more careful tests to say for sure).

Cheers,
Paul