Adding log-lg tally output and updating results.

This commit is contained in:
Patrick Shriwise 2022-07-30 00:51:52 -05:00
parent aeca1173e7
commit 7ea116c89f
2 changed files with 9 additions and 2 deletions

View file

@ -1,2 +1,4 @@
energyfunction nuclide score mean std. dev.
0 448ee8dfd19c4f Am241 ((n,gamma) / (n,gamma)) 1.74e-01 6.83e-03
energyfunction nuclide score mean std. dev.
0 37e006ae6b2e74 Am241 (n,gamma) 8.16e-02 2.24e-03

View file

@ -60,11 +60,17 @@ class FilterEnergyFunHarness(PyAPITestHarness):
# Read the statepoint file.
sp = openmc.StatePoint(self._sp_name)
dataframes_string = ""
# Use tally arithmetic to compute the branching ratio.
br_tally = sp.tallies[2] / sp.tallies[1]
dataframes_string += br_tally.get_pandas_dataframe().to_string() + '\n'
# Write out the log-log interpolation as well
log_tally = sp.tallies[3]
dataframes_string += log_tally.get_pandas_dataframe().to_string() + '\n'
# Output the tally in a Pandas DataFrame.
return br_tally.get_pandas_dataframe().to_string() + '\n'
return dataframes_string
def _compare_results(self):
super()._compare_results()
@ -96,7 +102,6 @@ class FilterEnergyFunHarness(PyAPITestHarness):
assert all(sp_log_log_filt.energy == model_log_log_filt.energy)
assert all(sp_log_log_filt.y == model_log_log_filt.y)
# because the values of y are monotonically increasing,
# we expect the log-log tally to have a higher value
assert all(sp_lin_lin_tally.mean < sp_log_log_tally.mean)