skyfielders / python-skyfield

Elegant astronomy for Python
MIT License
1.38k stars 208 forks source link

Update UTC-TAI for years between 1961 and 1972 #679

Open miccoli opened 2 years ago

miccoli commented 2 years ago

This is a follow up to #515.

Today I stumbled into a reference which contains quantitative information for UTC-TAI for the time span 1961 up to 1972:

Evolution of timescales from astronomy to physical metrology, Dennis D McCarthy 2011 Metrologia 48 S132, doi:10.1088/0026-1394/48/4/S03

If I got all the points exactly this is the timeline. (All quotes from the above article)

The 60's UTC was a mess: "Offsets in the atomic frequency to match the rotational speed of the Earth were announced each year by the BIH, and steps of 100 ms were inserted as needed on dates determined by the BIH, to maintain time signals to within less than 0.1 s of UT2. Because UTC included rate offsets, the broadcast time signals indicated neither the SI second nor the mean solar second."

Table 1 of the article contains constants for computing TAI - UTC as a piecewise linear function o[i] + (t - t0[i])*r[i] from 1961-01-01 up to 1972-01-01, where i = range(13)

I checked the formula and obtained this graph:

image

which is coerent with fig.4 (Atomic Time − WWV) of the cited article.

Conclusions.

Proposed implementation.

As already discussed in #515 a warning should be issued when using UTC for dates before 1961.

brandon-rhodes commented 2 years ago

Thank you for pointing out this article! I'll try viewing it the next time I visit a university that might have access to that online journal.

We will certainly want the curve and formula (could you share your implementation of the piecewise routine?) to become part of a future t.ut_… system of times that offer HORIZONS-style “UT” which is UTC over recent decades but degrades gracefully to UT1 over all previous centuries. This 1961–1972 curve would be a great way to bridge the two eras, and help Skyfield return times congruent with the first atomic clocks and WWV-calibrated observations.

I’ll have to think, though, about whether the t.utc_… methods should change their pre-1972 output — it might confuse users if a method with “UTC” in the name was in fact returning what we might call “generic atomic time”, pasting together all the previous approaches that preceded UTC. Mightn’t users be surprised for it to include standards that weren't strictly UTC? (The routines would also run more slowly as they would now need to consult a series of tables, unless there's a very clever way to implement this using NumPy arrays?) But maybe that's an imaginary problem and users wouldn't be confused at all. It would certainly be nice for history to bottom out at TAI - UTC = 0 instead of TAI - UTC = 10 all the way back through the Romans and the pyramids. Hmm.

miccoli commented 2 years ago

First start with my (quick and dirty) implementation:

Python code ```python import numpy as np # # Coefficients below from Table 1. TAI − UTC in # Dennis D McCarthy 2011 Metrologia 48 S132 # http://dx.doi.org/10.1088/0026-1394/48/4/S03 # C = np.array( [ (-np.inf, np.nan, 0, 0), # sentinel (37_300, 1.422818, 37_300, 0.0012960), (37_512, 1.372818, 37_300, 0.0012960), (37_665, 1.845858, 37_665, 0.0011232), (38_334, 1.945858, 37_665, 0.0011232), (38_395, 3.240130, 38_761, 0.0012960), (38_486, 3.340130, 38_761, 0.0012960), (38_639, 3.440130, 38_761, 0.0012960), (38_761, 3.540130, 38_761, 0.0012960), (38_820, 3.640130, 38_761, 0.0012960), (38_942, 3.740130, 38_761, 0.0012960), (39_004, 3.840130, 38_761, 0.0012960), (39_126, 4.313170, 39_126, 0.0025920), (39_887, 4.213170, 39_126, 0.0025920), (41_317, np.nan, 0, 0), # sentinel (np.inf, np.nan, 0, 0), # sentinel ], dtype=[ ("left", np.float_), ("offset", np.float_), ("t0", np.float_), ("drate", np.float_), ], ) def utc_offset(t): """ d = utc_offset(t) computes d = TAI - UTC (in seconds) for t (expressed as MJD) for 37_300 <= t < 41_317, i.e. between 1961-01-01 and 1972-01-01 outside this interval returns NaN. """ i = np.searchsorted(C["left"], t, side="right") - 1 return (t - C["t0"][i]) * C["drate"][i] + C["offset"][i] ```

Maybe your points are better discussed with this graph, with TT-x (s), where x are various timescales.

image

For the pourpose of skyfield, TAI can be considered as realization of TT. This means that before its first definition and past the last issued BIPM circular, TAI is not defined. However due to its high stability there is no problem in extending this timescale indefinitely in the past and in the future, gray line, TT-TAI = 32.184 s.

UTC is based on TAI, so the same argument as above applies: it is not defined before its formal definition (1963?) and past the last BIPM circular T. The current implementation extends in the past the 1972 offset (10s) and the current one into the future, blue line.

Now there is no doubt that the term UTC was used before 1972, and that it followed different rules from the current implementation. BTW, the unix epoch is 1970-01-01T00:00:00 UTC, and this is a valid time. The data for 1961–1972 I've found seem to me accurate. You can also compare with slide 8 of this ITU presentation. So this leads to my proposed amendment 1, orange dashed line.

For the time span 1956–1961 I made reference to Figure 4 of the above cited article, which states

Figure 4 shows the difference between a uniform atomic time and the time broadcast by WWV from 1956 until 1972 when the current definition of UTC was implemented.

It was my intention to digitize this figure to obtain data points in the 1956–1961 time span. I've not yet done this, but a very crude approximation should be the one labelled "amendment 2", green dotted line.

However, looking at the graph in this post, I've changed my mind:

Apparently it does not make much sense to stick to the WWV signal for defining UTC in this time span.

Updated proposal

This said, the following seems to me a better proposal.

Discussion

Nowadays we think that UTC is civil time, ticking at the same frequency of the SI second, with the (annoying?) intermission of leap seconds to keep it in sync with UT1.

However UTC was first conceived in the sixties as a coordinated radio time signal based on atomic time with a strong emphasis on nautical applications. Therfore the main point was to keep UTC - UT2 less than 100ms, at the cost of having a clock ticking at a rate wich was not a SI second. In the 70' focus switched to broadcasting precise frequency references, and the current system was implemented in 1972.

This is for sure a not well known historical development of UTC, therefore the surprise factor is high. However at least for the 1961–1972 the available data seems to be historically accurate. So I would not call this "pre-UTC": there is high probability that civil time in 1961–1972 was closer to this non constant rate UTC than to the "constant rate" 10s offset of the 1972 UTC, currently implemented.

TT - UT1

TT - UTC does not follows as closely as expected the TT - UT1 line in the 1961–1972 time span. However having a look to slide 9 of the ITU presentation this seems a minor problem with skiefield data for 𝛥T.

miccoli commented 2 years ago

extra references

other implementations

ERFA (Essential Routines for Fundamental Astronomy)

ERFA is used (via its python bindings) in astropy. TAI - UTC is implemented in https://github.com/liberfa/erfa/blob/master/src/dat.c.

Assumption here are

miccoli commented 2 years ago

more references

In https://www.nist.gov/time-distribution/radio-station-wwv/wwvwwvh-station-library primary references on the NBS time signals broadcasted by WWV can be found.

In NBS Misc. Publ. 236 a diagram of the difference between the time time signal and UT2 can be found for the 1957–1960 period: WWV

This is the "uncoordinated" US civil time, which was based on an atomic frequency standard and was kept close to UT2 by means of frequent step adjustments. To recap: after 1960 international coordination starts, and by 1961 frequency and time step adjustments are decided by BIPM.

zero0cool0 commented 1 year ago

Trying to contribute to this discussion:

Since I haven't seen this mentioned before, this document is an excellent (and I think pretty authoritative) write-up of historical and current time scales.

Relating to this discussion, it states that

coordination of UT for broadcasts from 1961 through 1971 The responsibility for coordinating the frequency offsets and steps was transferred to the BIH. A table of the frequency offsets and steps is available from the Paris Bureau of the IERS, which is the organizational descendant of the earth rotation portions of the BIH.

ftp://gdc.cddis.eosdis.nasa.gov/products/iers/tai-utc.dat contains (authoritative?) information about TAI-UTC after Jan 1 1961. For example, it states that TAI-UTC= 1.4228180 S + (MJD - 37300.) X 0.001296 S for dates after JAN 1 1961 but before AUG 1 1961.

I'm by now means an authority with regards to timescales, but agree with the above comment that for anything before 1961 UTC should be degraded into UT1 - which in turn would allow the use DeltaT to arrive at TT (or TDT, ET for earlier dates)

miccoli commented 1 year ago

Thanks @zero0cool0 for pointing out the very complete and competent write-up at https://www.ucolick.org/~sla/leapsecs/timescales.html.

However I disagree with the proposal:

I'm by now means an authority with regards to timescales, but agree with the above comment that for anything before 1961 UTC should be degraded into UT1 - which in turn would allow the use DeltaT to arrive at TT (or TDT, ET for earlier dates)

At the risk of oversimplification, I would try to maintain a very strict distinction between

Therefore

As what regards TAI - UTC we have authoritative data for the following periods.

Before 1961 and up to 1955 (when the atomic timescale was first established) there is no historically accurate concept of UTC, but we can only try to reconstruct various time scales which later evolved into UTC.

The current (1.43.1) skyfield behavior is

A radical, historically correct approach could be

My previous proposal above, in order not to break compatibility with cuurent behaviour:

miccoli commented 1 year ago

A short update: the following figure has been recently published in Metrologia. The UTC-TAI line is broadly in accord with my last proposal.

figure1

(Image CC BY 3.0, from "Towards a consensus on a continuous Coordinated Universal Time", Judah Levine et al 2022 Metrologia in press https://doi.org/10.1088/1681-7575/ac9da5)