@@ -7,8 +7,6 @@ This document is a work in progress,
7
7
that will be expanded into a full guide.
8
8
Right now it covers only one topic.
9
9
10
- .. _polar motion :
11
-
12
10
-----------------------
13
11
Precession and Nutation
14
12
-----------------------
@@ -41,6 +39,8 @@ into the Earth equatorial coordinate system of that date and time.
41
39
See the section on :ref: `Coordinates:Rotation Matrices `
42
40
for a guide to using a rotation matrix.
43
41
42
+ .. _polar-motion :
43
+
44
44
------------
45
45
Polar Motion
46
46
------------
@@ -108,6 +108,46 @@ simply install the IERS tables on your timescale object
108
108
as shown in the example code above.
109
109
Polar motion will be used everywhere that it applies.
110
110
111
+ .. _the-leap-second-table :
112
+
113
+ ---------------------
114
+ The leap second table
115
+ ---------------------
116
+
117
+ If you want to double-check that Skyfield’s leap second table
118
+ agrees with other tools or software,
119
+ you can easily print it out.
120
+ Each timescale object offers an array of Julian dates ``leap_dates ``
121
+ and another array of the same length named ``leap_offsets ``
122
+ that offers the difference between UTC and TAI in seconds:
123
+
124
+ .. testcode ::
125
+
126
+ ts = load.timescale()
127
+ for jd, offset in zip(ts.leap_dates, ts.leap_offsets):
128
+ ymd = ts.tt_jd(jd).tt_strftime('%Y-%m-%d')
129
+ print(jd, ymd, '{:+}'.format(int(offset)))
130
+
131
+ .. testoutput ::
132
+
133
+ 2441499.5 1972-07-01 +11
134
+ 2441683.5 1973-01-01 +12
135
+ 2442048.5 1974-01-01 +13
136
+ ...
137
+ 2456109.5 2012-07-01 +35
138
+ 2457204.5 2015-07-01 +36
139
+ 2457754.5 2017-01-01 +37
140
+
141
+ Note that each leap second occurs just before
142
+ the Julian date given in the table.
143
+ Taking the second row as an example,
144
+ the offset between TAI and UTC increased to +12
145
+ at the first moment of the day 1973-01-01.
146
+ It did so because that day was immediately preceded by a leap second
147
+ that was attached to the *previous * day as its final second.
148
+ So the leap second followed the normal, non-leap second 1972-12-31 12:59:59
149
+ and had the special designation 1972-12-31 12:59:60.
150
+
111
151
----------------------------------
112
152
Bad performance and using 100% CPU
113
153
----------------------------------
0 commit comments