Apply @JoffreyDorville suggestions from code review

Co-authored-by: Joffrey Dorville <54550047+JoffreyDorville@users.noreply.github.com>
This commit is contained in:
Paul Romano 2022-07-13 11:09:35 -05:00 committed by GitHub
parent f4d0440d4f
commit 1e849fe162
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View file

@ -133,7 +133,7 @@ def _separation_energy(compound, nucleus, particle):
N_a = nucleus.n
# Determine breakup energy of incident particle (ENDF-6 Formats Manual,
# Appendix H, Table 3)
# Appendix H, Table 3) in MeV
za_to_breaking_energy = {
1: 0.0,
1001: 0.0,
@ -142,7 +142,7 @@ def _separation_energy(compound, nucleus, particle):
2003: 7.718043,
2004: 28.29566
}
I_b = za_to_breaking_energy[particle.za]
I_a = za_to_breaking_energy[particle.za]
# Eq. 4 in in doi:10.1103/PhysRevC.37.2350 or ENDF-6 Formats Manual section
# 6.2.3.2
@ -153,7 +153,7 @@ def _separation_energy(compound, nucleus, particle):
33.22 * ((N_c - Z_c)**2 / A_c**(4./3.) - (N_a - Z_a)**2 / A_a**(4./3.)) -
0.717 * (Z_c**2 / A_c**(1./3.) - Z_a**2 / A_a**(1./3.)) +
1.211 * (Z_c**2 / A_c - Z_a**2 / A_a) -
I_b
I_a
)

View file

@ -75,7 +75,7 @@ def test_atomic_representation(neutron, triton, b10, c12, c13, na23):
assert triton.n == 2
assert triton.za == 1003
# Test instanciation errors
# Test instantiation errors
with pytest.raises(ValueError):
_AtomicRepresentation(z=5, a=1)
with pytest.raises(ValueError):
@ -129,7 +129,7 @@ def test_kalbach_slope():
('Hg204.h5', 'n-080_Hg_204.endf')
]
)
def test_comparison_slope_hdf5(hdf5_filename, endf_type, endf_filename):
def test_comparison_slope_hdf5(hdf5_filename, endf_filename):
"""Test the calculation of the Kalbach-Mann slope done by OpenMC
by comparing it to HDF5 data. The test is based on the first product
of MT=5 (neutron). The isotopes tested have been selected because the