This shows you the differences between two versions of the page.
reports:a6d3e51 [2016/08/01 19:08] karandesai96 created |
reports:a6d3e51 [2016/08/01 19:16] (current) karandesai96 |
||
---|---|---|---|
Line 327: | Line 327: | ||
} | } | ||
</script> | </script> | ||
- | <p>Report generated on 01-Aug-2016 at 22:38:25</p> | + | <p>Report generated on 01-Aug-2016 at 22:46:10</p> |
<h2>Environment</h2> | <h2>Environment</h2> | ||
<table id="environment"> | <table id="environment"> | ||
Line 337: | Line 337: | ||
<td>2.7.11</td></tr></table> | <td>2.7.11</td></tr></table> | ||
<h2>Summary</h2> | <h2>Summary</h2> | ||
- | <p>0 tests ran in 42.00 seconds.<br/><span class="passed">0 passed</span>, <span class="skipped">21 skipped</span>, <span class="failed">0 failed</span>, <span class="error">6 errors</span>.<br/><span class="skipped">0 expected failures</span>, <span class="failed">0 unexpected passes</span>.</p> | + | <p>4 tests ran in 296.99 seconds.<br/><span class="passed">0 passed</span>, <span class="skipped">21 skipped</span>, <span class="failed">4 failed</span>, <span class="error">2 errors</span>.<br/><span class="skipped">0 expected failures</span>, <span class="failed">0 unexpected passes</span>.</p> |
<h2>Results</h2> | <h2>Results</h2> | ||
<table id="results-table"> | <table id="results-table"> | ||
Line 350: | Line 350: | ||
<tr> | <tr> | ||
<td class="col-result">Skipped</td> | <td class="col-result">Skipped</td> | ||
- | <td class="col-name">lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_j_estimators[/tmp/tardis-test-0vYfSS/lib.linux-x86_64-2.7/tardis/tests/integration_tests/w7]::setup</td> | + | <td class="col-name">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</td> |
<td class="col-duration">0.00</td> | <td class="col-duration">0.00</td> | ||
<td class="col-links"></td></tr> | <td class="col-links"></td></tr> | ||
Line 359: | Line 359: | ||
<tr> | <tr> | ||
<td class="col-result">Skipped</td> | <td class="col-result">Skipped</td> | ||
- | <td class="col-name">lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_j_blue_estimators[/tmp/tardis-test-0vYfSS/lib.linux-x86_64-2.7/tardis/tests/integration_tests/w7]::setup</td> | + | <td class="col-name">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</td> |
<td class="col-duration">0.00</td> | <td class="col-duration">0.00</td> | ||
<td class="col-links"></td></tr> | <td class="col-links"></td></tr> | ||
Line 368: | Line 368: | ||
<tr> | <tr> | ||
<td class="col-result">Skipped</td> | <td class="col-result">Skipped</td> | ||
- | <td class="col-name">lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_last_line_interactions[/tmp/tardis-test-0vYfSS/lib.linux-x86_64-2.7/tardis/tests/integration_tests/w7]::setup</td> | + | <td class="col-name">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</td> |
<td class="col-duration">0.00</td> | <td class="col-duration">0.00</td> | ||
<td class="col-links"></td></tr> | <td class="col-links"></td></tr> | ||
Line 377: | Line 377: | ||
<tr> | <tr> | ||
<td class="col-result">Skipped</td> | <td class="col-result">Skipped</td> | ||
- | <td class="col-name">lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_nubar_estimators[/tmp/tardis-test-0vYfSS/lib.linux-x86_64-2.7/tardis/tests/integration_tests/w7]::setup</td> | + | <td class="col-name">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</td> |
<td class="col-duration">0.00</td> | <td class="col-duration">0.00</td> | ||
<td class="col-links"></td></tr> | <td class="col-links"></td></tr> | ||
Line 386: | Line 386: | ||
<tr> | <tr> | ||
<td class="col-result">Skipped</td> | <td class="col-result">Skipped</td> | ||
- | <td class="col-name">lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_ws[/tmp/tardis-test-0vYfSS/lib.linux-x86_64-2.7/tardis/tests/integration_tests/w7]::setup</td> | + | <td class="col-name">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</td> |
<td class="col-duration">0.00</td> | <td class="col-duration">0.00</td> | ||
<td class="col-links"></td></tr> | <td class="col-links"></td></tr> | ||
Line 395: | Line 395: | ||
<tr> | <tr> | ||
<td class="col-result">Skipped</td> | <td class="col-result">Skipped</td> | ||
- | <td class="col-name">lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_luminosity_inner[/tmp/tardis-test-0vYfSS/lib.linux-x86_64-2.7/tardis/tests/integration_tests/w7]::setup</td> | + | <td class="col-name">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</td> |
<td class="col-duration">0.00</td> | <td class="col-duration">0.00</td> | ||
<td class="col-links"></td></tr> | <td class="col-links"></td></tr> | ||
Line 401: | Line 401: | ||
<td class="extra" colspan="5"> | <td class="extra" colspan="5"> | ||
<div class="log" style="clear: both">('lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py', 120, u'Skipped: Introduction of HDF mechanism.')<br/></div></td></tr></tbody> | <div class="log" style="clear: both">('lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py', 120, u'Skipped: Introduction of HDF mechanism.')<br/></div></td></tr></tbody> | ||
- | <tbody class="error results-table-row"> | + | <tbody class="failed results-table-row"> |
<tr> | <tr> | ||
- | <td class="col-result">Error</td> | + | <td class="col-result">Failed</td> |
- | <td class="col-name">lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_spectrum[/tmp/tardis-test-0vYfSS/lib.linux-x86_64-2.7/tardis/tests/integration_tests/w7]::setup</td> | + | <td class="col-name">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]</td> |
- | <td class="col-duration">1.63</td> | + | <td class="col-duration">2.35</td> |
<td class="col-links"></td></tr> | <td class="col-links"></td></tr> | ||
<tr> | <tr> | ||
<td class="extra" colspan="5"> | <td class="extra" colspan="5"> | ||
- | <div class="log" style="clear: both">self = <class 'tardis.tests.integration_tests.test_integration.TestIntegration'><br/>request = <SubRequest 'setup' for <Function 'test_spectrum[/tmp/tardis-test-0vYfSS/lib.linux-x86_64-2.7/tardis/tests/integration_tests/w7]'>><br/>reference = <class 'pandas.io.pytables.HDFStore'><br/>File path: /home/darth_sidious/Documents...rtual/wavelength series (shape->[10000]) <br/>data_path = {'config_dirpath': '/tmp/tardis-test-0vYfSS/lib.linux-x86_64-2.7/tardis/tests/integration_tests/w7', 'gen_ref_dirpath'...TARDIS/generated/a6d3e51', 'reference_filepath': '/home/darth_sidious/Documents/TARDIS/less/w7.h5', 'setup_name': 'w7'}<br/>atomic_data_fname = '/home/darth_sidious/Documents/TARDIS/tardis_example/kurucz_atom_chianti_many.h5'<br/><br/> @classmethod<br/> @pytest.fixture(scope="class", autouse=True)<br/> def setup(self, request, reference, data_path, atomic_data_fname):<br/> """<br/> This method does initial setup of creating configuration and performing<br/> a single run of integration test.<br/> """<br/> # The last component in dirpath can be extracted as name of setup.<br/> self.name = data_path['setup_name']<br/> <br/> self.config_file = os.path.join(data_path['config_dirpath'], "config.yml")<br/> <br/> # Load atom data file separately, pass it for forming tardis config.<br/> self.atom_data = AtomData.from_hdf5(atomic_data_fname)<br/> <br/> # Check whether the atom data file in current run and the atom data<br/> # file used in obtaining the reference data are same.<br/> # TODO: hard coded UUID for kurucz atom data file, generalize it later.<br/> kurucz_data_file_uuid1 = "5ca3035ca8b311e3bb684437e69d75d7"<br/>> assert self.atom_data.uuid1 == kurucz_data_file_uuid1<br/><span class="error">E assert '30aad830fa0e...cc8bcc8a04795' == '5ca3035ca8b31...84437e69d75d7'</span><br/><span class="error">E - 30aad830fa0e11e2a4fcc8bcc8a04795</span><br/><span class="error">E + 5ca3035ca8b311e3bb684437e69d75d7</span><br/><br/>tardis/tests/integration_tests/test_integration.py:39: AssertionError<br/></div></td></tr></tbody> | + | <div> |
+ | <div class="image" style="float: left"> | ||
+ | <a href="#"> | ||
+ | <img src= "http://opensupernova.org/~karandesai96/integration/lib/exe/fetch.php?media=reports:a6d3e51:w7_spectrum.png" /> | ||
+ | </a> | ||
+ | </div> | ||
+ | </div> | ||
+ | <div class="log" style="clear: both">self = <tardis.tests.integration_tests.test_integration.TestIntegration object at 0x7f57f9efa950><br/>plot_object = <tardis.tests.integration_tests.plot_helpers.PlotUploader object at 0x7f57f8944490><br/><br/> def test_spectrum(self, plot_object):<br/> plot_object.add(self.plot_spectrum(), "{0}_spectrum".format(self.name))<br/> <br/> assert_allclose(<br/> self.reference['/simulation/runner/spectrum/luminosity_density_nu'],<br/>> self.result.runner.spectrum.luminosity_density_nu.cgs.value)<br/><br/>tardis/tests/integration_tests/test_integration.py:132: <br/>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ <br/>/home/darth_sidious/anaconda2/envs/tardis/lib/python2.7/site-packages/numpy/testing/utils.py:1347: in assert_allclose<br/> verbose=verbose, header=header)<br/>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ <br/><br/>comparison = <function compare at 0x7f57f6c292a8>, x = array([ 0., 0., 0., ..., 0., 0., 0.]), y = array([ 0., 0., 0., ..., 0., 0., 0.])<br/>err_msg = '', verbose = True, header = 'Not equal to tolerance rtol=1e-07, atol=0', precision = 6<br/><br/> def assert_array_compare(comparison, x, y, err_msg='', verbose=True,<br/> header='', precision=6):<br/> from numpy.core import array, isnan, isinf, any, all, inf<br/> x = array(x, copy=False, subok=True)<br/> y = array(y, copy=False, subok=True)<br/> <br/> def safe_comparison(*args, **kwargs):<br/> # There are a number of cases where comparing two arrays hits special<br/> # cases in array_richcompare, specifically around strings and void<br/> # dtypes. Basically, we just can't do comparisons involving these<br/> # types, unless both arrays have exactly the *same* type. So<br/> # e.g. you can apply == to two string arrays, or two arrays with<br/> # identical structured dtypes. But if you compare a non-string array<br/> # to a string array, or two arrays with non-identical structured<br/> # dtypes, or anything like that, then internally stuff blows up.<br/> # Currently, when things blow up, we just return a scalar False or<br/> # True. But we also emit a DeprecationWarning, b/c eventually we<br/> # should raise an error here. (Ideally we might even make this work<br/> # properly, but since that will require rewriting a bunch of how<br/> # ufuncs work then we are not counting on that.)<br/> #<br/> # The point of this little function is to let the DeprecationWarning<br/> # pass (or maybe eventually catch the errors and return False, I<br/> # dunno, that's a little trickier and we can figure that out when the<br/> # time comes).<br/> with warnings.catch_warnings():<br/> warnings.filterwarnings("ignore", category=DeprecationWarning)<br/> return comparison(*args, **kwargs)<br/> <br/> def isnumber(x):<br/> return x.dtype.char in '?bhilqpBHILQPefdgFDG'<br/> <br/> def chk_same_position(x_id, y_id, hasval='nan'):<br/> """Handling nan/inf: check that x and y have the nan/inf at the same<br/> locations."""<br/> try:<br/> assert_array_equal(x_id, y_id)<br/> except AssertionError:<br/> msg = build_err_msg([x, y],<br/> err_msg + '\nx and y %s location mismatch:'<br/> % (hasval), verbose=verbose, header=header,<br/> names=('x', 'y'), precision=precision)<br/> raise AssertionError(msg)<br/> <br/> try:<br/> cond = (x.shape == () or y.shape == ()) or x.shape == y.shape<br/> if not cond:<br/> msg = build_err_msg([x, y],<br/> err_msg<br/> + '\n(shapes %s, %s mismatch)' % (x.shape,<br/> y.shape),<br/> verbose=verbose, header=header,<br/> names=('x', 'y'), precision=precision)<br/> if not cond:<br/> raise AssertionError(msg)<br/> <br/> if isnumber(x) and isnumber(y):<br/> x_isnan, y_isnan = isnan(x), isnan(y)<br/> x_isinf, y_isinf = isinf(x), isinf(y)<br/> <br/> # Validate that the special values are in the same place<br/> if any(x_isnan) or any(y_isnan):<br/> chk_same_position(x_isnan, y_isnan, hasval='nan')<br/> if any(x_isinf) or any(y_isinf):<br/> # Check +inf and -inf separately, since they are different<br/> chk_same_position(x == +inf, y == +inf, hasval='+inf')<br/> chk_same_position(x == -inf, y == -inf, hasval='-inf')<br/> <br/> # Combine all the special values<br/> x_id, y_id = x_isnan, y_isnan<br/> x_id |= x_isinf<br/> y_id |= y_isinf<br/> <br/> # Only do the comparison if actual values are left<br/> if all(x_id):<br/> return<br/> <br/> if any(x_id):<br/> val = safe_comparison(x[~x_id], y[~y_id])<br/> else:<br/> val = safe_comparison(x, y)<br/> else:<br/> val = safe_comparison(x, y)<br/> <br/> if isinstance(val, bool):<br/> cond = val<br/> reduced = [0]<br/> else:<br/> reduced = val.ravel()<br/> cond = reduced.all()<br/> reduced = reduced.tolist()<br/> if not cond:<br/> match = 100-100.0*reduced.count(1)/len(reduced)<br/> msg = build_err_msg([x, y],<br/> err_msg<br/> + '\n(mismatch %s%%)' % (match,),<br/> verbose=verbose, header=header,<br/> names=('x', 'y'), precision=precision)<br/> if not cond:<br/>> raise AssertionError(msg)<br/><span class="error">E AssertionError: </span><br/><span class="error">E Not equal to tolerance rtol=1e-07, atol=0</span><br/><span class="error">E </span><br/><span class="error">E (mismatch 8.8%)</span><br/><span class="error">E x: array([ 0., 0., 0., ..., 0., 0., 0.])</span><br/><span class="error">E y: array([ 0., 0., 0., ..., 0., 0., 0.])</span><br/><br/>/home/darth_sidious/anaconda2/envs/tardis/lib/python2.7/site-packages/numpy/testing/utils.py:708: AssertionError<br/></div></td></tr></tbody> | ||
<tbody class="skipped results-table-row"> | <tbody class="skipped results-table-row"> | ||
<tr> | <tr> | ||
<td class="col-result">Skipped</td> | <td class="col-result">Skipped</td> | ||
- | <td class="col-name">lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_montecarlo_properties[/tmp/tardis-test-0vYfSS/lib.linux-x86_64-2.7/tardis/tests/integration_tests/w7]::setup</td> | + | <td class="col-name">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</td> |
<td class="col-duration">0.00</td> | <td class="col-duration">0.00</td> | ||
<td class="col-links"></td></tr> | <td class="col-links"></td></tr> | ||
Line 419: | Line 426: | ||
<td class="extra" colspan="5"> | <td class="extra" colspan="5"> | ||
<div class="log" style="clear: both">('lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py', 162, u'Skipped: Introduction of HDF mechanism.')<br/></div></td></tr></tbody> | <div class="log" style="clear: both">('lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py', 162, u'Skipped: Introduction of HDF mechanism.')<br/></div></td></tr></tbody> | ||
- | <tbody class="error results-table-row"> | + | <tbody class="failed results-table-row"> |
<tr> | <tr> | ||
- | <td class="col-result">Error</td> | + | <td class="col-result">Failed</td> |
- | <td class="col-name">lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_shell_temperature[/tmp/tardis-test-0vYfSS/lib.linux-x86_64-2.7/tardis/tests/integration_tests/w7]::setup</td> | + | <td class="col-name">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]</td> |
- | <td class="col-duration">0.01</td> | + | <td class="col-duration">0.64</td> |
<td class="col-links"></td></tr> | <td class="col-links"></td></tr> | ||
<tr> | <tr> | ||
<td class="extra" colspan="5"> | <td class="extra" colspan="5"> | ||
- | <div class="log" style="clear: both">self = <class 'tardis.tests.integration_tests.test_integration.TestIntegration'><br/>request = <SubRequest 'setup' for <Function 'test_spectrum[/tmp/tardis-test-0vYfSS/lib.linux-x86_64-2.7/tardis/tests/integration_tests/w7]'>><br/>reference = <class 'pandas.io.pytables.HDFStore'><br/>File path: /home/darth_sidious/Documents...rtual/wavelength series (shape->[10000]) <br/>data_path = {'config_dirpath': '/tmp/tardis-test-0vYfSS/lib.linux-x86_64-2.7/tardis/tests/integration_tests/w7', 'gen_ref_dirpath'...TARDIS/generated/a6d3e51', 'reference_filepath': '/home/darth_sidious/Documents/TARDIS/less/w7.h5', 'setup_name': 'w7'}<br/>atomic_data_fname = '/home/darth_sidious/Documents/TARDIS/tardis_example/kurucz_atom_chianti_many.h5'<br/><br/> @classmethod<br/> @pytest.fixture(scope="class", autouse=True)<br/> def setup(self, request, reference, data_path, atomic_data_fname):<br/> """<br/> This method does initial setup of creating configuration and performing<br/> a single run of integration test.<br/> """<br/> # The last component in dirpath can be extracted as name of setup.<br/> self.name = data_path['setup_name']<br/> <br/> self.config_file = os.path.join(data_path['config_dirpath'], "config.yml")<br/> <br/> # Load atom data file separately, pass it for forming tardis config.<br/> self.atom_data = AtomData.from_hdf5(atomic_data_fname)<br/> <br/> # Check whether the atom data file in current run and the atom data<br/> # file used in obtaining the reference data are same.<br/> # TODO: hard coded UUID for kurucz atom data file, generalize it later.<br/> kurucz_data_file_uuid1 = "5ca3035ca8b311e3bb684437e69d75d7"<br/>> assert self.atom_data.uuid1 == kurucz_data_file_uuid1<br/><span class="error">E assert '30aad830fa0e...cc8bcc8a04795' == '5ca3035ca8b31...84437e69d75d7'</span><br/><span class="error">E - 30aad830fa0e11e2a4fcc8bcc8a04795</span><br/><span class="error">E + 5ca3035ca8b311e3bb684437e69d75d7</span><br/><br/>tardis/tests/integration_tests/test_integration.py:39: AssertionError<br/></div></td></tr></tbody> | + | <div> |
+ | <div class="image" style="float: left"> | ||
+ | <a href="#"> | ||
+ | <img src= "http://opensupernova.org/~karandesai96/integration/lib/exe/fetch.php?media=reports:a6d3e51:w7_t_rads.png" /> | ||
+ | </a> | ||
+ | </div> | ||
+ | </div> | ||
+ | <div class="log" style="clear: both">self = <tardis.tests.integration_tests.test_integration.TestIntegration object at 0x7f57f6c03fd0><br/>plot_object = <tardis.tests.integration_tests.plot_helpers.PlotUploader object at 0x7f57f6c120d0><br/><br/> def test_shell_temperature(self, plot_object):<br/> plot_object.add(self.plot_t_rads(), "{0}_t_rads".format(self.name))<br/> <br/> assert_allclose(<br/> self.reference['/simulation/model/t_rads'],<br/>> self.result.t_rads.cgs.value)<br/><br/>tardis/tests/integration_tests/test_integration.py:182: <br/>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ <br/>/home/darth_sidious/anaconda2/envs/tardis/lib/python2.7/site-packages/numpy/testing/utils.py:1347: in assert_allclose<br/> verbose=verbose, header=header)<br/>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ <br/><br/>comparison = <function compare at 0x7f57f681ca28><br/>x = array([ 10874.63742491, 9894.85118496, 9491.41162537, 9284.75230772,<br/> ...34, 8396.08492262,<br/> 8375.12522566, 8362.62278485, 8349.43327659])<br/>y = array([ 10878.2281496 , 10092.81949985, 9446.93616056, 9160.19720402,<br/> ...87, 8793.20544168,<br/> 9003.98832521, 8744.56859677, 8694.78355953])<br/>err_msg = '', verbose = True, header = 'Not equal to tolerance rtol=1e-07, atol=0', precision = 6<br/><br/> def assert_array_compare(comparison, x, y, err_msg='', verbose=True,<br/> header='', precision=6):<br/> from numpy.core import array, isnan, isinf, any, all, inf<br/> x = array(x, copy=False, subok=True)<br/> y = array(y, copy=False, subok=True)<br/> <br/> def safe_comparison(*args, **kwargs):<br/> # There are a number of cases where comparing two arrays hits special<br/> # cases in array_richcompare, specifically around strings and void<br/> # dtypes. Basically, we just can't do comparisons involving these<br/> # types, unless both arrays have exactly the *same* type. So<br/> # e.g. you can apply == to two string arrays, or two arrays with<br/> # identical structured dtypes. But if you compare a non-string array<br/> # to a string array, or two arrays with non-identical structured<br/> # dtypes, or anything like that, then internally stuff blows up.<br/> # Currently, when things blow up, we just return a scalar False or<br/> # True. But we also emit a DeprecationWarning, b/c eventually we<br/> # should raise an error here. (Ideally we might even make this work<br/> # properly, but since that will require rewriting a bunch of how<br/> # ufuncs work then we are not counting on that.)<br/> #<br/> # The point of this little function is to let the DeprecationWarning<br/> # pass (or maybe eventually catch the errors and return False, I<br/> # dunno, that's a little trickier and we can figure that out when the<br/> # time comes).<br/> with warnings.catch_warnings():<br/> warnings.filterwarnings("ignore", category=DeprecationWarning)<br/> return comparison(*args, **kwargs)<br/> <br/> def isnumber(x):<br/> return x.dtype.char in '?bhilqpBHILQPefdgFDG'<br/> <br/> def chk_same_position(x_id, y_id, hasval='nan'):<br/> """Handling nan/inf: check that x and y have the nan/inf at the same<br/> locations."""<br/> try:<br/> assert_array_equal(x_id, y_id)<br/> except AssertionError:<br/> msg = build_err_msg([x, y],<br/> err_msg + '\nx and y %s location mismatch:'<br/> % (hasval), verbose=verbose, header=header,<br/> names=('x', 'y'), precision=precision)<br/> raise AssertionError(msg)<br/> <br/> try:<br/> cond = (x.shape == () or y.shape == ()) or x.shape == y.shape<br/> if not cond:<br/> msg = build_err_msg([x, y],<br/> err_msg<br/> + '\n(shapes %s, %s mismatch)' % (x.shape,<br/> y.shape),<br/> verbose=verbose, header=header,<br/> names=('x', 'y'), precision=precision)<br/> if not cond:<br/> raise AssertionError(msg)<br/> <br/> if isnumber(x) and isnumber(y):<br/> x_isnan, y_isnan = isnan(x), isnan(y)<br/> x_isinf, y_isinf = isinf(x), isinf(y)<br/> <br/> # Validate that the special values are in the same place<br/> if any(x_isnan) or any(y_isnan):<br/> chk_same_position(x_isnan, y_isnan, hasval='nan')<br/> if any(x_isinf) or any(y_isinf):<br/> # Check +inf and -inf separately, since they are different<br/> chk_same_position(x == +inf, y == +inf, hasval='+inf')<br/> chk_same_position(x == -inf, y == -inf, hasval='-inf')<br/> <br/> # Combine all the special values<br/> x_id, y_id = x_isnan, y_isnan<br/> x_id |= x_isinf<br/> y_id |= y_isinf<br/> <br/> # Only do the comparison if actual values are left<br/> if all(x_id):<br/> return<br/> <br/> if any(x_id):<br/> val = safe_comparison(x[~x_id], y[~y_id])<br/> else:<br/> val = safe_comparison(x, y)<br/> else:<br/> val = safe_comparison(x, y)<br/> <br/> if isinstance(val, bool):<br/> cond = val<br/> reduced = [0]<br/> else:<br/> reduced = val.ravel()<br/> cond = reduced.all()<br/> reduced = reduced.tolist()<br/> if not cond:<br/> match = 100-100.0*reduced.count(1)/len(reduced)<br/> msg = build_err_msg([x, y],<br/> err_msg<br/> + '\n(mismatch %s%%)' % (match,),<br/> verbose=verbose, header=header,<br/> names=('x', 'y'), precision=precision)<br/> if not cond:<br/>> raise AssertionError(msg)<br/><span class="error">E AssertionError: </span><br/><span class="error">E Not equal to tolerance rtol=1e-07, atol=0</span><br/><span class="error">E </span><br/><span class="error">E (mismatch 100.0%)</span><br/><span class="error">E x: array([ 10874.637425, 9894.851185, 9491.411625, 9284.752308,</span><br/><span class="error">E 9185.077527, 9381.316256, 9220.272589, 8892.785237,</span><br/><span class="error">E 8741.205127, 8610.353237, 8616.764152, 8669.434737,...</span><br/><span class="error">E y: array([ 10878.22815 , 10092.8195 , 9446.936161, 9160.197204,</span><br/><span class="error">E 9085.873994, 8848.895275, 8726.987952, 8771.579284,</span><br/><span class="error">E 8925.181166, 8894.038267, 8985.506517, 8793.858646,...</span><br/><br/>/home/darth_sidious/anaconda2/envs/tardis/lib/python2.7/site-packages/numpy/testing/utils.py:708: AssertionError<br/></div></td></tr></tbody> | ||
<tbody class="skipped results-table-row"> | <tbody class="skipped results-table-row"> | ||
<tr> | <tr> | ||
<td class="col-result">Skipped</td> | <td class="col-result">Skipped</td> | ||
- | <td class="col-name">lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_j_estimators[/tmp/tardis-test-0vYfSS/lib.linux-x86_64-2.7/tardis/tests/integration_tests/artis]::setup</td> | + | <td class="col-name">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</td> |
<td class="col-duration">0.00</td> | <td class="col-duration">0.00</td> | ||
<td class="col-links"></td></tr> | <td class="col-links"></td></tr> | ||
Line 440: | Line 454: | ||
<tr> | <tr> | ||
<td class="col-result">Skipped</td> | <td class="col-result">Skipped</td> | ||
- | <td class="col-name">lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_j_blue_estimators[/tmp/tardis-test-0vYfSS/lib.linux-x86_64-2.7/tardis/tests/integration_tests/artis]::setup</td> | + | <td class="col-name">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</td> |
<td class="col-duration">0.00</td> | <td class="col-duration">0.00</td> | ||
<td class="col-links"></td></tr> | <td class="col-links"></td></tr> | ||
Line 449: | Line 463: | ||
<tr> | <tr> | ||
<td class="col-result">Skipped</td> | <td class="col-result">Skipped</td> | ||
- | <td class="col-name">lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_last_line_interactions[/tmp/tardis-test-0vYfSS/lib.linux-x86_64-2.7/tardis/tests/integration_tests/artis]::setup</td> | + | <td class="col-name">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</td> |
<td class="col-duration">0.00</td> | <td class="col-duration">0.00</td> | ||
<td class="col-links"></td></tr> | <td class="col-links"></td></tr> | ||
Line 458: | Line 472: | ||
<tr> | <tr> | ||
<td class="col-result">Skipped</td> | <td class="col-result">Skipped</td> | ||
- | <td class="col-name">lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_nubar_estimators[/tmp/tardis-test-0vYfSS/lib.linux-x86_64-2.7/tardis/tests/integration_tests/artis]::setup</td> | + | <td class="col-name">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</td> |
<td class="col-duration">0.00</td> | <td class="col-duration">0.00</td> | ||
<td class="col-links"></td></tr> | <td class="col-links"></td></tr> | ||
Line 467: | Line 481: | ||
<tr> | <tr> | ||
<td class="col-result">Skipped</td> | <td class="col-result">Skipped</td> | ||
- | <td class="col-name">lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_ws[/tmp/tardis-test-0vYfSS/lib.linux-x86_64-2.7/tardis/tests/integration_tests/artis]::setup</td> | + | <td class="col-name">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</td> |
<td class="col-duration">0.00</td> | <td class="col-duration">0.00</td> | ||
<td class="col-links"></td></tr> | <td class="col-links"></td></tr> | ||
Line 476: | Line 490: | ||
<tr> | <tr> | ||
<td class="col-result">Skipped</td> | <td class="col-result">Skipped</td> | ||
- | <td class="col-name">lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_luminosity_inner[/tmp/tardis-test-0vYfSS/lib.linux-x86_64-2.7/tardis/tests/integration_tests/artis]::setup</td> | + | <td class="col-name">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</td> |
<td class="col-duration">0.00</td> | <td class="col-duration">0.00</td> | ||
<td class="col-links"></td></tr> | <td class="col-links"></td></tr> | ||
Line 485: | Line 499: | ||
<tr> | <tr> | ||
<td class="col-result">Error</td> | <td class="col-result">Error</td> | ||
- | <td class="col-name">lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_spectrum[/tmp/tardis-test-0vYfSS/lib.linux-x86_64-2.7/tardis/tests/integration_tests/artis]::setup</td> | + | <td class="col-name">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</td> |
- | <td class="col-duration">0.95</td> | + | <td class="col-duration">24.89</td> |
<td class="col-links"></td></tr> | <td class="col-links"></td></tr> | ||
<tr> | <tr> | ||
<td class="extra" colspan="5"> | <td class="extra" colspan="5"> | ||
- | <div class="log" style="clear: both">self = <class 'tardis.tests.integration_tests.test_integration.TestIntegration'><br/>request = <SubRequest 'setup' for <Function 'test_spectrum[/tmp/tardis-test-0vYfSS/lib.linux-x86_64-2.7/tardis/tests/integration_tests/artis]'>><br/>reference = <class 'pandas.io.pytables.HDFStore'><br/>File path: /home/darth_sidious/Documents/TARDIS/less/artis.h5<br/>Empty<br/>data_path = {'config_dirpath': '/tmp/tardis-test-0vYfSS/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'}<br/>atomic_data_fname = '/home/darth_sidious/Documents/TARDIS/tardis_example/kurucz_atom_chianti_many.h5'<br/><br/> @classmethod<br/> @pytest.fixture(scope="class", autouse=True)<br/> def setup(self, request, reference, data_path, atomic_data_fname):<br/> """<br/> This method does initial setup of creating configuration and performing<br/> a single run of integration test.<br/> """<br/> # The last component in dirpath can be extracted as name of setup.<br/> self.name = data_path['setup_name']<br/> <br/> self.config_file = os.path.join(data_path['config_dirpath'], "config.yml")<br/> <br/> # Load atom data file separately, pass it for forming tardis config.<br/> self.atom_data = AtomData.from_hdf5(atomic_data_fname)<br/> <br/> # Check whether the atom data file in current run and the atom data<br/> # file used in obtaining the reference data are same.<br/> # TODO: hard coded UUID for kurucz atom data file, generalize it later.<br/> kurucz_data_file_uuid1 = "5ca3035ca8b311e3bb684437e69d75d7"<br/>> assert self.atom_data.uuid1 == kurucz_data_file_uuid1<br/><span class="error">E assert '30aad830fa0e...cc8bcc8a04795' == '5ca3035ca8b31...84437e69d75d7'</span><br/><span class="error">E - 30aad830fa0e11e2a4fcc8bcc8a04795</span><br/><span class="error">E + 5ca3035ca8b311e3bb684437e69d75d7</span><br/><br/>tardis/tests/integration_tests/test_integration.py:39: AssertionError<br/></div></td></tr></tbody> | + | <div class="log" style="clear: both">self = <class 'tardis.tests.integration_tests.test_integration.TestIntegration'><br/>request = <SubRequest 'setup' for <Function 'test_spectrum[/tmp/tardis-test-h5gXhH/lib.linux-x86_64-2.7/tardis/tests/integration_tests/artis]'>><br/>reference = <class 'pandas.io.pytables.HDFStore'><br/>File path: /home/darth_sidious/Documents/TARDIS/less/artis.h5<br/>Empty<br/>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'}<br/>atomic_data_fname = '/home/darth_sidious/Documents/TARDIS/tardis_example/kurucz_atom_chianti_many.h5'<br/><br/> @classmethod<br/> @pytest.fixture(scope="class", autouse=True)<br/> def setup(self, request, reference, data_path, atomic_data_fname):<br/> """<br/> This method does initial setup of creating configuration and performing<br/> a single run of integration test.<br/> """<br/> # The last component in dirpath can be extracted as name of setup.<br/> self.name = data_path['setup_name']<br/> <br/> self.config_file = os.path.join(data_path['config_dirpath'], "config.yml")<br/> <br/> # Load atom data file separately, pass it for forming tardis config.<br/> self.atom_data = AtomData.from_hdf5(atomic_data_fname)<br/> <br/> # Check whether the atom data file in current run and the atom data<br/> # file used in obtaining the reference data are same.<br/> # TODO: hard coded UUID for kurucz atom data file, generalize it later.<br/> # kurucz_data_file_uuid1 = "5ca3035ca8b311e3bb684437e69d75d7"<br/> # assert self.atom_data.uuid1 == kurucz_data_file_uuid1<br/> <br/> # Create a Configuration through yaml file and atom data.<br/> tardis_config = Configuration.from_yaml(<br/> self.config_file, atom_data=self.atom_data)<br/> <br/> # Check whether current run is with less packets.<br/> if request.config.getoption("--less-packets"):<br/> less_packets = request.config.integration_tests_config['less_packets']<br/> tardis_config['montecarlo']['no_of_packets'] = (<br/> less_packets['no_of_packets']<br/> )<br/> tardis_config['montecarlo']['last_no_of_packets'] = (<br/> less_packets['last_no_of_packets']<br/> )<br/> <br/> # We now do a run with prepared config and get radial1d model.<br/>> self.result = Radial1DModel(tardis_config)<br/><br/>tardis/tests/integration_tests/test_integration.py:56: <br/>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ <br/>tardis/model.py:123: in __init__<br/> v_outer=self.v_outer)<br/>tardis/plasma/standard_plasmas.py:134: in __init__<br/> helium_treatment=helium_treatment)<br/>tardis/plasma/base.py:24: in __init__<br/> self.update(**kwargs)<br/>tardis/plasma/base.py:149: in update<br/> self.plasma_properties_dict[module_name].update()<br/>tardis/plasma/properties/base.py:126: in update<br/> *self._get_input_values()))<br/>tardis/plasma/properties/base.py:180: in calculate<br/> raw_atomic_property, selected_atoms)<br/>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ <br/><br/>self = <tardis.plasma.properties.atomic.IonizationData object at 0x7f57f4db0b90><br/>ionization_data = ionization_energy atomic_number ion_number<br/>atomic_...0 1.984925e-08 30 30<br/><br/>[464 rows x 3 columns]<br/>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],<br/> dtype='int64')<br/><br/> def _filter_atomic_property(self, ionization_data, selected_atoms):<br/> ionization_data['atomic_number'] = ionization_data.index.labels[0] + 1<br/> ionization_data['ion_number'] = ionization_data.index.labels[1] + 1<br/> ionization_data = ionization_data[ionization_data.atomic_number.isin(<br/> selected_atoms)]<br/> ion_data_check = counter(ionization_data.atomic_number.values)<br/> keys = np.array(ion_data_check.keys())<br/> values = np.array(ion_data_check.values())<br/> if np.alltrue(keys == values):<br/> return ionization_data<br/> else:<br/> raise IncompleteAtomicData('ionization data for the ion (' +<br/> str(keys[keys != values]) +<br/>> str(values[keys != values]) + ')')<br/><span class="error">E IncompleteAtomicData: The current plasma calculation requires ionization data for the ion ([4][3]), which is not provided by the given atomic data</span><br/><br/>tardis/plasma/properties/atomic.py:147: IncompleteAtomicData<br/></div></td></tr></tbody> |
<tbody class="skipped results-table-row"> | <tbody class="skipped results-table-row"> | ||
<tr> | <tr> | ||
<td class="col-result">Skipped</td> | <td class="col-result">Skipped</td> | ||
- | <td class="col-name">lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_montecarlo_properties[/tmp/tardis-test-0vYfSS/lib.linux-x86_64-2.7/tardis/tests/integration_tests/artis]::setup</td> | + | <td class="col-name">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</td> |
<td class="col-duration">0.00</td> | <td class="col-duration">0.00</td> | ||
<td class="col-links"></td></tr> | <td class="col-links"></td></tr> | ||
Line 503: | Line 517: | ||
<tr> | <tr> | ||
<td class="col-result">Error</td> | <td class="col-result">Error</td> | ||
- | <td class="col-name">lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_shell_temperature[/tmp/tardis-test-0vYfSS/lib.linux-x86_64-2.7/tardis/tests/integration_tests/artis]::setup</td> | + | <td class="col-name">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</td> |
<td class="col-duration">0.01</td> | <td class="col-duration">0.01</td> | ||
<td class="col-links"></td></tr> | <td class="col-links"></td></tr> | ||
<tr> | <tr> | ||
<td class="extra" colspan="5"> | <td class="extra" colspan="5"> | ||
- | <div class="log" style="clear: both">self = <class 'tardis.tests.integration_tests.test_integration.TestIntegration'><br/>request = <SubRequest 'setup' for <Function 'test_spectrum[/tmp/tardis-test-0vYfSS/lib.linux-x86_64-2.7/tardis/tests/integration_tests/artis]'>><br/>reference = <class 'pandas.io.pytables.HDFStore'><br/>File path: /home/darth_sidious/Documents/TARDIS/less/artis.h5<br/>Empty<br/>data_path = {'config_dirpath': '/tmp/tardis-test-0vYfSS/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'}<br/>atomic_data_fname = '/home/darth_sidious/Documents/TARDIS/tardis_example/kurucz_atom_chianti_many.h5'<br/><br/> @classmethod<br/> @pytest.fixture(scope="class", autouse=True)<br/> def setup(self, request, reference, data_path, atomic_data_fname):<br/> """<br/> This method does initial setup of creating configuration and performing<br/> a single run of integration test.<br/> """<br/> # The last component in dirpath can be extracted as name of setup.<br/> self.name = data_path['setup_name']<br/> <br/> self.config_file = os.path.join(data_path['config_dirpath'], "config.yml")<br/> <br/> # Load atom data file separately, pass it for forming tardis config.<br/> self.atom_data = AtomData.from_hdf5(atomic_data_fname)<br/> <br/> # Check whether the atom data file in current run and the atom data<br/> # file used in obtaining the reference data are same.<br/> # TODO: hard coded UUID for kurucz atom data file, generalize it later.<br/> kurucz_data_file_uuid1 = "5ca3035ca8b311e3bb684437e69d75d7"<br/>> assert self.atom_data.uuid1 == kurucz_data_file_uuid1<br/><span class="error">E assert '30aad830fa0e...cc8bcc8a04795' == '5ca3035ca8b31...84437e69d75d7'</span><br/><span class="error">E - 30aad830fa0e11e2a4fcc8bcc8a04795</span><br/><span class="error">E + 5ca3035ca8b311e3bb684437e69d75d7</span><br/><br/>tardis/tests/integration_tests/test_integration.py:39: AssertionError<br/></div></td></tr></tbody> | + | <div class="log" style="clear: both">self = <class 'tardis.tests.integration_tests.test_integration.TestIntegration'><br/>request = <SubRequest 'setup' for <Function 'test_spectrum[/tmp/tardis-test-h5gXhH/lib.linux-x86_64-2.7/tardis/tests/integration_tests/artis]'>><br/>reference = <class 'pandas.io.pytables.HDFStore'><br/>File path: /home/darth_sidious/Documents/TARDIS/less/artis.h5<br/>Empty<br/>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'}<br/>atomic_data_fname = '/home/darth_sidious/Documents/TARDIS/tardis_example/kurucz_atom_chianti_many.h5'<br/><br/> @classmethod<br/> @pytest.fixture(scope="class", autouse=True)<br/> def setup(self, request, reference, data_path, atomic_data_fname):<br/> """<br/> This method does initial setup of creating configuration and performing<br/> a single run of integration test.<br/> """<br/> # The last component in dirpath can be extracted as name of setup.<br/> self.name = data_path['setup_name']<br/> <br/> self.config_file = os.path.join(data_path['config_dirpath'], "config.yml")<br/> <br/> # Load atom data file separately, pass it for forming tardis config.<br/> self.atom_data = AtomData.from_hdf5(atomic_data_fname)<br/> <br/> # Check whether the atom data file in current run and the atom data<br/> # file used in obtaining the reference data are same.<br/> # TODO: hard coded UUID for kurucz atom data file, generalize it later.<br/> # kurucz_data_file_uuid1 = "5ca3035ca8b311e3bb684437e69d75d7"<br/> # assert self.atom_data.uuid1 == kurucz_data_file_uuid1<br/> <br/> # Create a Configuration through yaml file and atom data.<br/> tardis_config = Configuration.from_yaml(<br/> self.config_file, atom_data=self.atom_data)<br/> <br/> # Check whether current run is with less packets.<br/> if request.config.getoption("--less-packets"):<br/> less_packets = request.config.integration_tests_config['less_packets']<br/> tardis_config['montecarlo']['no_of_packets'] = (<br/> less_packets['no_of_packets']<br/> )<br/> tardis_config['montecarlo']['last_no_of_packets'] = (<br/> less_packets['last_no_of_packets']<br/> )<br/> <br/> # We now do a run with prepared config and get radial1d model.<br/>> self.result = Radial1DModel(tardis_config)<br/><br/>tardis/tests/integration_tests/test_integration.py:56: <br/>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ <br/>tardis/model.py:123: in __init__<br/> v_outer=self.v_outer)<br/>tardis/plasma/standard_plasmas.py:134: in __init__<br/> helium_treatment=helium_treatment)<br/>tardis/plasma/base.py:24: in __init__<br/> self.update(**kwargs)<br/>tardis/plasma/base.py:149: in update<br/> self.plasma_properties_dict[module_name].update()<br/>tardis/plasma/properties/base.py:126: in update<br/> *self._get_input_values()))<br/>tardis/plasma/properties/base.py:180: in calculate<br/> raw_atomic_property, selected_atoms)<br/>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ <br/><br/>self = <tardis.plasma.properties.atomic.IonizationData object at 0x7f57f4db0b90><br/>ionization_data = ionization_energy atomic_number ion_number<br/>atomic_...0 1.984925e-08 30 30<br/><br/>[464 rows x 3 columns]<br/>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],<br/> dtype='int64')<br/><br/> def _filter_atomic_property(self, ionization_data, selected_atoms):<br/> ionization_data['atomic_number'] = ionization_data.index.labels[0] + 1<br/> ionization_data['ion_number'] = ionization_data.index.labels[1] + 1<br/> ionization_data = ionization_data[ionization_data.atomic_number.isin(<br/> selected_atoms)]<br/> ion_data_check = counter(ionization_data.atomic_number.values)<br/> keys = np.array(ion_data_check.keys())<br/> values = np.array(ion_data_check.values())<br/> if np.alltrue(keys == values):<br/> return ionization_data<br/> else:<br/> raise IncompleteAtomicData('ionization data for the ion (' +<br/> str(keys[keys != values]) +<br/>> str(values[keys != values]) + ')')<br/><span class="error">E IncompleteAtomicData: The current plasma calculation requires ionization data for the ion ([4][3]), which is not provided by the given atomic data</span><br/><br/>tardis/plasma/properties/atomic.py:147: IncompleteAtomicData<br/></div></td></tr></tbody> |
<tbody class="skipped results-table-row"> | <tbody class="skipped results-table-row"> | ||
<tr> | <tr> | ||
<td class="col-result">Skipped</td> | <td class="col-result">Skipped</td> | ||
- | <td class="col-name">lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_j_estimators[/tmp/tardis-test-0vYfSS/lib.linux-x86_64-2.7/tardis/tests/integration_tests/at]::setup</td> | + | <td class="col-name">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</td> |
<td class="col-duration">0.00</td> | <td class="col-duration">0.00</td> | ||
<td class="col-links"></td></tr> | <td class="col-links"></td></tr> | ||
Line 521: | Line 535: | ||
<tr> | <tr> | ||
<td class="col-result">Skipped</td> | <td class="col-result">Skipped</td> | ||
- | <td class="col-name">lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_j_blue_estimators[/tmp/tardis-test-0vYfSS/lib.linux-x86_64-2.7/tardis/tests/integration_tests/at]::setup</td> | + | <td class="col-name">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</td> |
<td class="col-duration">0.00</td> | <td class="col-duration">0.00</td> | ||
<td class="col-links"></td></tr> | <td class="col-links"></td></tr> | ||
Line 530: | Line 544: | ||
<tr> | <tr> | ||
<td class="col-result">Skipped</td> | <td class="col-result">Skipped</td> | ||
- | <td class="col-name">lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_last_line_interactions[/tmp/tardis-test-0vYfSS/lib.linux-x86_64-2.7/tardis/tests/integration_tests/at]::setup</td> | + | <td class="col-name">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</td> |
<td class="col-duration">0.00</td> | <td class="col-duration">0.00</td> | ||
<td class="col-links"></td></tr> | <td class="col-links"></td></tr> | ||
Line 539: | Line 553: | ||
<tr> | <tr> | ||
<td class="col-result">Skipped</td> | <td class="col-result">Skipped</td> | ||
- | <td class="col-name">lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_nubar_estimators[/tmp/tardis-test-0vYfSS/lib.linux-x86_64-2.7/tardis/tests/integration_tests/at]::setup</td> | + | <td class="col-name">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</td> |
<td class="col-duration">0.00</td> | <td class="col-duration">0.00</td> | ||
<td class="col-links"></td></tr> | <td class="col-links"></td></tr> | ||
Line 548: | Line 562: | ||
<tr> | <tr> | ||
<td class="col-result">Skipped</td> | <td class="col-result">Skipped</td> | ||
- | <td class="col-name">lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_ws[/tmp/tardis-test-0vYfSS/lib.linux-x86_64-2.7/tardis/tests/integration_tests/at]::setup</td> | + | <td class="col-name">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</td> |
<td class="col-duration">0.00</td> | <td class="col-duration">0.00</td> | ||
<td class="col-links"></td></tr> | <td class="col-links"></td></tr> | ||
Line 557: | Line 571: | ||
<tr> | <tr> | ||
<td class="col-result">Skipped</td> | <td class="col-result">Skipped</td> | ||
- | <td class="col-name">lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_luminosity_inner[/tmp/tardis-test-0vYfSS/lib.linux-x86_64-2.7/tardis/tests/integration_tests/at]::setup</td> | + | <td class="col-name">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</td> |
<td class="col-duration">0.00</td> | <td class="col-duration">0.00</td> | ||
<td class="col-links"></td></tr> | <td class="col-links"></td></tr> | ||
Line 563: | Line 577: | ||
<td class="extra" colspan="5"> | <td class="extra" colspan="5"> | ||
<div class="log" style="clear: both">('lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py', 120, u'Skipped: Introduction of HDF mechanism.')<br/></div></td></tr></tbody> | <div class="log" style="clear: both">('lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py', 120, u'Skipped: Introduction of HDF mechanism.')<br/></div></td></tr></tbody> | ||
- | <tbody class="error results-table-row"> | + | <tbody class="failed results-table-row"> |
<tr> | <tr> | ||
- | <td class="col-result">Error</td> | + | <td class="col-result">Failed</td> |
- | <td class="col-name">lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_spectrum[/tmp/tardis-test-0vYfSS/lib.linux-x86_64-2.7/tardis/tests/integration_tests/at]::setup</td> | + | <td class="col-name">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]</td> |
- | <td class="col-duration">0.94</td> | + | <td class="col-duration">1.85</td> |
<td class="col-links"></td></tr> | <td class="col-links"></td></tr> | ||
<tr> | <tr> | ||
<td class="extra" colspan="5"> | <td class="extra" colspan="5"> | ||
- | <div class="log" style="clear: both">self = <class 'tardis.tests.integration_tests.test_integration.TestIntegration'><br/>request = <SubRequest 'setup' for <Function 'test_spectrum[/tmp/tardis-test-0vYfSS/lib.linux-x86_64-2.7/tardis/tests/integration_tests/at]'>><br/>reference = <class 'pandas.io.pytables.HDFStore'><br/>File path: /home/darth_sidious/Documents...rtual/wavelength series (shape->[10000]) <br/>data_path = {'config_dirpath': '/tmp/tardis-test-0vYfSS/lib.linux-x86_64-2.7/tardis/tests/integration_tests/at', 'gen_ref_dirpath'...TARDIS/generated/a6d3e51', 'reference_filepath': '/home/darth_sidious/Documents/TARDIS/less/at.h5', 'setup_name': 'at'}<br/>atomic_data_fname = '/home/darth_sidious/Documents/TARDIS/tardis_example/kurucz_atom_chianti_many.h5'<br/><br/> @classmethod<br/> @pytest.fixture(scope="class", autouse=True)<br/> def setup(self, request, reference, data_path, atomic_data_fname):<br/> """<br/> This method does initial setup of creating configuration and performing<br/> a single run of integration test.<br/> """<br/> # The last component in dirpath can be extracted as name of setup.<br/> self.name = data_path['setup_name']<br/> <br/> self.config_file = os.path.join(data_path['config_dirpath'], "config.yml")<br/> <br/> # Load atom data file separately, pass it for forming tardis config.<br/> self.atom_data = AtomData.from_hdf5(atomic_data_fname)<br/> <br/> # Check whether the atom data file in current run and the atom data<br/> # file used in obtaining the reference data are same.<br/> # TODO: hard coded UUID for kurucz atom data file, generalize it later.<br/> kurucz_data_file_uuid1 = "5ca3035ca8b311e3bb684437e69d75d7"<br/>> assert self.atom_data.uuid1 == kurucz_data_file_uuid1<br/><span class="error">E assert '30aad830fa0e...cc8bcc8a04795' == '5ca3035ca8b31...84437e69d75d7'</span><br/><span class="error">E - 30aad830fa0e11e2a4fcc8bcc8a04795</span><br/><span class="error">E + 5ca3035ca8b311e3bb684437e69d75d7</span><br/><br/>tardis/tests/integration_tests/test_integration.py:39: AssertionError<br/></div></td></tr></tbody> | + | <div> |
+ | <div class="image" style="float: left"> | ||
+ | <a href="#"> | ||
+ | <img src= "http://opensupernova.org/~karandesai96/integration/lib/exe/fetch.php?media=reports:a6d3e51:at_spectrum.png" /> | ||
+ | </a> | ||
+ | </div> | ||
+ | </div> | ||
+ | <div class="log" style="clear: both">self = <tardis.tests.integration_tests.test_integration.TestIntegration object at 0x7f57f6632410><br/>plot_object = <tardis.tests.integration_tests.plot_helpers.PlotUploader object at 0x7f57f78a9890><br/><br/> def test_spectrum(self, plot_object):<br/> plot_object.add(self.plot_spectrum(), "{0}_spectrum".format(self.name))<br/> <br/> assert_allclose(<br/> self.reference['/simulation/runner/spectrum/luminosity_density_nu'],<br/>> self.result.runner.spectrum.luminosity_density_nu.cgs.value)<br/><br/>tardis/tests/integration_tests/test_integration.py:132: <br/>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ <br/>/home/darth_sidious/anaconda2/envs/tardis/lib/python2.7/site-packages/numpy/testing/utils.py:1347: in assert_allclose<br/> verbose=verbose, header=header)<br/>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ <br/><br/>comparison = <function compare at 0x7f57f756d9b0>, x = array([ 0., 0., 0., ..., 0., 0., 0.]), y = array([ 0., 0., 0., ..., 0., 0., 0.])<br/>err_msg = '', verbose = True, header = 'Not equal to tolerance rtol=1e-07, atol=0', precision = 6<br/><br/> def assert_array_compare(comparison, x, y, err_msg='', verbose=True,<br/> header='', precision=6):<br/> from numpy.core import array, isnan, isinf, any, all, inf<br/> x = array(x, copy=False, subok=True)<br/> y = array(y, copy=False, subok=True)<br/> <br/> def safe_comparison(*args, **kwargs):<br/> # There are a number of cases where comparing two arrays hits special<br/> # cases in array_richcompare, specifically around strings and void<br/> # dtypes. Basically, we just can't do comparisons involving these<br/> # types, unless both arrays have exactly the *same* type. So<br/> # e.g. you can apply == to two string arrays, or two arrays with<br/> # identical structured dtypes. But if you compare a non-string array<br/> # to a string array, or two arrays with non-identical structured<br/> # dtypes, or anything like that, then internally stuff blows up.<br/> # Currently, when things blow up, we just return a scalar False or<br/> # True. But we also emit a DeprecationWarning, b/c eventually we<br/> # should raise an error here. (Ideally we might even make this work<br/> # properly, but since that will require rewriting a bunch of how<br/> # ufuncs work then we are not counting on that.)<br/> #<br/> # The point of this little function is to let the DeprecationWarning<br/> # pass (or maybe eventually catch the errors and return False, I<br/> # dunno, that's a little trickier and we can figure that out when the<br/> # time comes).<br/> with warnings.catch_warnings():<br/> warnings.filterwarnings("ignore", category=DeprecationWarning)<br/> return comparison(*args, **kwargs)<br/> <br/> def isnumber(x):<br/> return x.dtype.char in '?bhilqpBHILQPefdgFDG'<br/> <br/> def chk_same_position(x_id, y_id, hasval='nan'):<br/> """Handling nan/inf: check that x and y have the nan/inf at the same<br/> locations."""<br/> try:<br/> assert_array_equal(x_id, y_id)<br/> except AssertionError:<br/> msg = build_err_msg([x, y],<br/> err_msg + '\nx and y %s location mismatch:'<br/> % (hasval), verbose=verbose, header=header,<br/> names=('x', 'y'), precision=precision)<br/> raise AssertionError(msg)<br/> <br/> try:<br/> cond = (x.shape == () or y.shape == ()) or x.shape == y.shape<br/> if not cond:<br/> msg = build_err_msg([x, y],<br/> err_msg<br/> + '\n(shapes %s, %s mismatch)' % (x.shape,<br/> y.shape),<br/> verbose=verbose, header=header,<br/> names=('x', 'y'), precision=precision)<br/> if not cond:<br/> raise AssertionError(msg)<br/> <br/> if isnumber(x) and isnumber(y):<br/> x_isnan, y_isnan = isnan(x), isnan(y)<br/> x_isinf, y_isinf = isinf(x), isinf(y)<br/> <br/> # Validate that the special values are in the same place<br/> if any(x_isnan) or any(y_isnan):<br/> chk_same_position(x_isnan, y_isnan, hasval='nan')<br/> if any(x_isinf) or any(y_isinf):<br/> # Check +inf and -inf separately, since they are different<br/> chk_same_position(x == +inf, y == +inf, hasval='+inf')<br/> chk_same_position(x == -inf, y == -inf, hasval='-inf')<br/> <br/> # Combine all the special values<br/> x_id, y_id = x_isnan, y_isnan<br/> x_id |= x_isinf<br/> y_id |= y_isinf<br/> <br/> # Only do the comparison if actual values are left<br/> if all(x_id):<br/> return<br/> <br/> if any(x_id):<br/> val = safe_comparison(x[~x_id], y[~y_id])<br/> else:<br/> val = safe_comparison(x, y)<br/> else:<br/> val = safe_comparison(x, y)<br/> <br/> if isinstance(val, bool):<br/> cond = val<br/> reduced = [0]<br/> else:<br/> reduced = val.ravel()<br/> cond = reduced.all()<br/> reduced = reduced.tolist()<br/> if not cond:<br/> match = 100-100.0*reduced.count(1)/len(reduced)<br/> msg = build_err_msg([x, y],<br/> err_msg<br/> + '\n(mismatch %s%%)' % (match,),<br/> verbose=verbose, header=header,<br/> names=('x', 'y'), precision=precision)<br/> if not cond:<br/>> raise AssertionError(msg)<br/><span class="error">E AssertionError: </span><br/><span class="error">E Not equal to tolerance rtol=1e-07, atol=0</span><br/><span class="error">E </span><br/><span class="error">E (mismatch 2.55%)</span><br/><span class="error">E x: array([ 0., 0., 0., ..., 0., 0., 0.])</span><br/><span class="error">E y: array([ 0., 0., 0., ..., 0., 0., 0.])</span><br/><br/>/home/darth_sidious/anaconda2/envs/tardis/lib/python2.7/site-packages/numpy/testing/utils.py:708: AssertionError<br/></div></td></tr></tbody> | ||
<tbody class="skipped results-table-row"> | <tbody class="skipped results-table-row"> | ||
<tr> | <tr> | ||
<td class="col-result">Skipped</td> | <td class="col-result">Skipped</td> | ||
- | <td class="col-name">lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_montecarlo_properties[/tmp/tardis-test-0vYfSS/lib.linux-x86_64-2.7/tardis/tests/integration_tests/at]::setup</td> | + | <td class="col-name">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</td> |
<td class="col-duration">0.00</td> | <td class="col-duration">0.00</td> | ||
<td class="col-links"></td></tr> | <td class="col-links"></td></tr> | ||
Line 581: | Line 602: | ||
<td class="extra" colspan="5"> | <td class="extra" colspan="5"> | ||
<div class="log" style="clear: both">('lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py', 162, u'Skipped: Introduction of HDF mechanism.')<br/></div></td></tr></tbody> | <div class="log" style="clear: both">('lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py', 162, u'Skipped: Introduction of HDF mechanism.')<br/></div></td></tr></tbody> | ||
- | <tbody class="error results-table-row"> | + | <tbody class="failed results-table-row"> |
<tr> | <tr> | ||
- | <td class="col-result">Error</td> | + | <td class="col-result">Failed</td> |
- | <td class="col-name">lib.linux-x86_64-2.7/tardis/tests/integration_tests/test_integration.py::TestIntegration::()::test_shell_temperature[/tmp/tardis-test-0vYfSS/lib.linux-x86_64-2.7/tardis/tests/integration_tests/at]::setup</td> | + | <td class="col-name">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]</td> |
- | <td class="col-duration">0.01</td> | + | <td class="col-duration">0.65</td> |
<td class="col-links"></td></tr> | <td class="col-links"></td></tr> | ||
<tr> | <tr> | ||
<td class="extra" colspan="5"> | <td class="extra" colspan="5"> | ||
- | <div class="log" style="clear: both">self = <class 'tardis.tests.integration_tests.test_integration.TestIntegration'><br/>request = <SubRequest 'setup' for <Function 'test_spectrum[/tmp/tardis-test-0vYfSS/lib.linux-x86_64-2.7/tardis/tests/integration_tests/at]'>><br/>reference = <class 'pandas.io.pytables.HDFStore'><br/>File path: /home/darth_sidious/Documents...rtual/wavelength series (shape->[10000]) <br/>data_path = {'config_dirpath': '/tmp/tardis-test-0vYfSS/lib.linux-x86_64-2.7/tardis/tests/integration_tests/at', 'gen_ref_dirpath'...TARDIS/generated/a6d3e51', 'reference_filepath': '/home/darth_sidious/Documents/TARDIS/less/at.h5', 'setup_name': 'at'}<br/>atomic_data_fname = '/home/darth_sidious/Documents/TARDIS/tardis_example/kurucz_atom_chianti_many.h5'<br/><br/> @classmethod<br/> @pytest.fixture(scope="class", autouse=True)<br/> def setup(self, request, reference, data_path, atomic_data_fname):<br/> """<br/> This method does initial setup of creating configuration and performing<br/> a single run of integration test.<br/> """<br/> # The last component in dirpath can be extracted as name of setup.<br/> self.name = data_path['setup_name']<br/> <br/> self.config_file = os.path.join(data_path['config_dirpath'], "config.yml")<br/> <br/> # Load atom data file separately, pass it for forming tardis config.<br/> self.atom_data = AtomData.from_hdf5(atomic_data_fname)<br/> <br/> # Check whether the atom data file in current run and the atom data<br/> # file used in obtaining the reference data are same.<br/> # TODO: hard coded UUID for kurucz atom data file, generalize it later.<br/> kurucz_data_file_uuid1 = "5ca3035ca8b311e3bb684437e69d75d7"<br/>> assert self.atom_data.uuid1 == kurucz_data_file_uuid1<br/><span class="error">E assert '30aad830fa0e...cc8bcc8a04795' == '5ca3035ca8b31...84437e69d75d7'</span><br/><span class="error">E - 30aad830fa0e11e2a4fcc8bcc8a04795</span><br/><span class="error">E + 5ca3035ca8b311e3bb684437e69d75d7</span><br/><br/>tardis/tests/integration_tests/test_integration.py:39: AssertionError<br/></div></td></tr></tbody></tbody></table></body></html> | + | <div> |
+ | <div class="image" style="float: left"> | ||
+ | <a href="#"> | ||
+ | <img src= "http://opensupernova.org/~karandesai96/integration/lib/exe/fetch.php?media=reports:a6d3e51:at_t_rads.png" /> | ||
+ | </a> | ||
+ | </div> | ||
+ | </div> | ||
+ | <div class="log" style="clear: both">self = <tardis.tests.integration_tests.test_integration.TestIntegration object at 0x7f57f75acc90><br/>plot_object = <tardis.tests.integration_tests.plot_helpers.PlotUploader object at 0x7f57f75acd50><br/><br/> def test_shell_temperature(self, plot_object):<br/> plot_object.add(self.plot_t_rads(), "{0}_t_rads".format(self.name))<br/> <br/> assert_allclose(<br/> self.reference['/simulation/model/t_rads'],<br/>> self.result.t_rads.cgs.value)<br/><br/>tardis/tests/integration_tests/test_integration.py:182: <br/>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ <br/>/home/darth_sidious/anaconda2/envs/tardis/lib/python2.7/site-packages/numpy/testing/utils.py:1347: in assert_allclose<br/> verbose=verbose, header=header)<br/>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ <br/><br/>comparison = <function compare at 0x7f57f747a050><br/>x = array([ 16206.27258856, 15224.87695093, 14729.45650146, 14966.57154066,<br/> ...76,<br/> 7189.07791379, 7125.35638112, 7055.47749896, 6977.1692961 ])<br/>y = array([ 15708.96442842, 15818.25853318, 15247.26428538, 14333.37371268,<br/> ...51,<br/> 8426.00516188, 8339.04759122, 8249.41585509, 8152.66123055])<br/>err_msg = '', verbose = True, header = 'Not equal to tolerance rtol=1e-07, atol=0', precision = 6<br/><br/> def assert_array_compare(comparison, x, y, err_msg='', verbose=True,<br/> header='', precision=6):<br/> from numpy.core import array, isnan, isinf, any, all, inf<br/> x = array(x, copy=False, subok=True)<br/> y = array(y, copy=False, subok=True)<br/> <br/> def safe_comparison(*args, **kwargs):<br/> # There are a number of cases where comparing two arrays hits special<br/> # cases in array_richcompare, specifically around strings and void<br/> # dtypes. Basically, we just can't do comparisons involving these<br/> # types, unless both arrays have exactly the *same* type. So<br/> # e.g. you can apply == to two string arrays, or two arrays with<br/> # identical structured dtypes. But if you compare a non-string array<br/> # to a string array, or two arrays with non-identical structured<br/> # dtypes, or anything like that, then internally stuff blows up.<br/> # Currently, when things blow up, we just return a scalar False or<br/> # True. But we also emit a DeprecationWarning, b/c eventually we<br/> # should raise an error here. (Ideally we might even make this work<br/> # properly, but since that will require rewriting a bunch of how<br/> # ufuncs work then we are not counting on that.)<br/> #<br/> # The point of this little function is to let the DeprecationWarning<br/> # pass (or maybe eventually catch the errors and return False, I<br/> # dunno, that's a little trickier and we can figure that out when the<br/> # time comes).<br/> with warnings.catch_warnings():<br/> warnings.filterwarnings("ignore", category=DeprecationWarning)<br/> return comparison(*args, **kwargs)<br/> <br/> def isnumber(x):<br/> return x.dtype.char in '?bhilqpBHILQPefdgFDG'<br/> <br/> def chk_same_position(x_id, y_id, hasval='nan'):<br/> """Handling nan/inf: check that x and y have the nan/inf at the same<br/> locations."""<br/> try:<br/> assert_array_equal(x_id, y_id)<br/> except AssertionError:<br/> msg = build_err_msg([x, y],<br/> err_msg + '\nx and y %s location mismatch:'<br/> % (hasval), verbose=verbose, header=header,<br/> names=('x', 'y'), precision=precision)<br/> raise AssertionError(msg)<br/> <br/> try:<br/> cond = (x.shape == () or y.shape == ()) or x.shape == y.shape<br/> if not cond:<br/> msg = build_err_msg([x, y],<br/> err_msg<br/> + '\n(shapes %s, %s mismatch)' % (x.shape,<br/> y.shape),<br/> verbose=verbose, header=header,<br/> names=('x', 'y'), precision=precision)<br/> if not cond:<br/> raise AssertionError(msg)<br/> <br/> if isnumber(x) and isnumber(y):<br/> x_isnan, y_isnan = isnan(x), isnan(y)<br/> x_isinf, y_isinf = isinf(x), isinf(y)<br/> <br/> # Validate that the special values are in the same place<br/> if any(x_isnan) or any(y_isnan):<br/> chk_same_position(x_isnan, y_isnan, hasval='nan')<br/> if any(x_isinf) or any(y_isinf):<br/> # Check +inf and -inf separately, since they are different<br/> chk_same_position(x == +inf, y == +inf, hasval='+inf')<br/> chk_same_position(x == -inf, y == -inf, hasval='-inf')<br/> <br/> # Combine all the special values<br/> x_id, y_id = x_isnan, y_isnan<br/> x_id |= x_isinf<br/> y_id |= y_isinf<br/> <br/> # Only do the comparison if actual values are left<br/> if all(x_id):<br/> return<br/> <br/> if any(x_id):<br/> val = safe_comparison(x[~x_id], y[~y_id])<br/> else:<br/> val = safe_comparison(x, y)<br/> else:<br/> val = safe_comparison(x, y)<br/> <br/> if isinstance(val, bool):<br/> cond = val<br/> reduced = [0]<br/> else:<br/> reduced = val.ravel()<br/> cond = reduced.all()<br/> reduced = reduced.tolist()<br/> if not cond:<br/> match = 100-100.0*reduced.count(1)/len(reduced)<br/> msg = build_err_msg([x, y],<br/> err_msg<br/> + '\n(mismatch %s%%)' % (match,),<br/> verbose=verbose, header=header,<br/> names=('x', 'y'), precision=precision)<br/> if not cond:<br/>> raise AssertionError(msg)<br/><span class="error">E AssertionError: </span><br/><span class="error">E Not equal to tolerance rtol=1e-07, atol=0</span><br/><span class="error">E </span><br/><span class="error">E (mismatch 100.0%)</span><br/><span class="error">E x: array([ 16206.272589, 15224.876951, 14729.456501, 14966.571541,</span><br/><span class="error">E 13701.279354, 12117.988522, 11122.777918, 9489.789537,</span><br/><span class="error">E 10200.442509, 10156.201072, 9968.807256, 9180.946853,...</span><br/><span class="error">E y: array([ 15708.964428, 15818.258533, 15247.264285, 14333.373713,</span><br/><span class="error">E 14104.070137, 13091.739712, 12905.991376, 12080.928714,</span><br/><span class="error">E 11726.654175, 11042.182639, 9375.31476 , 9483.529789,...</span><br/><br/>/home/darth_sidious/anaconda2/envs/tardis/lib/python2.7/site-packages/numpy/testing/utils.py:708: AssertionError<br/></div></td></tr></tbody></tbody></table></body></html> |