Skip to content

Commit 4fcf1c9

Browse files
committed
Fix astropy#9206 by making IERS B use deterministic
IERS_Auto merges in columns from the IERS B table. But as it stood, the version of IERS B that was used was difficult to control. Now it always uses the version built in to astropy.
1 parent 1cc408e commit 4fcf1c9

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

‎astropy/utils/iers/iers.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,7 @@ def _substitute_iers_b(cls, table):
818818
Here, we use the bundled astropy IERS-B table to overwrite the values
819819
in the downloaded IERS-A table.
820820
"""
821-
iers_b = IERS_B.open()
821+
iers_b = IERS_B.open(IERS_B_FILE)
822822
# Substitute IERS-B values for existing B values in IERS-A table
823823
mjd_b = table['MJD'][~table['UT1_UTC_B'].mask]
824824
i0 = np.searchsorted(iers_b['MJD'].value, mjd_b[0], side='left')

‎astropy/utils/iers/tests/test_iers_b_into_auto.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ def test_IERS_B_parameters_loaded_into_IERS_Auto_correctly(
105105
b_name,
106106
a_name,
107107
atol):
108+
IERS_Auto.iers_table = None
108109
A = IERS_Auto.open()
109110
A[a_name]
110111
B = IERS_B.open(IERS_B_FILE)

0 commit comments

Comments
 (0)