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