Coverage for pesummary/gw/file/__init__.py: 72.7%

11 statements  

« prev     ^ index     » next       coverage.py v7.4.4, created at 2024-05-02 08:42 +0000

1# Licensed under an MIT style license -- see LICENSE.md 

2 

3from pesummary.utils.utils import logger 

4from astropy.utils import iers 

5 

6__author__ = ["Charlie Hoy <charlie.hoy@ligo.org>"] 

7 

8 

9def check_IERS(): 

10 """Check that the latest IERS data can be downloaded 

11 """ 

12 try: 

13 iers.conf.auto_download = True 

14 iers_a = iers.IERS_Auto.open() 

15 except Exception: 

16 logger.warning("Unable to download latest IERS data. The bundled IERS-B " 

17 "data which covers the time range from 1962 to just before " 

18 "the astropy release dat will be used. Any transformations " 

19 "outside of this range will not be allowed.") 

20 iers.conf.auto_download = False 

21 

22 

23check_IERS()