Repository navigation
Closed
Labels
Description
Not sure if it is related to #5098 so I opened another issue.
________________________________________ TestTimeUT1.test_utc_to_ut1 _________________________________________
self = <astropy.time.tests.test_ut1.TestTimeUT1 instance at 0x7ff28f8325f0>
def test_utc_to_ut1(self):
"Test conversion of UTC to UT1, making sure to include a leap second"""
t = Time(['2012-06-30 12:00:00', '2012-06-30 23:59:59',
'2012-06-30 23:59:60', '2012-07-01 00:00:00',
'2012-07-01 12:00:00'], scale='utc')
t_ut1_jd = t.ut1.jd
t_comp = np.array([2456108.9999932079,
2456109.4999816339,
2456109.4999932083,
2456109.5000047823,
2456110.0000047833])
assert allclose_jd(t_ut1_jd, t_comp)
t_back = t.ut1.utc
assert allclose_jd(t.jd, t_back.jd)
tnow = Time.now()
# With internet off (which is the default for testing) then this will
# fall back to the bundled IERS-B table and raise an exception. But when
# testing with --remote-data the IERS_Auto class will get the latest IERS-A
# and this works.
if INTERNET_OFF:
with pytest.raises(IndexError):
tnow.ut1
else:
> tnow.ut1
astropy/time/tests/test_ut1.py:51:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
astropy/time/core.py:1138: in __getattr__
tm._set_scale(attr)
astropy/time/core.py:425: in _set_scale
args.append(get_dt(jd1, jd2))
astropy/time/core.py:1260: in _get_delta_ut1_utc
delta = iers_table.ut1_utc(jd1, jd2)
astropy/utils/iers/iers.py:215: in ut1_utc
self.ut1_utc_source if return_status else None)
astropy/utils/iers/iers.py:312: in _interpolate
self._check_interpolate_indices(i1, i, np.max(mjd))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <IERS_B length=19840>
year month day MJD ... e_UT1_UTC e_LOD e_dX_20... 2.8e-05
2016 4 26 57504.0 ... 6.1e-06 1.95e-05 3e-05 3e-05
indices_orig = array([19839]), indices_clipped = array([19840]), max_input_mjd = 57554.0
def _check_interpolate_indices(self, indices_orig, indices_clipped, max_input_mjd):
"""
Check that the indices from interpolation match those after clipping
to the valid table range. This method gets overridden in the IERS_Auto
class because it has different requirements.
"""
if np.any(indices_orig != indices_clipped):
> raise IERSRangeError('(some) times are outside of range covered '
'by IERS table.')
E IERSRangeError: (some) times are outside of range covered by IERS table.
astropy/utils/iers/iers.py:255: IERSRangeError
__________________________________ TestTimeUT1_IERS_Auto.test_ut1_iers_auto __________________________________
self = <astropy.time.tests.test_ut1.TestTimeUT1_IERS_Auto instance at 0x7ff2797c3bd8>
def test_ut1_iers_auto(self):
tnow = Time.now()
iers_a = iers.IERS_Auto.open()
tnow.delta_ut1_utc, status = iers_a.ut1_utc(tnow, return_status=True)
> assert status == iers.FROM_IERS_A_PREDICTION
E assert -2 == 2
E + where 2 = iers.FROM_IERS_A_PREDICTION
astropy/time/tests/test_ut1.py:97: AssertionError
===================== 4 failed, 11215 passed, 74 skipped, 42 xfailed in 2584.95 seconds ======================
Activity
taldcroft commentedon Jun 15, 2016
What configuration?
--remote-data?FWIW I cannot reproduce this or #5098 on mac with Py2.7 for remote and not remote data.
astrofrog commentedon Jun 15, 2016
Could it be a cache issue with the previously downloaded tables?
saimn commentedon Jun 15, 2016
@taldcroft - Sorry, forgot to put some context indeed. Python 3.5, remote-data, full log here:
https://gist.github.com/saimn/98e8ca025b9ac8d09a22e3ff71688598
saimn commentedon Jun 15, 2016
Cache content (seems unrelated ?):
eteq commentedon Jun 16, 2016
In theory the cache shouldn't matter, because the tests run in an environment that ignores the local cached copy.
@saimn - have you tried boosting the timeout as per what the thought in #5098? If that fixes it we know it's a download issue...
astrofrog commentedon Jun 18, 2016
@saimn - can you confirm that this is fixed by #5111, which is now merged?
saimn commentedon Jun 20, 2016
Fixed with #5111 !