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 2025-01-29 00:00:00.000
time_gbt.dat 2025-02-12 12:00:00.000
gbt_pre_2021 2025-01-29 00:00:00.000
time_gbt.dat 2025-02-12 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-01-29 00:00:00.000
time_vla.dat 2025-02-10 04:48:00.000
meerkat 2025-01-29 00:00:00.000
mk2utc_observatory.clk 2025-01-30 22:59:59.971
parkes 2025-01-29 00:00:00.000
pks2gps.clk 2025-01-31 06:22:29.568
jodrell 2024-11-07 00:30:00.255
jb2gps.clk 2024-11-07 00:30:00.255
jbroach 2018-03-20 15:22:44.000
jbroach2jb.clk 2018-03-20 15:22:44.000
jb2gps.clk 2024-11-07 00:30:00.255
jbdfb 2021-02-22 23:21:39.004
jbdfb2jb.clk 2021-02-22 23:21:39.004
jb2gps.clk 2024-11-07 00:30:00.255
jbafb 2025-01-29 00:00:00.000
jodrell_pre_2021 2024-11-07 00:30:00.255
jb2gps.clk 2024-11-07 00:30:00.255
nancay 2025-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 2025-01-29 00:00:00.000
ort 2025-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-01-29 00:00:00.000
time_fast.dat 2025-02-10 22:59:31.200
mwa 2025-01-29 00:00:00.000
lwa1 2025-01-29 00:00:00.000
ps1 2025-01-29 00:00:00.000
hobart 2025-01-29 00:00:00.000
most 2018-09-06 00:00:00.173
mo2gps.clk 2018-09-06 00:00:00.173
chime 2025-01-29 00:00:00.000
magic 2025-01-29 00:00:00.000
lst 2025-01-29 00:00:00.000
virgo 2025-01-29 00:00:00.000
lho 2025-01-29 00:00:00.000
llo 2025-01-29 00:00:00.000
geo600 2025-01-29 00:00:00.000
kagra 2025-01-29 00:00:00.000
algonquin 2025-01-29 00:00:00.000
drao 2025-01-29 00:00:00.000
acre 2025-01-29 00:00:00.000
ata 2025-01-29 00:00:00.000
ccera 2025-01-29 00:00:00.000
axis 2026-09-26 00:00:00.000
narrabri 2025-01-29 00:00:00.000
nanshan 2025-01-29 00:00:00.000
uao 2025-01-29 00:00:00.000
dss_43 2025-01-29 00:00:00.000
op 2025-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 2025-01-29 00:00:00.000
gb300 2025-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 2025-01-29 00:00:00.000
hartebeesthoek 2025-01-29 00:00:00.000
warkworth_30m 2025-01-29 00:00:00.000
warkworth_12m 2025-01-29 00:00:00.000
lofar 2025-01-29 00:00:00.000
de601lba 2025-01-29 00:00:00.000
de601lbh 2025-01-29 00:00:00.000
de601hba 2025-01-29 00:00:00.000
de601 2025-01-29 00:00:00.000
de602lba 2025-01-29 00:00:00.000
de602lbh 2025-01-29 00:00:00.000
de602hba 2025-01-29 00:00:00.000
de602 2025-01-29 00:00:00.000
de603lba 2025-01-29 00:00:00.000
de603lbh 2025-01-29 00:00:00.000
de603hba 2025-01-29 00:00:00.000
de603 2025-01-29 00:00:00.000
de604lba 2025-01-29 00:00:00.000
de604lbh 2025-01-29 00:00:00.000
de604hba 2025-01-29 00:00:00.000
de604 2025-01-29 00:00:00.000
de605lba 2025-01-29 00:00:00.000
de605lbh 2025-01-29 00:00:00.000
de605hba 2025-01-29 00:00:00.000
de605 2025-01-29 00:00:00.000
fr606lba 2025-01-29 00:00:00.000
fr606lbh 2025-01-29 00:00:00.000
fr606hba 2025-01-29 00:00:00.000
fr606 2025-01-29 00:00:00.000
se607lba 2025-01-29 00:00:00.000
se607lbh 2025-01-29 00:00:00.000
se607hba 2025-01-29 00:00:00.000
se607 2025-01-29 00:00:00.000
uk608lba 2025-01-29 00:00:00.000
uk608lbh 2025-01-29 00:00:00.000
uk608hba 2025-01-29 00:00:00.000
uk608 2025-01-29 00:00:00.000
de609lba 2025-01-29 00:00:00.000
de609lbh 2025-01-29 00:00:00.000
de609hba 2025-01-29 00:00:00.000
de609 2025-01-29 00:00:00.000
fi609lba 2025-01-29 00:00:00.000
fi609lbh 2025-01-29 00:00:00.000
fi609hba 2025-01-29 00:00:00.000
fi609 2025-01-29 00:00:00.000
utr-2 2025-01-29 00:00:00.000
goldstone 2025-01-29 00:00:00.000
shao 2025-01-29 00:00:00.000
pico_veleta 2025-01-29 00:00:00.000
iar1 2025-01-29 00:00:00.000
iar2 2025-01-29 00:00:00.000
kat-7 2025-01-29 00:00:00.000
mkiii 2025-01-29 00:00:00.000
tabley 2025-01-29 00:00:00.000
darnhall 2025-01-29 00:00:00.000
knockin 2025-01-29 00:00:00.000
defford 2025-01-29 00:00:00.000
cambridge 2025-01-29 00:00:00.000
princeton 2025-01-29 00:00:00.000
hamburg 2025-01-29 00:00:00.000
jb_42ft 2025-01-29 00:00:00.000
jb_mkii 2025-01-29 00:00:00.000
jb_mkii_rch 2025-01-29 00:00:00.000
jb_mkii_dfb 2025-01-29 00:00:00.000
lwa_sv 2025-01-29 00:00:00.000
grao 2025-01-29 00:00:00.000
srt 2025-01-29 00:00:00.000
quabbin 2025-01-29 00:00:00.000
vla_site 2025-01-29 00:00:00.000
gb_20m_xyz 2025-01-29 00:00:00.000
northern_cross 2025-01-29 00:00:00.000
hess 2025-01-29 00:00:00.000
hawc 2025-01-29 00:00:00.000
nenufar 2025-01-29 00:00:00.000
barycenter 2026-09-26 00:00:00.000
geocenter 2026-09-26 00:00:00.000
geocenter_gps 2025-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/tmpuy67ecd8/eff2gps.clk
/tmp/tmpuy67ecd8/effix2gps.clk
/tmp/tmpuy67ecd8/gps2utc.clk
/tmp/tmpuy67ecd8/jb2gps.clk
/tmp/tmpuy67ecd8/jbdfb2jb.clk
/tmp/tmpuy67ecd8/jbroach2jb.clk
/tmp/tmpuy67ecd8/leap2effix.clk
/tmp/tmpuy67ecd8/mk2utc_observatory.clk
/tmp/tmpuy67ecd8/mo2gps.clk
/tmp/tmpuy67ecd8/ncyobs2obspm.clk
/tmp/tmpuy67ecd8/obspm2gps.clk
/tmp/tmpuy67ecd8/pks2gps.clk
/tmp/tmpuy67ecd8/tai2tt_bipm2023.clk
/tmp/tmpuy67ecd8/time_ao.dat
/tmp/tmpuy67ecd8/time_fast.dat
/tmp/tmpuy67ecd8/time_gb140.dat
/tmp/tmpuy67ecd8/time_gb853.dat
/tmp/tmpuy67ecd8/time_gbt.dat
/tmp/tmpuy67ecd8/time_vla.dat
/tmp/tmpuy67ecd8/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
[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
[ ]: