This Jupyter notebook can be downloaded from PINT_observatories.ipynb, or viewed as a python script at PINT_observatories.py.

PINT Observatories

Basic loading and use of observatories in PINT, including loading custom observatories.

PINT needs to know where telescopes are, what clock corrections are necessary, and a bunch of other information in order to correctly process TOAs. In many cases this will be seemlessly handled when you load in a set of TOAs. But if you want to look at how/where the observatories are defined or add your own, this is the place to learn.

[1]:
# import the library
import pint.observatory

What observatories are present in PINT? How can we identify them? They have both default names and aliases.

[2]:
for name, aliases in pint.observatory.Observatory.names_and_aliases().items():
    print(f"Observatory '{name}' is also known as {aliases}")
Observatory 'gbt' is also known as ['1', 'gb']
Observatory 'gbt_pre_2021' is also known as []
Observatory 'arecibo' is also known as ['3', 'ao', 'aoutc']
Observatory 'arecibo_pre_2021' is also known as []
Observatory 'vla' is also known as ['vl', 'jvla', '6']
Observatory 'meerkat' is also known as ['mk', 'm']
Observatory 'parkes' is also known as ['7', 'pk', 'pks']
Observatory 'jodrell' is also known as ['8', 'jb']
Observatory 'jbroach' is also known as ['jboroach']
Observatory 'jbdfb' is also known as ['jbodfb']
Observatory 'jbafb' is also known as ['jboafb']
Observatory 'jodrell_pre_2021' is also known as []
Observatory 'nancay' is also known as ['ncy', 'f', 'nc']
Observatory 'ncyobs' is also known as ['nuppi', 'w']
Observatory 'effelsberg' is also known as ['eff', 'ef', 'g']
Observatory 'effelsberg_pre_2021' is also known as []
Observatory 'gmrt' is also known as ['gm', 'r']
Observatory 'ort' is also known as ['or']
Observatory 'wsrt' is also known as ['we', 'i', 'ws']
Observatory 'fast' is also known as ['k', 'fa']
Observatory 'mwa' is also known as ['u', 'mw']
Observatory 'lwa1' is also known as ['lw', 'x']
Observatory 'ps1' is also known as ['p', 'ps']
Observatory 'hobart' is also known as ['ho', '4']
Observatory 'most' is also known as ['e', 'mo']
Observatory 'chime' is also known as ['ch', 'y']
Observatory 'magic' is also known as []
Observatory 'lst' is also known as []
Observatory 'virgo' is also known as ['v1']
Observatory 'lho' is also known as ['hanford', 'h1']
Observatory 'llo' is also known as ['l1', 'livingston']
Observatory 'geo600' is also known as ['geohf']
Observatory 'kagra' is also known as ['lcgt', 'k1']
Observatory 'algonquin' is also known as ['ar', 'aro']
Observatory 'drao' is also known as ['dr']
Observatory 'acre' is also known as ['a', 'ar', 'acreroad']
Observatory 'ata' is also known as ['hcro']
Observatory 'ccera' is also known as []
Observatory 'axis' is also known as ['axi']
Observatory 'narrabri' is also known as ['atca']
Observatory 'nanshan' is also known as ['ns']
Observatory 'uao' is also known as ['ns']
Observatory 'dss_43' is also known as ['tid43']
Observatory 'op' is also known as ['obspm']
Observatory 'effelsberg_asterix' is also known as ['effix']
Observatory 'leap' is also known as ['leap']
Observatory 'jodrellm4' is also known as ['jbm4']
Observatory 'gb300' is also known as ['g3', '9']
Observatory 'gb140' is also known as ['a', 'g1']
Observatory 'gb853' is also known as ['b', 'g8']
Observatory 'la_palma' is also known as ['lap', 'lapalma']
Observatory 'hartebeesthoek' is also known as ['hart']
Observatory 'warkworth_30m' is also known as ['wark30m']
Observatory 'warkworth_12m' is also known as ['wark12m']
Observatory 'lofar' is also known as ['t', 'lf']
Observatory 'de601lba' is also known as ['eflfrlba']
Observatory 'de601lbh' is also known as ['eflfrlbh']
Observatory 'de601hba' is also known as ['eflfrhba']
Observatory 'de601' is also known as ['eflfr']
Observatory 'de602lba' is also known as ['uwlfrlba']
Observatory 'de602lbh' is also known as ['uwlfrlbh']
Observatory 'de602hba' is also known as ['uwlfrhba']
Observatory 'de602' is also known as ['uwlfr']
Observatory 'de603lba' is also known as ['tblfrlba']
Observatory 'de603lbh' is also known as ['tblfrlbh']
Observatory 'de603hba' is also known as ['tblfrhba']
Observatory 'de603' is also known as ['tblfr']
Observatory 'de604lba' is also known as ['polfrlba']
Observatory 'de604lbh' is also known as ['polfrlbh']
Observatory 'de604hba' is also known as ['polfrhba']
Observatory 'de604' is also known as ['polfr']
Observatory 'de605lba' is also known as ['julfrlba']
Observatory 'de605lbh' is also known as ['julfrlbh']
Observatory 'de605hba' is also known as ['julfrhba']
Observatory 'de605' is also known as ['julfr']
Observatory 'fr606lba' is also known as ['frlfrlba']
Observatory 'fr606lbh' is also known as ['frlfrlbh']
Observatory 'fr606hba' is also known as ['frlfrhba']
Observatory 'fr606' is also known as ['frlfr']
Observatory 'se607lba' is also known as ['onlfrlba']
Observatory 'se607lbh' is also known as ['onlfrlbh']
Observatory 'se607hba' is also known as ['onlfrhba']
Observatory 'se607' is also known as ['onlfr']
Observatory 'uk608lba' is also known as ['uklfrlba']
Observatory 'uk608lbh' is also known as ['uklfrlbh']
Observatory 'uk608hba' is also known as ['uklfrhba']
Observatory 'uk608' is also known as ['uklfr']
Observatory 'de609lba' is also known as ['ndlfrlba']
Observatory 'de609lbh' is also known as ['ndlfrlbh']
Observatory 'de609hba' is also known as ['ndlfrhba']
Observatory 'de609' is also known as ['ndlfr']
Observatory 'fi609lba' is also known as ['filfrlba']
Observatory 'fi609lbh' is also known as ['filfrlbh']
Observatory 'fi609hba' is also known as ['filfrhba']
Observatory 'fi609' is also known as ['filfr']
Observatory 'utr-2' is also known as ['utr2']
Observatory 'goldstone' is also known as ['gs']
Observatory 'shao' is also known as ['sh', 's']
Observatory 'pico_veleta' is also known as ['v', 'pv']
Observatory 'iar1' is also known as []
Observatory 'iar2' is also known as []
Observatory 'kat-7' is also known as ['k7']
Observatory 'mkiii' is also known as ['jbmk3']
Observatory 'tabley' is also known as ['pickmere']
Observatory 'darnhall' is also known as []
Observatory 'knockin' is also known as []
Observatory 'defford' is also known as []
Observatory 'cambridge' is also known as ['cam']
Observatory 'princeton' is also known as ['pr', '5']
Observatory 'hamburg' is also known as []
Observatory 'jb_42ft' is also known as ['jb42']
Observatory 'jb_mkii' is also known as ['j2', 'jbmk2', 'h']
Observatory 'jb_mkii_rch' is also known as ['jbmk2roach']
Observatory 'jb_mkii_dfb' is also known as ['jbmk2dfb']
Observatory 'lwa_sv' is also known as ['lwasv', 'ls']
Observatory 'grao' is also known as ['grao']
Observatory 'srt' is also known as ['z', 'sr']
Observatory 'quabbin' is also known as ['2', 'qu']
Observatory 'vla_site' is also known as ['v2', 'c']
Observatory 'gb_20m_xyz' is also known as ['g2']
Observatory 'northern_cross' is also known as ['bo', 'd']
Observatory 'hess' is also known as []
Observatory 'hawc' is also known as []
Observatory 'barycenter' is also known as ['bary', 'ssb', '@', 'bat']
Observatory 'geocenter' is also known as ['coe', 'geo', '0', 'geo_nogps', 'o']
Observatory 'geocenter_gps' is also known as ['coe_gps', 'geo_gps']
Observatory 'stl_geo' is also known as ['stl_geo', 'spacecraft']

Let’s get the GBT. When we print, we find out some basic info about the observatory name/aliases, location, and and other info present (e.g., where the data are from):

[3]:
gbt = pint.observatory.get_observatory("gbt")
print(gbt)
TopoObs('gbt' ('1','gb') at [882589.289 m, -4924872.368 m 3943729.418 m]:
The Robert C. Byrd Green Bank Telescope
This data was obtained by Joe Swiggum from Ryan Lynch in 2021 September.
)

The observatory also includes info on things like the clock file:

[4]:
print(f"GBT clock file is named '{gbt.clock_files}'")
GBT clock file is named '['time_gbt.dat']'

Some special locations are also present, like the solar system barycenter. You can access explicitly through the pint.observatory.special_locations module, but if you just try to get one it will automatically import what is needed

[5]:
ssb = pint.observatory.get_observatory("ssb")

If you want to know where the observatories are defined, you can find that too:

[6]:
print(
    f"Observatory definitions are in '{pint.observatory.topo_obs.observatories_json}'"
)
Observatory definitions are in '/home/docs/checkouts/readthedocs.org/user_builds/nanograv-pint/envs/latest/lib/python3.11/site-packages/pint/data/runtime/observatories.json'

That is the default location, although you can overwrite those definitions by setting $PINT_CLOCK_OVERRIDE. You can also define a new observatory andn load it in. We use JSON to do this:

[7]:
# We want to create a file-like object containing the new definition.  So defined as a string, and then use StringIO
import io

notthegbt = r"""
    {
        "notgbt": {
        "tempo_code": "1",
        "itoa_code": "GB",
        "clock_file": "time_gbt.dat",
        "itrf_xyz": [
            882589.289,
            4924872.368,
            3943729.418
        ],
        "origin": "The Robert C. Byrd Green Bank Telescope, except with one coordinate changed.\nThis data was obtained by Joe Swiggum from Ryan Lynch in 2021 September.\n"
        }
    }
    """
pint.observatory.topo_obs.load_observatories(io.StringIO(notthegbt))

If we had defined the GBT again, it would have complained unless we used overwrite=True. But since this has a new name it’s OK. Now let’s try to use it:

[8]:
notgbt = pint.observatory.get_observatory("notgbt")
print(notgbt)
TopoObs('notgbt' ('1','gb') at [882589.289 m, 4924872.368 m 3943729.418 m]:
The Robert C. Byrd Green Bank Telescope, except with one coordinate changed.
This data was obtained by Joe Swiggum from Ryan Lynch in 2021 September.
)