User Tools

Site Tools


reports:a6d3e51

Test executed on commit a6d3e512fff14ce78691a7c53269f91d2be11d52

Test Report

Report generated on 01-Aug-2016 at 22:46:10

Environment

Platform Linux-3.16.0-70-generic-x86_64-with-debian-jessie-sid
Python 2.7.11

Summary

4 tests ran in 296.99 seconds.
0 passed, 21 skipped, 4 failed, 2 errors.
0 expected failures, 0 unexpected passes.

Results

Result Test Duration Links
Skipped lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_j_estimators[/tmp/tardis-test-h5gXhH/lib.linux-x86_64-2.7/tardis/tests/integration_tests/w7]::setup 0.00
('lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py', 74, u'Skipped: Introduction of HDF mechanism.')
Skipped lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_j_blue_estimators[/tmp/tardis-test-h5gXhH/lib.linux-x86_64-2.7/tardis/tests/integration_tests/w7]::setup 0.00
('lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py', 80, u'Skipped: Introduction of HDF mechanism.')
Skipped lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_last_line_interactions[/tmp/tardis-test-h5gXhH/lib.linux-x86_64-2.7/tardis/tests/integration_tests/w7]::setup 0.00
('lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py', 90, u'Skipped: Introduction of HDF mechanism.')
Skipped lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_nubar_estimators[/tmp/tardis-test-h5gXhH/lib.linux-x86_64-2.7/tardis/tests/integration_tests/w7]::setup 0.00
('lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py', 108, u'Skipped: Introduction of HDF mechanism.')
Skipped lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_ws[/tmp/tardis-test-h5gXhH/lib.linux-x86_64-2.7/tardis/tests/integration_tests/w7]::setup 0.00
('lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py', 114, u'Skipped: Introduction of HDF mechanism.')
Skipped lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_luminosity_inner[/tmp/tardis-test-h5gXhH/lib.linux-x86_64-2.7/tardis/tests/integration_tests/w7]::setup 0.00
('lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py', 120, u'Skipped: Introduction of HDF mechanism.')
Failed lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_spectrum[/tmp/tardis-test-h5gXhH/lib.linux-x86_64-2.7/tardis/tests/integration_tests/w7] 2.35
self = <tardis.tests.integration_tests.test_integration.TestIntegration object at 0x7f57f9efa950>
plot_object = <tardis.tests.integration_tests.plot_helpers.PlotUploader object at 0x7f57f8944490>

def test_spectrum(self, plot_object):
plot_object.add(self.plot_spectrum(), "{0}_spectrum".format(self.name))

assert_allclose(
self.reference['/simulation/runner/spectrum/luminosity_density_nu'],
> self.result.runner.spectrum.luminosity_density_nu.cgs.value)

tardis/tests/integration_tests/test_integration.py:132:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/darth_sidious/anaconda2/envs/tardis/lib/python2.7/site-packages/numpy/testing/utils.py:1347: in assert_allclose
verbose=verbose, header=header)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

comparison = <function compare at 0x7f57f6c292a8>, x = array([ 0., 0., 0., ..., 0., 0., 0.]), y = array([ 0., 0., 0., ..., 0., 0., 0.])
err_msg = '', verbose = True, header = 'Not equal to tolerance rtol=1e-07, atol=0', precision = 6

def assert_array_compare(comparison, x, y, err_msg='', verbose=True,
header='', precision=6):
from numpy.core import array, isnan, isinf, any, all, inf
x = array(x, copy=False, subok=True)
y = array(y, copy=False, subok=True)

def safe_comparison(*args, **kwargs):
# There are a number of cases where comparing two arrays hits special
# cases in array_richcompare, specifically around strings and void
# dtypes. Basically, we just can't do comparisons involving these
# types, unless both arrays have exactly the *same* type. So
# e.g. you can apply == to two string arrays, or two arrays with
# identical structured dtypes. But if you compare a non-string array
# to a string array, or two arrays with non-identical structured
# dtypes, or anything like that, then internally stuff blows up.
# Currently, when things blow up, we just return a scalar False or
# True. But we also emit a DeprecationWarning, b/c eventually we
# should raise an error here. (Ideally we might even make this work
# properly, but since that will require rewriting a bunch of how
# ufuncs work then we are not counting on that.)
#
# The point of this little function is to let the DeprecationWarning
# pass (or maybe eventually catch the errors and return False, I
# dunno, that's a little trickier and we can figure that out when the
# time comes).
with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=DeprecationWarning)
return comparison(*args, **kwargs)

def isnumber(x):
return x.dtype.char in '?bhilqpBHILQPefdgFDG'

def chk_same_position(x_id, y_id, hasval='nan'):
"""Handling nan/inf: check that x and y have the nan/inf at the same
locations."""
try:
assert_array_equal(x_id, y_id)
except AssertionError:
msg = build_err_msg([x, y],
err_msg + '\nx and y %s location mismatch:'
% (hasval), verbose=verbose, header=header,
names=('x', 'y'), precision=precision)
raise AssertionError(msg)

try:
cond = (x.shape == () or y.shape == ()) or x.shape == y.shape
if not cond:
msg = build_err_msg([x, y],
err_msg
+ '\n(shapes %s, %s mismatch)' % (x.shape,
y.shape),
verbose=verbose, header=header,
names=('x', 'y'), precision=precision)
if not cond:
raise AssertionError(msg)

if isnumber(x) and isnumber(y):
x_isnan, y_isnan = isnan(x), isnan(y)
x_isinf, y_isinf = isinf(x), isinf(y)

# Validate that the special values are in the same place
if any(x_isnan) or any(y_isnan):
chk_same_position(x_isnan, y_isnan, hasval='nan')
if any(x_isinf) or any(y_isinf):
# Check +inf and -inf separately, since they are different
chk_same_position(x == +inf, y == +inf, hasval='+inf')
chk_same_position(x == -inf, y == -inf, hasval='-inf')

# Combine all the special values
x_id, y_id = x_isnan, y_isnan
x_id |= x_isinf
y_id |= y_isinf

# Only do the comparison if actual values are left
if all(x_id):
return

if any(x_id):
val = safe_comparison(x[~x_id], y[~y_id])
else:
val = safe_comparison(x, y)
else:
val = safe_comparison(x, y)

if isinstance(val, bool):
cond = val
reduced = [0]
else:
reduced = val.ravel()
cond = reduced.all()
reduced = reduced.tolist()
if not cond:
match = 100-100.0*reduced.count(1)/len(reduced)
msg = build_err_msg([x, y],
err_msg
+ '\n(mismatch %s%%)' % (match,),
verbose=verbose, header=header,
names=('x', 'y'), precision=precision)
if not cond:
> raise AssertionError(msg)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0
E
E (mismatch 8.8%)
E x: array([ 0., 0., 0., ..., 0., 0., 0.])
E y: array([ 0., 0., 0., ..., 0., 0., 0.])

/home/darth_sidious/anaconda2/envs/tardis/lib/python2.7/site-packages/numpy/testing/utils.py:708: AssertionError
Skipped lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_montecarlo_properties[/tmp/tardis-test-h5gXhH/lib.linux-x86_64-2.7/tardis/tests/integration_tests/w7]::setup 0.00
('lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py', 162, u'Skipped: Introduction of HDF mechanism.')
Failed lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_shell_temperature[/tmp/tardis-test-h5gXhH/lib.linux-x86_64-2.7/tardis/tests/integration_tests/w7] 0.64
self = <tardis.tests.integration_tests.test_integration.TestIntegration object at 0x7f57f6c03fd0>
plot_object = <tardis.tests.integration_tests.plot_helpers.PlotUploader object at 0x7f57f6c120d0>

def test_shell_temperature(self, plot_object):
plot_object.add(self.plot_t_rads(), "{0}_t_rads".format(self.name))

assert_allclose(
self.reference['/simulation/model/t_rads'],
> self.result.t_rads.cgs.value)

tardis/tests/integration_tests/test_integration.py:182:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/darth_sidious/anaconda2/envs/tardis/lib/python2.7/site-packages/numpy/testing/utils.py:1347: in assert_allclose
verbose=verbose, header=header)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

comparison = <function compare at 0x7f57f681ca28>
x = array([ 10874.63742491, 9894.85118496, 9491.41162537, 9284.75230772,
...34, 8396.08492262,
8375.12522566, 8362.62278485, 8349.43327659])
y = array([ 10878.2281496 , 10092.81949985, 9446.93616056, 9160.19720402,
...87, 8793.20544168,
9003.98832521, 8744.56859677, 8694.78355953])
err_msg = '', verbose = True, header = 'Not equal to tolerance rtol=1e-07, atol=0', precision = 6

def assert_array_compare(comparison, x, y, err_msg='', verbose=True,
header='', precision=6):
from numpy.core import array, isnan, isinf, any, all, inf
x = array(x, copy=False, subok=True)
y = array(y, copy=False, subok=True)

def safe_comparison(*args, **kwargs):
# There are a number of cases where comparing two arrays hits special
# cases in array_richcompare, specifically around strings and void
# dtypes. Basically, we just can't do comparisons involving these
# types, unless both arrays have exactly the *same* type. So
# e.g. you can apply == to two string arrays, or two arrays with
# identical structured dtypes. But if you compare a non-string array
# to a string array, or two arrays with non-identical structured
# dtypes, or anything like that, then internally stuff blows up.
# Currently, when things blow up, we just return a scalar False or
# True. But we also emit a DeprecationWarning, b/c eventually we
# should raise an error here. (Ideally we might even make this work
# properly, but since that will require rewriting a bunch of how
# ufuncs work then we are not counting on that.)
#
# The point of this little function is to let the DeprecationWarning
# pass (or maybe eventually catch the errors and return False, I
# dunno, that's a little trickier and we can figure that out when the
# time comes).
with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=DeprecationWarning)
return comparison(*args, **kwargs)

def isnumber(x):
return x.dtype.char in '?bhilqpBHILQPefdgFDG'

def chk_same_position(x_id, y_id, hasval='nan'):
"""Handling nan/inf: check that x and y have the nan/inf at the same
locations."""
try:
assert_array_equal(x_id, y_id)
except AssertionError:
msg = build_err_msg([x, y],
err_msg + '\nx and y %s location mismatch:'
% (hasval), verbose=verbose, header=header,
names=('x', 'y'), precision=precision)
raise AssertionError(msg)

try:
cond = (x.shape == () or y.shape == ()) or x.shape == y.shape
if not cond:
msg = build_err_msg([x, y],
err_msg
+ '\n(shapes %s, %s mismatch)' % (x.shape,
y.shape),
verbose=verbose, header=header,
names=('x', 'y'), precision=precision)
if not cond:
raise AssertionError(msg)

if isnumber(x) and isnumber(y):
x_isnan, y_isnan = isnan(x), isnan(y)
x_isinf, y_isinf = isinf(x), isinf(y)

# Validate that the special values are in the same place
if any(x_isnan) or any(y_isnan):
chk_same_position(x_isnan, y_isnan, hasval='nan')
if any(x_isinf) or any(y_isinf):
# Check +inf and -inf separately, since they are different
chk_same_position(x == +inf, y == +inf, hasval='+inf')
chk_same_position(x == -inf, y == -inf, hasval='-inf')

# Combine all the special values
x_id, y_id = x_isnan, y_isnan
x_id |= x_isinf
y_id |= y_isinf

# Only do the comparison if actual values are left
if all(x_id):
return

if any(x_id):
val = safe_comparison(x[~x_id], y[~y_id])
else:
val = safe_comparison(x, y)
else:
val = safe_comparison(x, y)

if isinstance(val, bool):
cond = val
reduced = [0]
else:
reduced = val.ravel()
cond = reduced.all()
reduced = reduced.tolist()
if not cond:
match = 100-100.0*reduced.count(1)/len(reduced)
msg = build_err_msg([x, y],
err_msg
+ '\n(mismatch %s%%)' % (match,),
verbose=verbose, header=header,
names=('x', 'y'), precision=precision)
if not cond:
> raise AssertionError(msg)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0
E
E (mismatch 100.0%)
E x: array([ 10874.637425, 9894.851185, 9491.411625, 9284.752308,
E 9185.077527, 9381.316256, 9220.272589, 8892.785237,
E 8741.205127, 8610.353237, 8616.764152, 8669.434737,...
E y: array([ 10878.22815 , 10092.8195 , 9446.936161, 9160.197204,
E 9085.873994, 8848.895275, 8726.987952, 8771.579284,
E 8925.181166, 8894.038267, 8985.506517, 8793.858646,...

/home/darth_sidious/anaconda2/envs/tardis/lib/python2.7/site-packages/numpy/testing/utils.py:708: AssertionError
Skipped lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_j_estimators[/tmp/tardis-test-h5gXhH/lib.linux-x86_64-2.7/tardis/tests/integration_tests/artis]::setup 0.00
('lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py', 74, u'Skipped: Introduction of HDF mechanism.')
Skipped lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_j_blue_estimators[/tmp/tardis-test-h5gXhH/lib.linux-x86_64-2.7/tardis/tests/integration_tests/artis]::setup 0.00
('lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py', 80, u'Skipped: Introduction of HDF mechanism.')
Skipped lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_last_line_interactions[/tmp/tardis-test-h5gXhH/lib.linux-x86_64-2.7/tardis/tests/integration_tests/artis]::setup 0.00
('lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py', 90, u'Skipped: Introduction of HDF mechanism.')
Skipped lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_nubar_estimators[/tmp/tardis-test-h5gXhH/lib.linux-x86_64-2.7/tardis/tests/integration_tests/artis]::setup 0.00
('lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py', 108, u'Skipped: Introduction of HDF mechanism.')
Skipped lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_ws[/tmp/tardis-test-h5gXhH/lib.linux-x86_64-2.7/tardis/tests/integration_tests/artis]::setup 0.00
('lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py', 114, u'Skipped: Introduction of HDF mechanism.')
Skipped lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_luminosity_inner[/tmp/tardis-test-h5gXhH/lib.linux-x86_64-2.7/tardis/tests/integration_tests/artis]::setup 0.00
('lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py', 120, u'Skipped: Introduction of HDF mechanism.')
Error lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_spectrum[/tmp/tardis-test-h5gXhH/lib.linux-x86_64-2.7/tardis/tests/integration_tests/artis]::setup 24.89
self = <class 'tardis.tests.integration_tests.test_integration.TestIntegration'>
request = <SubRequest 'setup' for <Function 'test_spectrum[/tmp/tardis-test-h5gXhH/lib.linux-x86_64-2.7/tardis/tests/integration_tests/artis]'>>
reference = <class 'pandas.io.pytables.HDFStore'>
File path: /home/darth_sidious/Documents/TARDIS/less/artis.h5
Empty
data_path = {'config_dirpath': '/tmp/tardis-test-h5gXhH/lib.linux-x86_64-2.7/tardis/tests/integration_tests/artis', 'gen_ref_dirpa.../generated/a6d3e51', 'reference_filepath': '/home/darth_sidious/Documents/TARDIS/less/artis.h5', 'setup_name': 'artis'}
atomic_data_fname = '/home/darth_sidious/Documents/TARDIS/tardis_example/kurucz_atom_chianti_many.h5'

@classmethod
@pytest.fixture(scope="class", autouse=True)
def setup(self, request, reference, data_path, atomic_data_fname):
"""
This method does initial setup of creating configuration and performing
a single run of integration test.
"""
# The last component in dirpath can be extracted as name of setup.
self.name = data_path['setup_name']

self.config_file = os.path.join(data_path['config_dirpath'], "config.yml")

# Load atom data file separately, pass it for forming tardis config.
self.atom_data = AtomData.from_hdf5(atomic_data_fname)

# Check whether the atom data file in current run and the atom data
# file used in obtaining the reference data are same.
# TODO: hard coded UUID for kurucz atom data file, generalize it later.
# kurucz_data_file_uuid1 = "5ca3035ca8b311e3bb684437e69d75d7"
# assert self.atom_data.uuid1 == kurucz_data_file_uuid1

# Create a Configuration through yaml file and atom data.
tardis_config = Configuration.from_yaml(
self.config_file, atom_data=self.atom_data)

# Check whether current run is with less packets.
if request.config.getoption("--less-packets"):
less_packets = request.config.integration_tests_config['less_packets']
tardis_config['montecarlo']['no_of_packets'] = (
less_packets['no_of_packets']
)
tardis_config['montecarlo']['last_no_of_packets'] = (
less_packets['last_no_of_packets']
)

# We now do a run with prepared config and get radial1d model.
> self.result = Radial1DModel(tardis_config)

tardis/tests/integration_tests/test_integration.py:56:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tardis/model.py:123: in __init__
v_outer=self.v_outer)
tardis/plasma/standard_plasmas.py:134: in __init__
helium_treatment=helium_treatment)
tardis/plasma/base.py:24: in __init__
self.update(**kwargs)
tardis/plasma/base.py:149: in update
self.plasma_properties_dict[module_name].update()
tardis/plasma/properties/base.py:126: in update
*self._get_input_values()))
tardis/plasma/properties/base.py:180: in calculate
raw_atomic_property, selected_atoms)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <tardis.plasma.properties.atomic.IonizationData object at 0x7f57f4db0b90>
ionization_data = ionization_energy atomic_number ion_number
atomic_...0 1.984925e-08 30 30

[464 rows x 3 columns]
selected_atoms = Int64Index([ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17... 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],
dtype='int64')

def _filter_atomic_property(self, ionization_data, selected_atoms):
ionization_data['atomic_number'] = ionization_data.index.labels[0] + 1
ionization_data['ion_number'] = ionization_data.index.labels[1] + 1
ionization_data = ionization_data[ionization_data.atomic_number.isin(
selected_atoms)]
ion_data_check = counter(ionization_data.atomic_number.values)
keys = np.array(ion_data_check.keys())
values = np.array(ion_data_check.values())
if np.alltrue(keys == values):
return ionization_data
else:
raise IncompleteAtomicData('ionization data for the ion (' +
str(keys[keys != values]) +
> str(values[keys != values]) + ')')
E IncompleteAtomicData: The current plasma calculation requires ionization data for the ion ([4][3]), which is not provided by the given atomic data

tardis/plasma/properties/atomic.py:147: IncompleteAtomicData
Skipped lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_montecarlo_properties[/tmp/tardis-test-h5gXhH/lib.linux-x86_64-2.7/tardis/tests/integration_tests/artis]::setup 0.00
('lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py', 162, u'Skipped: Introduction of HDF mechanism.')
Error lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_shell_temperature[/tmp/tardis-test-h5gXhH/lib.linux-x86_64-2.7/tardis/tests/integration_tests/artis]::setup 0.01
self = <class 'tardis.tests.integration_tests.test_integration.TestIntegration'>
request = <SubRequest 'setup' for <Function 'test_spectrum[/tmp/tardis-test-h5gXhH/lib.linux-x86_64-2.7/tardis/tests/integration_tests/artis]'>>
reference = <class 'pandas.io.pytables.HDFStore'>
File path: /home/darth_sidious/Documents/TARDIS/less/artis.h5
Empty
data_path = {'config_dirpath': '/tmp/tardis-test-h5gXhH/lib.linux-x86_64-2.7/tardis/tests/integration_tests/artis', 'gen_ref_dirpa.../generated/a6d3e51', 'reference_filepath': '/home/darth_sidious/Documents/TARDIS/less/artis.h5', 'setup_name': 'artis'}
atomic_data_fname = '/home/darth_sidious/Documents/TARDIS/tardis_example/kurucz_atom_chianti_many.h5'

@classmethod
@pytest.fixture(scope="class", autouse=True)
def setup(self, request, reference, data_path, atomic_data_fname):
"""
This method does initial setup of creating configuration and performing
a single run of integration test.
"""
# The last component in dirpath can be extracted as name of setup.
self.name = data_path['setup_name']

self.config_file = os.path.join(data_path['config_dirpath'], "config.yml")

# Load atom data file separately, pass it for forming tardis config.
self.atom_data = AtomData.from_hdf5(atomic_data_fname)

# Check whether the atom data file in current run and the atom data
# file used in obtaining the reference data are same.
# TODO: hard coded UUID for kurucz atom data file, generalize it later.
# kurucz_data_file_uuid1 = "5ca3035ca8b311e3bb684437e69d75d7"
# assert self.atom_data.uuid1 == kurucz_data_file_uuid1

# Create a Configuration through yaml file and atom data.
tardis_config = Configuration.from_yaml(
self.config_file, atom_data=self.atom_data)

# Check whether current run is with less packets.
if request.config.getoption("--less-packets"):
less_packets = request.config.integration_tests_config['less_packets']
tardis_config['montecarlo']['no_of_packets'] = (
less_packets['no_of_packets']
)
tardis_config['montecarlo']['last_no_of_packets'] = (
less_packets['last_no_of_packets']
)

# We now do a run with prepared config and get radial1d model.
> self.result = Radial1DModel(tardis_config)

tardis/tests/integration_tests/test_integration.py:56:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tardis/model.py:123: in __init__
v_outer=self.v_outer)
tardis/plasma/standard_plasmas.py:134: in __init__
helium_treatment=helium_treatment)
tardis/plasma/base.py:24: in __init__
self.update(**kwargs)
tardis/plasma/base.py:149: in update
self.plasma_properties_dict[module_name].update()
tardis/plasma/properties/base.py:126: in update
*self._get_input_values()))
tardis/plasma/properties/base.py:180: in calculate
raw_atomic_property, selected_atoms)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <tardis.plasma.properties.atomic.IonizationData object at 0x7f57f4db0b90>
ionization_data = ionization_energy atomic_number ion_number
atomic_...0 1.984925e-08 30 30

[464 rows x 3 columns]
selected_atoms = Int64Index([ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17... 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],
dtype='int64')

def _filter_atomic_property(self, ionization_data, selected_atoms):
ionization_data['atomic_number'] = ionization_data.index.labels[0] + 1
ionization_data['ion_number'] = ionization_data.index.labels[1] + 1
ionization_data = ionization_data[ionization_data.atomic_number.isin(
selected_atoms)]
ion_data_check = counter(ionization_data.atomic_number.values)
keys = np.array(ion_data_check.keys())
values = np.array(ion_data_check.values())
if np.alltrue(keys == values):
return ionization_data
else:
raise IncompleteAtomicData('ionization data for the ion (' +
str(keys[keys != values]) +
> str(values[keys != values]) + ')')
E IncompleteAtomicData: The current plasma calculation requires ionization data for the ion ([4][3]), which is not provided by the given atomic data

tardis/plasma/properties/atomic.py:147: IncompleteAtomicData
Skipped lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_j_estimators[/tmp/tardis-test-h5gXhH/lib.linux-x86_64-2.7/tardis/tests/integration_tests/at]::setup 0.00
('lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py', 74, u'Skipped: Introduction of HDF mechanism.')
Skipped lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_j_blue_estimators[/tmp/tardis-test-h5gXhH/lib.linux-x86_64-2.7/tardis/tests/integration_tests/at]::setup 0.00
('lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py', 80, u'Skipped: Introduction of HDF mechanism.')
Skipped lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_last_line_interactions[/tmp/tardis-test-h5gXhH/lib.linux-x86_64-2.7/tardis/tests/integration_tests/at]::setup 0.00
('lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py', 90, u'Skipped: Introduction of HDF mechanism.')
Skipped lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_nubar_estimators[/tmp/tardis-test-h5gXhH/lib.linux-x86_64-2.7/tardis/tests/integration_tests/at]::setup 0.00
('lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py', 108, u'Skipped: Introduction of HDF mechanism.')
Skipped lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_ws[/tmp/tardis-test-h5gXhH/lib.linux-x86_64-2.7/tardis/tests/integration_tests/at]::setup 0.00
('lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py', 114, u'Skipped: Introduction of HDF mechanism.')
Skipped lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_luminosity_inner[/tmp/tardis-test-h5gXhH/lib.linux-x86_64-2.7/tardis/tests/integration_tests/at]::setup 0.00
('lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py', 120, u'Skipped: Introduction of HDF mechanism.')
Failed lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_spectrum[/tmp/tardis-test-h5gXhH/lib.linux-x86_64-2.7/tardis/tests/integration_tests/at] 1.85
self = <tardis.tests.integration_tests.test_integration.TestIntegration object at 0x7f57f6632410>
plot_object = <tardis.tests.integration_tests.plot_helpers.PlotUploader object at 0x7f57f78a9890>

def test_spectrum(self, plot_object):
plot_object.add(self.plot_spectrum(), "{0}_spectrum".format(self.name))

assert_allclose(
self.reference['/simulation/runner/spectrum/luminosity_density_nu'],
> self.result.runner.spectrum.luminosity_density_nu.cgs.value)

tardis/tests/integration_tests/test_integration.py:132:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/darth_sidious/anaconda2/envs/tardis/lib/python2.7/site-packages/numpy/testing/utils.py:1347: in assert_allclose
verbose=verbose, header=header)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

comparison = <function compare at 0x7f57f756d9b0>, x = array([ 0., 0., 0., ..., 0., 0., 0.]), y = array([ 0., 0., 0., ..., 0., 0., 0.])
err_msg = '', verbose = True, header = 'Not equal to tolerance rtol=1e-07, atol=0', precision = 6

def assert_array_compare(comparison, x, y, err_msg='', verbose=True,
header='', precision=6):
from numpy.core import array, isnan, isinf, any, all, inf
x = array(x, copy=False, subok=True)
y = array(y, copy=False, subok=True)

def safe_comparison(*args, **kwargs):
# There are a number of cases where comparing two arrays hits special
# cases in array_richcompare, specifically around strings and void
# dtypes. Basically, we just can't do comparisons involving these
# types, unless both arrays have exactly the *same* type. So
# e.g. you can apply == to two string arrays, or two arrays with
# identical structured dtypes. But if you compare a non-string array
# to a string array, or two arrays with non-identical structured
# dtypes, or anything like that, then internally stuff blows up.
# Currently, when things blow up, we just return a scalar False or
# True. But we also emit a DeprecationWarning, b/c eventually we
# should raise an error here. (Ideally we might even make this work
# properly, but since that will require rewriting a bunch of how
# ufuncs work then we are not counting on that.)
#
# The point of this little function is to let the DeprecationWarning
# pass (or maybe eventually catch the errors and return False, I
# dunno, that's a little trickier and we can figure that out when the
# time comes).
with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=DeprecationWarning)
return comparison(*args, **kwargs)

def isnumber(x):
return x.dtype.char in '?bhilqpBHILQPefdgFDG'

def chk_same_position(x_id, y_id, hasval='nan'):
"""Handling nan/inf: check that x and y have the nan/inf at the same
locations."""
try:
assert_array_equal(x_id, y_id)
except AssertionError:
msg = build_err_msg([x, y],
err_msg + '\nx and y %s location mismatch:'
% (hasval), verbose=verbose, header=header,
names=('x', 'y'), precision=precision)
raise AssertionError(msg)

try:
cond = (x.shape == () or y.shape == ()) or x.shape == y.shape
if not cond:
msg = build_err_msg([x, y],
err_msg
+ '\n(shapes %s, %s mismatch)' % (x.shape,
y.shape),
verbose=verbose, header=header,
names=('x', 'y'), precision=precision)
if not cond:
raise AssertionError(msg)

if isnumber(x) and isnumber(y):
x_isnan, y_isnan = isnan(x), isnan(y)
x_isinf, y_isinf = isinf(x), isinf(y)

# Validate that the special values are in the same place
if any(x_isnan) or any(y_isnan):
chk_same_position(x_isnan, y_isnan, hasval='nan')
if any(x_isinf) or any(y_isinf):
# Check +inf and -inf separately, since they are different
chk_same_position(x == +inf, y == +inf, hasval='+inf')
chk_same_position(x == -inf, y == -inf, hasval='-inf')

# Combine all the special values
x_id, y_id = x_isnan, y_isnan
x_id |= x_isinf
y_id |= y_isinf

# Only do the comparison if actual values are left
if all(x_id):
return

if any(x_id):
val = safe_comparison(x[~x_id], y[~y_id])
else:
val = safe_comparison(x, y)
else:
val = safe_comparison(x, y)

if isinstance(val, bool):
cond = val
reduced = [0]
else:
reduced = val.ravel()
cond = reduced.all()
reduced = reduced.tolist()
if not cond:
match = 100-100.0*reduced.count(1)/len(reduced)
msg = build_err_msg([x, y],
err_msg
+ '\n(mismatch %s%%)' % (match,),
verbose=verbose, header=header,
names=('x', 'y'), precision=precision)
if not cond:
> raise AssertionError(msg)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0
E
E (mismatch 2.55%)
E x: array([ 0., 0., 0., ..., 0., 0., 0.])
E y: array([ 0., 0., 0., ..., 0., 0., 0.])

/home/darth_sidious/anaconda2/envs/tardis/lib/python2.7/site-packages/numpy/testing/utils.py:708: AssertionError
Skipped lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_montecarlo_properties[/tmp/tardis-test-h5gXhH/lib.linux-x86_64-2.7/tardis/tests/integration_tests/at]::setup 0.00
('lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py', 162, u'Skipped: Introduction of HDF mechanism.')
Failed lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_shell_temperature[/tmp/tardis-test-h5gXhH/lib.linux-x86_64-2.7/tardis/tests/integration_tests/at] 0.65
self = <tardis.tests.integration_tests.test_integration.TestIntegration object at 0x7f57f75acc90>
plot_object = <tardis.tests.integration_tests.plot_helpers.PlotUploader object at 0x7f57f75acd50>

def test_shell_temperature(self, plot_object):
plot_object.add(self.plot_t_rads(), "{0}_t_rads".format(self.name))

assert_allclose(
self.reference['/simulation/model/t_rads'],
> self.result.t_rads.cgs.value)

tardis/tests/integration_tests/test_integration.py:182:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/darth_sidious/anaconda2/envs/tardis/lib/python2.7/site-packages/numpy/testing/utils.py:1347: in assert_allclose
verbose=verbose, header=header)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

comparison = <function compare at 0x7f57f747a050>
x = array([ 16206.27258856, 15224.87695093, 14729.45650146, 14966.57154066,
...76,
7189.07791379, 7125.35638112, 7055.47749896, 6977.1692961 ])
y = array([ 15708.96442842, 15818.25853318, 15247.26428538, 14333.37371268,
...51,
8426.00516188, 8339.04759122, 8249.41585509, 8152.66123055])
err_msg = '', verbose = True, header = 'Not equal to tolerance rtol=1e-07, atol=0', precision = 6

def assert_array_compare(comparison, x, y, err_msg='', verbose=True,
header='', precision=6):
from numpy.core import array, isnan, isinf, any, all, inf
x = array(x, copy=False, subok=True)
y = array(y, copy=False, subok=True)

def safe_comparison(*args, **kwargs):
# There are a number of cases where comparing two arrays hits special
# cases in array_richcompare, specifically around strings and void
# dtypes. Basically, we just can't do comparisons involving these
# types, unless both arrays have exactly the *same* type. So
# e.g. you can apply == to two string arrays, or two arrays with
# identical structured dtypes. But if you compare a non-string array
# to a string array, or two arrays with non-identical structured
# dtypes, or anything like that, then internally stuff blows up.
# Currently, when things blow up, we just return a scalar False or
# True. But we also emit a DeprecationWarning, b/c eventually we
# should raise an error here. (Ideally we might even make this work
# properly, but since that will require rewriting a bunch of how
# ufuncs work then we are not counting on that.)
#
# The point of this little function is to let the DeprecationWarning
# pass (or maybe eventually catch the errors and return False, I
# dunno, that's a little trickier and we can figure that out when the
# time comes).
with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=DeprecationWarning)
return comparison(*args, **kwargs)

def isnumber(x):
return x.dtype.char in '?bhilqpBHILQPefdgFDG'

def chk_same_position(x_id, y_id, hasval='nan'):
"""Handling nan/inf: check that x and y have the nan/inf at the same
locations."""
try:
assert_array_equal(x_id, y_id)
except AssertionError:
msg = build_err_msg([x, y],
err_msg + '\nx and y %s location mismatch:'
% (hasval), verbose=verbose, header=header,
names=('x', 'y'), precision=precision)
raise AssertionError(msg)

try:
cond = (x.shape == () or y.shape == ()) or x.shape == y.shape
if not cond:
msg = build_err_msg([x, y],
err_msg
+ '\n(shapes %s, %s mismatch)' % (x.shape,
y.shape),
verbose=verbose, header=header,
names=('x', 'y'), precision=precision)
if not cond:
raise AssertionError(msg)

if isnumber(x) and isnumber(y):
x_isnan, y_isnan = isnan(x), isnan(y)
x_isinf, y_isinf = isinf(x), isinf(y)

# Validate that the special values are in the same place
if any(x_isnan) or any(y_isnan):
chk_same_position(x_isnan, y_isnan, hasval='nan')
if any(x_isinf) or any(y_isinf):
# Check +inf and -inf separately, since they are different
chk_same_position(x == +inf, y == +inf, hasval='+inf')
chk_same_position(x == -inf, y == -inf, hasval='-inf')

# Combine all the special values
x_id, y_id = x_isnan, y_isnan
x_id |= x_isinf
y_id |= y_isinf

# Only do the comparison if actual values are left
if all(x_id):
return

if any(x_id):
val = safe_comparison(x[~x_id], y[~y_id])
else:
val = safe_comparison(x, y)
else:
val = safe_comparison(x, y)

if isinstance(val, bool):
cond = val
reduced = [0]
else:
reduced = val.ravel()
cond = reduced.all()
reduced = reduced.tolist()
if not cond:
match = 100-100.0*reduced.count(1)/len(reduced)
msg = build_err_msg([x, y],
err_msg
+ '\n(mismatch %s%%)' % (match,),
verbose=verbose, header=header,
names=('x', 'y'), precision=precision)
if not cond:
> raise AssertionError(msg)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0
E
E (mismatch 100.0%)
E x: array([ 16206.272589, 15224.876951, 14729.456501, 14966.571541,
E 13701.279354, 12117.988522, 11122.777918, 9489.789537,
E 10200.442509, 10156.201072, 9968.807256, 9180.946853,...
E y: array([ 15708.964428, 15818.258533, 15247.264285, 14333.373713,
E 14104.070137, 13091.739712, 12905.991376, 12080.928714,
E 11726.654175, 11042.182639, 9375.31476 , 9483.529789,...

/home/darth_sidious/anaconda2/envs/tardis/lib/python2.7/site-packages/numpy/testing/utils.py:708: AssertionError

reports/a6d3e51.txt · Last modified: 2016/08/01 19:16 by karandesai96