astropy/astropy — pull request #1145 by mhvk (2013-06-02 08:18:32+00:00)
Title: First attempt at IERS A, B table classes, interpolation of UT1-UTC.

A start at addressing #351 (tried but could not convert that one to a pull request).

At present, no integration at all with Time yet, and for now one has to download IERS A (http://maia.usno.navy.mil/ser7/finals2000A.all) or IERS B (http://hpiers.obspm.fr/iers/eop/eopc04/eopc04_IAU2000.62-now) and have it in one's working directory (though this is configurable). Also, IERS A and B return different types (masked and normal Columns).

Nevertheless, one can already do the following:
```
from astropy.utils.iers import IERS_A, IERS_B
from astropy.time import Time
t = Time(['2012-06-30 12:00:00', '2012-06-30 23:59:59', '2012-06-30 23:59:60', '2012-07-01 00:00:00', '2012-07-01 12:00:00'], scale='utc')
b = IERS_B.read()
b.ut1_utc(t)
```
gives (note: leap second)
```

array([-0.5868211 , -0.5868184 , -0.5868184 , 0.4131816 , 0.41328895])
```
But does not go to present
```
b.ut1_utc(Time('2013-06-02', scale='utc'))
WARNING: some times fall after the IERS table range. Is your table out of date? [astropy.utils.iers.iers]
0.0
```
So, maybe better to use IERS_A:
```
a = IERS_A.read()
a.ut1_utc(t)
a.ut1_utc(Time('2013-07-01', scale='utc'))
```
which gives
```

masked_array(data = [-0.586821100031 -0.586818400125 -0.586818400062 0.4131816 0.41328895],
mask = [False False False False False],
fill_value = 1e+20)
WARNING: for some times, only predicted values are available. Is your IERS table out of date? [astropy.utils.iers.iers]
0.073074500000000001
```