Skip to content

Instantly share code, notes, and snippets.

@saimn
Created June 15, 2016 11:04
Show Gist options
  • Select an option

  • Save saimn/98e8ca025b9ac8d09a22e3ff71688598 to your computer and use it in GitHub Desktop.

Select an option

Save saimn/98e8ca025b9ac8d09a22e3ff71688598 to your computer and use it in GitHub Desktop.
============================= test session starts ==============================
platform linux -- Python 3.5.1, pytest-2.8.3, py-1.4.30, pluggy-0.3.1
Running tests with Astropy version 1.2.dev15742.
Running tests in lib.linux-x86_64-3.5/astropy docs.
Date: 2016-06-15T10:30:53
Platform: Linux-4.6.2-1-ARCH-x86_64-with-arch
Executable: /home/simon/lib/astropy/.tox/py35-all/bin/python
Full Python Version:
3.5.1 (default, Mar 3 2016, 09:29:07)
[GCC 5.3.0]
encodings: sys: utf-8, locale: UTF-8, filesystem: utf-8
byteorder: little
float info: dig: 15, mant_dig: 15
Numpy: 1.11.0
Scipy: 0.17.1
Matplotlib: 1.5.1
h5py: 2.6.0
Pandas: 0.18.1
Using Astropy options: remote_data.
rootdir: /tmp/simon/astropy-test-ts9hrkov, inifile: setup.cfg
plugins: xdist-1.14
collected 8618 items
astropy/_erfa/tests/test_erfa.py .......
astropy/analytic_functions/tests/test_blackbody.py .....
astropy/config/configuration.py .
astropy/config/tests/test_configs.py ...............
astropy/constants/__init__.py .
astropy/constants/tests/test_constant.py ........
astropy/constants/tests/test_pickle.py xxxxxxxxx
astropy/convolution/kernels.py ...
astropy/convolution/tests/test_convolve.py ...............................................................................................................
astropy/convolution/tests/test_convolve_fft.py ...................................................................................................................................................................................................................................................................................................................................................
astropy/convolution/tests/test_convolve_kernels.py ..............................................................................
astropy/convolution/tests/test_discretize.py ...s...........s...............
astropy/convolution/tests/test_kernel_class.py ........................................................................................................................................................................................
astropy/convolution/tests/test_pickle.py .xx.xx.xx
astropy/coordinates/angles.py ..
astropy/coordinates/baseframe.py .
astropy/coordinates/representation.py .
astropy/coordinates/sky_coordinate.py ..
astropy/coordinates/solar_system.py ....
astropy/coordinates/builtin_frames/galactocentric.py .
astropy/coordinates/tests/test_angles.py ........................................
astropy/coordinates/tests/test_angular_separation.py ....
astropy/coordinates/tests/test_api_ape5.py .....
astropy/coordinates/tests/test_arrays.py .............
astropy/coordinates/tests/test_atc_replacements.py ....
astropy/coordinates/tests/test_celestial_transformations.py ..............
astropy/coordinates/tests/test_distance.py .........
astropy/coordinates/tests/test_earth.py ..............
astropy/coordinates/tests/test_formatting.py ..........
astropy/coordinates/tests/test_frames.py .........................
astropy/coordinates/tests/test_funcs.py ...
astropy/coordinates/tests/test_iau_fullstack.py ....................................................
astropy/coordinates/tests/test_intermediate_transformations.py ....................................................
astropy/coordinates/tests/test_matching.py ......
astropy/coordinates/tests/test_name_resolve.py ...
astropy/coordinates/tests/test_pickle.py ....xx.x...xx.x...xx.x.
astropy/coordinates/tests/test_regression.py ........
astropy/coordinates/tests/test_representation.py ...............................................................................
astropy/coordinates/tests/test_sites.py .......
astropy/coordinates/tests/test_sky_coord.py .........................................................................................................................................................................................................................................................................................................................................................................................x....................
astropy/coordinates/tests/test_skyoffset_transformations.py .......................
astropy/coordinates/tests/test_solar_system.py ...................
astropy/coordinates/tests/test_transformations.py ......
astropy/coordinates/tests/test_unit_representation.py .
astropy/coordinates/tests/accuracy/test_altaz_icrs.py ...x
astropy/coordinates/tests/accuracy/test_ecliptic.py .....
astropy/coordinates/tests/accuracy/test_fk4_no_e_fk4.py .
astropy/coordinates/tests/accuracy/test_fk4_no_e_fk5.py .
astropy/coordinates/tests/accuracy/test_galactic_fk4.py .
astropy/coordinates/tests/accuracy/test_icrs_fk5.py .
astropy/cosmology/tests/test_cosmology.py .......................................
astropy/cosmology/tests/test_pickle.py ...
astropy/io/ascii/core.py .
astropy/io/ascii/daophot.py .
astropy/io/ascii/ipac.py .
astropy/io/ascii/tests/test_c_reader.py ...........................x..................x.......x.x.................
astropy/io/ascii/tests/test_cds_header_from_readme.py ....
astropy/io/ascii/tests/test_compressed.py .......
astropy/io/ascii/tests/test_connect.py ........................
astropy/io/ascii/tests/test_ecsv.py ........
astropy/io/ascii/tests/test_fixedwidth.py ...............................
astropy/io/ascii/tests/test_html.py ........s..........
astropy/io/ascii/tests/test_ipac_definitions.py ....................
astropy/io/ascii/tests/test_read.py ............................................................................................................s.
astropy/io/ascii/tests/test_rst.py .........
astropy/io/ascii/tests/test_types.py ...
astropy/io/ascii/tests/test_write.py ..................................................
astropy/io/fits/diff.py .
astropy/io/fits/util.py ...
astropy/io/fits/tests/test_checksum.py .....................
astropy/io/fits/tests/test_connect.py ...........................
astropy/io/fits/tests/test_convenience.py ...
astropy/io/fits/tests/test_core.py ..................................................ss..........
astropy/io/fits/tests/test_diff.py ...................................
astropy/io/fits/tests/test_division.py .....
astropy/io/fits/tests/test_groups.py ........
astropy/io/fits/tests/test_hdulist.py .........................................
astropy/io/fits/tests/test_header.py ..................................................................................................................................................
astropy/io/fits/tests/test_image.py ........................................................
astropy/io/fits/tests/test_nonstandard.py ...
astropy/io/fits/tests/test_structured.py .
astropy/io/fits/tests/test_table.py .........................................................s.................
astropy/io/fits/tests/test_uint.py ........
astropy/io/fits/tests/test_util.py .
astropy/io/misc/tests/test_hdf5.py .........................................
astropy/io/misc/tests/test_pickle_helpers.py ....
astropy/io/tests/test_registry.py ...............................
astropy/io/votable/tests/converter_test.py .......................
astropy/io/votable/tests/exception_test.py ..
astropy/io/votable/tests/table_test.py .........
astropy/io/votable/tests/tree_test.py ...
astropy/io/votable/tests/ucd_test.py .....
astropy/io/votable/tests/util_test.py ...........
astropy/io/votable/tests/vo_test.py ...........................................................................................................................................................................
astropy/modeling/core.py ..s..
astropy/modeling/functional_models.py .
astropy/modeling/mappings.py ..
astropy/modeling/parameters.py .
astropy/modeling/utils.py ..
astropy/modeling/tests/test_compound.py ................................................s
astropy/modeling/tests/test_constraints.py .....................
astropy/modeling/tests/test_core.py ............
astropy/modeling/tests/test_fitters.py .....................
astropy/modeling/tests/test_functional_models.py ............
astropy/modeling/tests/test_input.py ......................................................
astropy/modeling/tests/test_mappings.py ......
astropy/modeling/tests/test_models.py ....................................s..ssssssss.ssss................s.......s..s.s........................ss.ss.ss..............s.ssssssss.....
astropy/modeling/tests/test_parameters.py .....................................................
astropy/modeling/tests/test_polynomial.py ............................s.........
astropy/modeling/tests/test_projections.py .......................................................................................
astropy/modeling/tests/test_rotations.py ...................
astropy/modeling/tests/test_utils.py ...
astropy/nddata/nddata.py .
astropy/nddata/nddata_withmixins.py .
astropy/nddata/nduncertainty.py .
astropy/nddata/utils.py ......
astropy/nddata/mixins/ndarithmetic.py .
astropy/nddata/mixins/ndslicing.py .
astropy/nddata/mixins/tests/test_ndarithmetic.py ..................................................................................................
astropy/nddata/mixins/tests/test_ndio.py .
astropy/nddata/mixins/tests/test_ndslicing.py ...........
astropy/nddata/tests/test_compat.py .................
astropy/nddata/tests/test_decorators.py ..........
astropy/nddata/tests/test_flag_collection.py ..........
astropy/nddata/tests/test_nddata.py ....................................
astropy/nddata/tests/test_nddata_base.py .
astropy/nddata/tests/test_nduncertainty.py ....................
astropy/nddata/tests/test_utils.py ..........................sssssssssssss..............
astropy/stats/bayesian_blocks.py .
astropy/stats/circstats.py ......
astropy/stats/funcs.py .....
astropy/stats/info_theory.py ....
astropy/stats/sigma_clipping.py ..
astropy/stats/lombscargle/core.py .
astropy/stats/lombscargle/implementations/utils.py .
astropy/stats/lombscargle/implementations/tests/test_mle.py ........................
astropy/stats/lombscargle/implementations/tests/test_utils.py .............................................
astropy/stats/lombscargle/tests/test_lombscargle.py ...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
astropy/stats/tests/test_bayesian_blocks.py .......
astropy/stats/tests/test_circstats.py .........
astropy/stats/tests/test_funcs.py .........................................s
astropy/stats/tests/test_histogram.py .........
astropy/stats/tests/test_info_theory.py ....
astropy/stats/tests/test_jackknife.py ...
astropy/stats/tests/test_sigma_clipping.py .....
astropy/table/info.py ..
astropy/table/meta.py s.
astropy/table/np_utils.py ..
astropy/table/operations.py ...
astropy/table/row.py .
astropy/table/table.py ..............
astropy/table/table_helpers.py .
astropy/table/tests/test_array.py ...
astropy/table/tests/test_bst.py .......
astropy/table/tests/test_column.py .....................................................................................
astropy/table/tests/test_groups.py ......................................
astropy/table/tests/test_index.py ................................................................................................................................................................................................................................................................................................................................................................................................................................................
astropy/table/tests/test_info.py ............
astropy/table/tests/test_init_table.py ...................................................................................................................................................
astropy/table/tests/test_item_access.py ..............................
astropy/table/tests/test_jsviewer.py ...s
astropy/table/tests/test_masked.py ..................................
astropy/table/tests/test_mixin.py ..............................................................x....
astropy/table/tests/test_np_utils.py .
astropy/table/tests/test_operations.py ......................................
astropy/table/tests/test_pickle.py ...............
astropy/table/tests/test_pprint.py ........................................................
astropy/table/tests/test_row.py ..................................
astropy/table/tests/test_subclass.py ..
astropy/table/tests/test_table.py ...................................................................................................................................................................................................................................................................................................x..............................................
astropy/tests/test_logger.py ............s................
astropy/tests/tests/test_imports.py ..
astropy/tests/tests/test_open_file_detection.py .
astropy/tests/tests/test_quantity_helpers.py .
astropy/tests/tests/test_run_tests.py ....
astropy/tests/tests/test_skip_remote_data.py .
astropy/tests/tests/test_socketblocker.py ....
astropy/time/core.py ....
astropy/time/formats.py ..
astropy/time/tests/test_basic.py ...........................................F............
astropy/time/tests/test_comparisons.py ...
astropy/time/tests/test_corrs.py ...
astropy/time/tests/test_delta.py .................................................................................
astropy/time/tests/test_guess.py ....
astropy/time/tests/test_methods.py ...............................................
astropy/time/tests/test_pickle.py .
astropy/time/tests/test_precision.py .......x..
astropy/time/tests/test_quantity_interaction.py ...............
astropy/time/tests/test_sidereal.py ...................
astropy/time/tests/test_ut1.py F..sF
astropy/units/cds.py .
astropy/units/core.py ....
astropy/units/equivalencies.py ....
astropy/units/imperial.py .
astropy/units/format/console.py .
astropy/units/format/unicode_format.py .
astropy/units/function/logarithmic.py .
astropy/units/tests/test_equivalencies.py .......................................................
astropy/units/tests/test_format.py .........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
astropy/units/tests/test_logarithmic.py ................................................................................................................................................................................
astropy/units/tests/test_physical.py ...........
astropy/units/tests/test_quantity.py ........................................................................
astropy/units/tests/test_quantity_array_methods.py ..........................................x...............
astropy/units/tests/test_quantity_decorator.py ............................
astropy/units/tests/test_quantity_non_ufuncs.py xx
astropy/units/tests/test_quantity_ufuncs.py ...........................................................................................................................................................
astropy/units/tests/test_units.py .................................................................................................................................................................................................................................................
astropy/utils/data.py ....
astropy/utils/data_info.py ..
astropy/utils/decorators.py ....
astropy/utils/introspection.py ...
astropy/utils/metadata.py ..
astropy/utils/misc.py ...
astropy/utils/timer.py .
astropy/utils/iers/tests/test_iers.py ....s.
astropy/utils/tests/test_argparse.py .
astropy/utils/tests/test_codegen.py .
astropy/utils/tests/test_collections.py .....
astropy/utils/tests/test_console.py .......s....................
astropy/utils/tests/test_data.py ...........................
astropy/utils/tests/test_data_info.py .............
astropy/utils/tests/test_decorators.py ........s..........
astropy/utils/tests/test_fractions.py .
astropy/utils/tests/test_gzip.py .
astropy/utils/tests/test_introspection.py ....
astropy/utils/tests/test_metadata.py .................
astropy/utils/tests/test_misc.py .....s
astropy/utils/tests/test_odict.py .
astropy/utils/tests/test_subprocess.py .
astropy/utils/tests/test_timer.py .
astropy/utils/tests/test_xml.py ........s.
astropy/utils/xml/writer.py s
astropy/visualization/scripts/tests/test_fits2bitmap.py ......
astropy/visualization/tests/test_histogram.py ...
astropy/visualization/tests/test_interval.py ..................
astropy/visualization/tests/test_norm.py s......
astropy/visualization/tests/test_stretch.py ...................................................................................................
astropy/visualization/tests/test_ui.py ......
astropy/visualization/tests/test_units.py ..
astropy/vo/client/tests/test_conesearch.py .................x.
astropy/vo/client/tests/test_vos_catalog.py ...............
astropy/vo/samp/tests/test_client.py ....
astropy/vo/samp/tests/test_errors.py ...
astropy/vo/samp/tests/test_hub.py ...
astropy/vo/samp/tests/test_hub_proxy.py .....
astropy/vo/samp/tests/test_hub_script.py .
astropy/vo/samp/tests/test_standard_profile.py ...
astropy/vo/samp/tests/test_web_profile.py ..
astropy/vo/validator/tests/test_inpect.py ....
astropy/vo/validator/tests/test_validate.py ....
astropy/wcs/tests/test_pickle.py ......
astropy/wcs/tests/test_profiling.py ..................................
astropy/wcs/tests/test_utils.py .........................................
astropy/wcs/tests/test_wcs.py ...............................................................................
astropy/wcs/tests/test_wcsprm.py ...............................................................................................................
astropy/wcs/tests/extension/test_extension.py .
../docs/changelog.rst .
../docs/credits.rst .
../docs/getting_started.rst .
../docs/index.rst .
../docs/install.rst .
../docs/known_issues.rst .
../docs/license.rst .
../docs/logging.rst .
../docs/overview.rst .
../docs/stability.rst .
../docs/testhelpers.rst .
../docs/warnings.rst .
../docs/analytic_functions/index.rst .
../docs/config/config_0_4_transition.rst .
../docs/config/index.rst .
../docs/constants/index.rst .
../docs/convolution/index.rst .
../docs/convolution/kernels.rst .
../docs/convolution/using.rst .
../docs/coordinates/angles.rst .
../docs/coordinates/definitions.rst .
../docs/coordinates/formatting.rst .
../docs/coordinates/frames.rst .
../docs/coordinates/galactocentric.rst .
../docs/coordinates/index.rst .
../docs/coordinates/matchsep.rst .
../docs/coordinates/remote_methods.rst .
../docs/coordinates/representations.rst .
../docs/coordinates/skycoord.rst .
../docs/coordinates/solarsystem.rst .
../docs/coordinates/transforming.rst .
../docs/cosmology/index.rst .
../docs/development/affiliated-packages.rst .
../docs/development/building.rst .
../docs/development/ccython.rst .
../docs/development/codeguide.rst .
../docs/development/codeguide_emacs.rst .
../docs/development/docguide.rst .
../docs/development/docrules.rst .
../docs/development/releasing.rst .
../docs/development/scripts.rst .
../docs/development/testguide.rst .
../docs/development/vision.rst .
../docs/development/workflow/additional_git_topics.rst .
../docs/development/workflow/command_history.rst .
../docs/development/workflow/development_workflow.rst .
../docs/development/workflow/get_devel_version.rst .
../docs/development/workflow/git_edit_workflow_examples.rst .
../docs/development/workflow/git_install.rst .
../docs/development/workflow/git_resources.rst .
../docs/development/workflow/maintainer_workflow.rst .
../docs/development/workflow/patches.rst .
../docs/development/workflow/terminal_cast.rst .
../docs/development/workflow/virtual_pythons.rst .
../docs/development/workflow/virtualenv_detail.rst .
../docs/io/misc.rst .
../docs/io/registry.rst .
../docs/io/unified.rst .
../docs/io/ascii/base_classes.rst .
../docs/io/ascii/extension_classes.rst .
../docs/io/ascii/fast_ascii_io.rst .
../docs/io/ascii/fixed_width_gallery.rst .
../docs/io/ascii/index.rst .
../docs/io/ascii/read.rst .
../docs/io/ascii/write.rst .
../docs/io/fits/index.rst .
../docs/io/fits/appendix/faq.rst .
../docs/io/fits/appendix/header_transition.rst .
../docs/io/fits/appendix/history.rst .
../docs/io/fits/usage/headers.rst .
../docs/io/fits/usage/image.rst .
../docs/io/fits/usage/misc.rst .
../docs/io/fits/usage/scripts.rst .
../docs/io/fits/usage/table.rst .
../docs/io/fits/usage/unfamiliar.rst .
../docs/io/fits/usage/verification.rst .
../docs/io/votable/api_exceptions.rst .
../docs/io/votable/index.rst .
../docs/modeling/algorithms.rst .
../docs/modeling/bounding-boxes.rst .
../docs/modeling/compound-models.rst .
../docs/modeling/fitting.rst .
../docs/modeling/index.rst .
../docs/modeling/models.rst .
../docs/modeling/new.rst .
../docs/modeling/parameters.rst .
../docs/nddata/decorator.rst .
../docs/nddata/index.rst .
../docs/nddata/nddata.rst .
../docs/nddata/subclassing.rst .
../docs/nddata/utils.rst .
../docs/nddata/mixins/index.rst .
../docs/nddata/mixins/ndarithmetic.rst .
../docs/nddata/mixins/ndio.rst .
../docs/nddata/mixins/ndslicing.rst .
../docs/stats/index.rst .
../docs/stats/lombscargle.rst .
../docs/table/access_table.rst .
../docs/table/construct_table.rst .
../docs/table/implementation_change_1.0.rst .
../docs/table/implementation_details.rst .
../docs/table/index.rst .
../docs/table/indexing.rst .
../docs/table/io.rst .
../docs/table/masking.rst .
../docs/table/mixin_columns.rst .
../docs/table/modify_table.rst .
../docs/table/operations.rst .
../docs/table/pandas.rst .
../docs/time/index.rst .
../docs/units/combining_and_defining.rst .
../docs/units/conversion.rst .
../docs/units/decomposing_and_composing.rst .
../docs/units/equivalencies.rst .
../docs/units/format.rst .
../docs/units/index.rst .
../docs/units/logarithmic_units.rst .
../docs/units/quantity.rst .
../docs/units/standard_units.rst .
../docs/utils/iers.rst .
../docs/utils/index.rst .
../docs/utils/numpy.rst .
../docs/visualization/histogram.rst .
../docs/visualization/index.rst .
../docs/visualization/normalization.rst .
../docs/vo/index.rst .
../docs/vo/conesearch/client.rst .
../docs/vo/conesearch/index.rst .
../docs/vo/conesearch/validator.rst .
../docs/vo/samp/advanced_embed_samp_hub.rst .
../docs/vo/samp/example_clients.rst .
../docs/vo/samp/example_hub.rst .
../docs/vo/samp/example_table_image.rst .
../docs/vo/samp/index.rst .
../docs/wcs/history.rst .
../docs/wcs/index.rst .
../docs/wcs/relax.rst .
../docs/whatsnew/0.1.rst .
../docs/whatsnew/0.2.rst .
../docs/whatsnew/0.3.rst .
../docs/whatsnew/0.4.rst .
../docs/whatsnew/1.0.rst .
../docs/whatsnew/1.1.rst .
../docs/whatsnew/1.2.rst .
../docs/whatsnew/index.rst .
=================================== FAILURES ===================================
____________________________ test_scale_conversion _____________________________
def test_scale_conversion():
if INTERNET_OFF:
# 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.
with pytest.raises(ScaleValueError):
Time(Time.now().cxcsec, format='cxcsec', scale='ut1')
else:
> Time(Time.now().cxcsec, format='cxcsec', scale='ut1')
astropy/time/tests/test_basic.py:907:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
astropy/time/core.py:213: in __init__
precision, in_subfmt, out_subfmt)
astropy/time/core.py:263: in _init_from_vals
precision, in_subfmt, out_subfmt)
astropy/time/core.py:301: in _get_time_fmt
return FormatClass(val, val2, scale, precision, in_subfmt, out_subfmt)
astropy/time/formats.py:337: in __init__
in_subfmt, out_subfmt, from_jd)
astropy/time/formats.py:131: in __init__
self.set_jds(val1, val2)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <astropy.time.formats.TimeCxcSec object at 0x7f7aee5810f0>
val1 = array(582368654.884263), val2 = array(0.0)
def set_jds(self, val1, val2):
"""
Initialize the internal jd1 and jd2 attributes given val1 and val2.
For an TimeFromEpoch subclass like TimeUnix these will be floats giving
the effective seconds since an epoch time (e.g. 1970-01-01 00:00:00).
"""
# Form new JDs based on epoch time + time from epoch (converted to JD).
# One subtlety that might not be obvious is that 1.000 Julian days in
# UTC can be 86400 or 86401 seconds. For the TimeUnix format the
# assumption is that every day is exactly 86400 seconds, so this is, in
# principle, doing the math incorrectly, *except* that it matches the
# definition of Unix time which does not include leap seconds.
# note: use divisor=1./self.unit, since this is either 1 or 1/86400,
# and 1/86400 is not exactly representable as a float64, so multiplying
# by that will cause rounding errors. (But inverting it as a float64
# recovers the exact number)
day, frac = day_frac(val1, val2, divisor=1. / self.unit)
jd1 = self.epoch.jd1 + day
jd2 = self.epoch.jd2 + frac
# Create a temporary Time object corresponding to the new (jd1, jd2) in
# the epoch scale (e.g. UTC for TimeUnix) then convert that to the
# desired time scale for this object.
#
# A known limitation is that the transform from self.epoch_scale to
# self.scale cannot involve any metadata like lat or lon.
try:
tm = getattr(Time(jd1, jd2, scale=self.epoch_scale,
format='jd'), self.scale)
except Exception as err:
raise ScaleValueError("Cannot convert from '{0}' epoch scale '{1}'"
"to specified scale '{2}', got error:\n{3}"
.format(self.name, self.epoch_scale,
> self.scale, err))
E astropy.time.core.ScaleValueError: Cannot convert from 'cxcsec' epoch scale 'tt'to specified scale 'ut1', got error:
E (some) times are outside of range covered by IERS table.
astropy/time/formats.py:374: ScaleValueError
_________________________ TestTimeUT1.test_utc_to_ut1 __________________________
self = <astropy.time.tests.test_ut1.TestTimeUT1 object at 0x7f7aee53dda0>
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_2000A e_dY_2000A
d ...3.0 ... 6.1e-06 1.95e-05 2.9e-05 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 astropy.utils.iers.iers.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 object at 0x7f7aee56b208>
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
======= 3 failed, 8511 passed, 67 skipped, 37 xfailed in 2456.39 seconds =======
ERROR: InvocationError: '/home/simon/lib/astropy/.tox/py35-all/bin/python setup.py test --remote-data'
___________________________________ summary ____________________________________
ERROR: py35-all: commands failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment