Don't throw away precision on K-M slope calculation

This commit is contained in:
Paul Romano 2022-04-07 10:58:15 -05:00
parent af579895dd
commit e7595c3201
2 changed files with 3 additions and 5 deletions

View file

@ -299,9 +299,7 @@ def kalbach_slope(energy_projectile, energy_emitted, iza_projectile,
r_3 = min(e_a, 41.)
x_1 = r_1 * e_b / e_a
x_3 = r_3 * e_b / e_a
slope = 0.04 * x_1 + 1.8e-6 * x_1**3 + 6.7e-7 * M * m * x_3**4
return float("%7e" % slope)
return 0.04 * x_1 + 1.8e-6 * x_1**3 + 6.7e-7 * M * m * x_3**4
class KalbachMann(AngleEnergy):

View file

@ -173,7 +173,7 @@ def test_comparison_slope_hdf5(hdf5_filename, endf_type, endf_filename):
np.testing.assert_array_almost_equal(
endf_distribution.slope[i].y,
hdf5_slope.y,
decimal=6
decimal=5
)
@ -227,5 +227,5 @@ def test_comparison_slope_njoy(endf_type, endf_filename):
np.testing.assert_array_almost_equal(
endf_distribution.slope[i].y,
njoy_slope.y,
decimal=6
decimal=5
)