hlcc 2.0.0-beta2+pre1
Loading...
Searching...
No Matches
Functions
utils.astropy_cache_updates Namespace Reference

Functions

def update_iers_leap ()
 Should be run by all HLCC Python scripts that use astropy!
 

Function Documentation

◆ update_iers_leap()

def utils.astropy_cache_updates.update_iers_leap ( )

Should be run by all HLCC Python scripts that use astropy!

It eagerly updates the astropy cache for IERS data and leap second data, using the ELT TRS web interface. This ensures that astropy uses the same values that the C++ ERFA/SOFA applications retrieve from the TRS HKS. The download from a central place at ESO also ensures that

  • we get updates (and thus avoid stale data warnings) on servers that have no access to the internet, but only to the ELT-internal network (as it was the case for all dev machines in 2024-06).
  • we do not load the public IERS servers with unnecessary frequent requests.
  • If ELT operators have to approve IERS updates or can even edit the values, then astropy applications will automatically get these consolidated values from TRS.

    TODO In the future this function should perhaps migrate to ecos/ptk, so that all ELT CS applications update their astropy installations in the same way.