pint.solar_system_ephemerides.load_kernel

pint.solar_system_ephemerides.load_kernel(ephem, path=None, link=None)[source]

Load the solar system ephemeris

Ephemeris files may be obtained through astropy’s internal collection (which primarily downloads them from the network but caches them in a user-wide cache directory), from an additional network location via the astropy mechanism, or from a file on the local system. If the ephemeris cannot be found a ValueError is raised.

If a kernel must be obtained from the network, it is first looked for in the location specified by link, then in a list of mirrors of the JPL ephemeris collection.

If the ephemeris must be downloaded, it is downloaded using astropy.utils.data.download_file(); it is thus stored in the Astropy cache <https://docs.astropy.org/en/stable/utils/data.html>.

Parameters:
  • ephem (str) – Short name of the ephemeris, for example de421. Case-insensitive.

  • path (str, optional) – Load the ephemeris from the file specified in path, rather than requesting it from the network or astropy’s collection of ephemerides. The file is searched for by treating path as relative to the current directory, or failing that, as relative to the data directory specified in PINT’s configuration.

  • link (str, optional) – Suggest the URL as a possible location astropy should search for the ephemeris.

Note

If both path and link are provided. Path will be first to try.