Add flow control to differentiate indident neutron from thermal scattering data

Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
Olek 2022-09-27 11:26:41 -05:00 committed by GitHub
parent 67e983218d
commit 663deb2761
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -92,7 +92,10 @@ def ace_to_hdf5(destination, xsdir, xsdata, libraries, metastable, libver):
# Add data for new temperature
try:
print(f"Converting {table.name} (ACE) to {data.name} (HDF5)")
data.add_temperature_from_ace(table)
if table.data_type == TableType.NEUTRON_CONTINUOUS:
data.add_temperature_from_ace(table, metastable)
else:
data.add_temperature_from_ace(table)
except Exception as e:
print(f"Failed to convert {table.name}: {e}")
continue