pint.observatory.global_clock_corrections.get_clock_correction_file
- pint.observatory.global_clock_corrections.get_clock_correction_file(filename, download_policy='if_expired', url_base=None, url_mirrors=None)[source]
Obtain a current version of the clock correction file.
The clock correction file is looked up in the index downloaded from the repository; unknown clock correction files trigger a KeyError. Known ones use the index’s information about when they expire.
- Parameters:
name (str) – The name of the file within the repository.
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.