This Jupyter notebook can be downloaded from check_clock_corrections.ipynb, or viewed as a python script at check_clock_corrections.py.
Check the state of PINT’s clock corrections
In order to do precision pulsar timing, it is necessary to know how the observatory clocks differ from a global time standard so that TOAs can be corrected. This requires PINT to have access to a record of measured differences. This record needs to be updated when new data are available. This notebook demonstrates how you can check the status of the clock corrections in your version of PINT. The version in the documentation also records the state of the PINT distribution at the moment the documentation was generated (which is when the code was last changed).
[1]:
import tempfile
from glob import glob
import pint.observatory
import pint.observatory.topo_obs
import pint.logging
# hide annoying INFO messages?
pint.logging.setup("WARNING")
[1]:
1
[2]:
pint.observatory.list_last_correction_mjds()
gbt 2026-01-29 00:00:00.000
time_gbt.dat 2026-02-17 12:00:00.000
gbt_pre_2021 2026-01-29 00:00:00.000
time_gbt.dat 2026-02-17 12:00:00.000
arecibo 2020-08-18 00:00:00.000
time_ao.dat 2020-08-18 00:00:00.000
arecibo_pre_2021 2020-08-18 00:00:00.000
time_ao.dat 2020-08-18 00:00:00.000
vla 2025-02-10 04:48:00.000
time_vla.dat 2025-02-10 04:48:00.000
meerkat 2026-01-29 00:00:00.000
mk2utc_observatory.clk 2026-02-08 22:59:59.971
parkes 2025-12-31 02:10:51.168
pks2gps.clk 2025-12-31 02:10:51.168
jodrell 2025-10-08 00:30:01.507
jb2gps.clk 2025-10-08 00:30:01.507
jbroach 2018-03-20 15:22:44.000
jbroach2jb.clk 2018-03-20 15:22:44.000
jb2gps.clk 2025-10-08 00:30:01.507
jbdfb 2021-02-22 23:21:39.004
jbdfb2jb.clk 2021-02-22 23:21:39.004
jb2gps.clk 2025-10-08 00:30:01.507
jbafb 2026-01-29 00:00:00.000
jodrell_pre_2021 2025-10-08 00:30:01.507
jb2gps.clk 2025-10-08 00:30:01.507
nancay 2026-01-29 00:00:00.000
ncyobs 2023-10-27 00:00:00.000
ncyobs2obspm.clk 2024-12-30 00:00:00.000
obspm2gps.clk 2023-10-27 00:00:00.000
effelsberg 2015-06-22 12:00:00.000
eff2gps.clk 2015-06-22 12:00:00.000
effelsberg_pre_2021 2015-06-22 12:00:00.000
eff2gps.clk 2015-06-22 12:00:00.000
gmrt 2026-01-29 00:00:00.000
ort 2026-01-29 00:00:00.000
wsrt 2015-06-29 02:24:00.000
wsrt2gps.clk 2015-06-29 02:24:00.000
fast 2025-08-25 22:59:31.200
time_fast.dat 2025-08-25 22:59:31.200
mwa 2026-01-29 00:00:00.000
lwa1 2026-01-29 00:00:00.000
ps1 2026-01-29 00:00:00.000
hobart 2026-01-29 00:00:00.000
most 2018-09-06 00:00:00.173
mo2gps.clk 2018-09-06 00:00:00.173
chime 2026-01-29 00:00:00.000
magic 2026-01-29 00:00:00.000
lst 2026-01-29 00:00:00.000
virgo 2026-01-29 00:00:00.000
lho 2026-01-29 00:00:00.000
llo 2026-01-29 00:00:00.000
geo600 2026-01-29 00:00:00.000
kagra 2026-01-29 00:00:00.000
algonquin 2026-01-29 00:00:00.000
drao 2026-01-29 00:00:00.000
acre 2026-01-29 00:00:00.000
ata 2026-01-29 00:00:00.000
ccera 2026-01-29 00:00:00.000
axis 2026-09-26 00:00:00.000
narrabri 2026-01-29 00:00:00.000
nanshan 2026-01-29 00:00:00.000
uao 2026-01-29 00:00:00.000
dss_43 2026-01-29 00:00:00.000
op 2026-01-29 00:00:00.000
effelsberg_asterix 2021-03-21 12:00:00.000
effix2gps.clk 2021-03-21 12:00:00.000
leap 2014-03-04 00:00:00.000
leap2effix.clk 2014-03-04 00:00:00.000
effix2gps.clk 2021-03-20 12:00:00.000
jodrellm4 2026-01-29 00:00:00.000
gb300 2026-01-29 00:00:00.000
gb140 1999-07-31 12:00:00.000
time_gb140.dat 1999-07-31 12:00:00.000
gb853 1997-08-28 09:50:24.000
time_gb853.dat 1997-08-28 09:50:24.000
la_palma 2026-01-29 00:00:00.000
hartebeesthoek 2026-01-29 00:00:00.000
warkworth_30m 2026-01-29 00:00:00.000
warkworth_12m 2026-01-29 00:00:00.000
lofar 2026-01-29 00:00:00.000
de601lba 2026-01-29 00:00:00.000
de601lbh 2026-01-29 00:00:00.000
de601hba 2026-01-29 00:00:00.000
de601 2026-01-29 00:00:00.000
de602lba 2026-01-29 00:00:00.000
de602lbh 2026-01-29 00:00:00.000
de602hba 2026-01-29 00:00:00.000
de602 2026-01-29 00:00:00.000
de603lba 2026-01-29 00:00:00.000
de603lbh 2026-01-29 00:00:00.000
de603hba 2026-01-29 00:00:00.000
de603 2026-01-29 00:00:00.000
de604lba 2026-01-29 00:00:00.000
de604lbh 2026-01-29 00:00:00.000
de604hba 2026-01-29 00:00:00.000
de604 2026-01-29 00:00:00.000
de605lba 2026-01-29 00:00:00.000
de605lbh 2026-01-29 00:00:00.000
de605hba 2026-01-29 00:00:00.000
de605 2026-01-29 00:00:00.000
fr606lba 2026-01-29 00:00:00.000
fr606lbh 2026-01-29 00:00:00.000
fr606hba 2026-01-29 00:00:00.000
fr606 2026-01-29 00:00:00.000
se607lba 2026-01-29 00:00:00.000
se607lbh 2026-01-29 00:00:00.000
se607hba 2026-01-29 00:00:00.000
se607 2026-01-29 00:00:00.000
uk608lba 2026-01-29 00:00:00.000
uk608lbh 2026-01-29 00:00:00.000
uk608hba 2026-01-29 00:00:00.000
uk608 2026-01-29 00:00:00.000
de609lba 2026-01-29 00:00:00.000
de609lbh 2026-01-29 00:00:00.000
de609hba 2026-01-29 00:00:00.000
de609 2026-01-29 00:00:00.000
fi609lba 2026-01-29 00:00:00.000
fi609lbh 2026-01-29 00:00:00.000
fi609hba 2026-01-29 00:00:00.000
fi609 2026-01-29 00:00:00.000
utr-2 2026-01-29 00:00:00.000
goldstone 2026-01-29 00:00:00.000
shao 2026-01-29 00:00:00.000
pico_veleta 2026-01-29 00:00:00.000
iar1 2026-01-29 00:00:00.000
iar2 2026-01-29 00:00:00.000
kat-7 2026-01-29 00:00:00.000
mkiii 2026-01-29 00:00:00.000
tabley 2026-01-29 00:00:00.000
darnhall 2026-01-29 00:00:00.000
knockin 2026-01-29 00:00:00.000
defford 2026-01-29 00:00:00.000
cambridge 2026-01-29 00:00:00.000
princeton 2026-01-29 00:00:00.000
hamburg 2026-01-29 00:00:00.000
jb_42ft 2026-01-29 00:00:00.000
jb_mkii 2026-01-29 00:00:00.000
jb_mkii_rch 2026-01-29 00:00:00.000
jb_mkii_dfb 2026-01-29 00:00:00.000
lwa_sv 2026-01-29 00:00:00.000
grao 2026-01-29 00:00:00.000
srt 2026-01-29 00:00:00.000
quabbin 2026-01-29 00:00:00.000
vla_site 2026-01-29 00:00:00.000
gb_20m_xyz 2026-01-29 00:00:00.000
northern_cross 2026-01-29 00:00:00.000
hess 2026-01-29 00:00:00.000
hawc 2026-01-29 00:00:00.000
nenufar 2026-01-29 00:00:00.000
barycenter 2026-09-26 00:00:00.000
geocenter 2026-09-26 00:00:00.000
geocenter_gps 2026-01-29 00:00:00.000
stl_geo 2026-09-26 00:00:00.000
Let’s export the clock corrections as they currently stand so we can save these exact versions for reproducibility purposes.
[3]:
d = tempfile.mkdtemp()
pint.observatory.topo_obs.export_all_clock_files(d)
for f in sorted(glob(f"{d}/*")):
print(f)
/tmp/tmpesb16stt/eff2gps.clk
/tmp/tmpesb16stt/effix2gps.clk
/tmp/tmpesb16stt/gps2utc.clk
/tmp/tmpesb16stt/jb2gps.clk
/tmp/tmpesb16stt/jbdfb2jb.clk
/tmp/tmpesb16stt/jbroach2jb.clk
/tmp/tmpesb16stt/leap2effix.clk
/tmp/tmpesb16stt/mk2utc_observatory.clk
/tmp/tmpesb16stt/mo2gps.clk
/tmp/tmpesb16stt/ncyobs2obspm.clk
/tmp/tmpesb16stt/obspm2gps.clk
/tmp/tmpesb16stt/pks2gps.clk
/tmp/tmpesb16stt/tai2tt_bipm2023.clk
/tmp/tmpesb16stt/time_ao.dat
/tmp/tmpesb16stt/time_fast.dat
/tmp/tmpesb16stt/time_gb140.dat
/tmp/tmpesb16stt/time_gb853.dat
/tmp/tmpesb16stt/time_gbt.dat
/tmp/tmpesb16stt/time_vla.dat
/tmp/tmpesb16stt/wsrt2gps.clk
Understand Observatory Clock Corrections
Observatory objects hold information needed for PINT to convert site arrival times (SAT) to UTC. The first is the clock correction file as described above. For most observatories, these files correct the times from UTC(observatory) to UTC(GPS) since the corrections are determined using a GPS time standard at the site. To convert UTC(GPS) to UTC, the corrections from BIPM Circular T must be applied. PINT gets these corrections from the file gps2utc.clk.
[4]:
site = pint.observatory.get_observatory("gbt")
[5]:
# This lists the clock correction files that will be applied to TOAs from this site
site.clock_files
[5]:
['time_gbt.dat']
[6]:
# This boolean indicate whether the UTC(GPS) to UTC correction will be applied to TOAs from this site
site.apply_gps2utc
[6]:
True
Note these should be considered immutable properties of the site in general. However, if for testing or other purposes you want to disable the GPS correction, you can overwrite the observatory in the registry with a modified one, as follows. But this is not recommended in most cases because it modifies the observatory registry and will affect all TOAs that use that observatory in the current python session (see issue #1708).
[7]:
site = pint.observatory.get_observatory("gbt", apply_gps2utc=False)
site.apply_gps2utc
WARNING (pint.observatory ): Observatory gbt: Overwriting apply_gps2utc=False in registry.
[7]:
False
[8]:
# Note how this will be the case going forward, even if you don't specify that kwarg,
# because the site is pulled from the Observatory registry (i.e. the change "sticks")
site2 = pint.observatory.get_observatory("gbt")
site2.apply_gps2utc
[8]:
False
[ ]: