pint.observatory.global_clock_corrections.get_file

pint.observatory.global_clock_corrections.get_file(name, update_interval_days=7, download_policy='if_expired', url_base=None, url_mirrors=None, invalid_if_older_than=None)[source]

Obtain a local file pointing to a current version of name.

The mtime of the returned file will record when the data was last obtained from the internet.

Parameters:
  • name (str) – The name of the file within the repository.

  • update_interval_days (float) – How old the cached version can be before needing to be updated. Can be infinity.

  • download_policy (str) – When to try downloading from the Net. Options are: “always”, “never”, “if_expired” (if the cached version is older than update_interval_days), or “if_missing” (only if nothing is currently available).

  • url_base (str or None) – If provided, override the repository location stored in the source code. Useful mostly for testing.

  • url_mirrors (list of str or None) – If provided, override the repository mirrors stored in the source code. Useful mostly for testing.

  • invalid_if_older_than (astropy.time.Time or None) – Re-download the file if the cached version is older than this.

Returns:

The location of the file.

Return type:

pathlib.Path