pint.observatory.topo_obs.load_observatories

pint.observatory.topo_obs.load_observatories(filename='/home/docs/checkouts/readthedocs.org/user_builds/nanograv-pint/checkouts/latest/docs/../src/pint/data/runtime/observatories.json', overwrite=False)[source]

Load observatory definitions from JSON and create pint.observatory.topo_obs.TopoObs objects, registering them

Set overwrite to True if you want to re-read a file with updated definitions. If overwrite is False and you attempt to add an existing observatory, an exception is raised.

Parameters:
  • filename (str or file-like object, optional) –

  • overwrite (bool, optional) – Whether a new instance of an existing observatory should overwrite the existing one.

Raises:

ValueError – If an attempt is made to add an existing observatory with overwrite=False

Notes

If the origin field is a list of strings, they will be joined together with newlines.