From 67e983218dbd040f8d9cbfd6d11188e56f504dda Mon Sep 17 00:00:00 2001 From: Olek <45364492+yardasol@users.noreply.github.com> Date: Sat, 24 Sep 2022 17:07:08 -0500 Subject: [PATCH 1/2] let thermal table name be None as default --- scripts/openmc-ace-to-hdf5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/openmc-ace-to-hdf5 b/scripts/openmc-ace-to-hdf5 index d7eb488f7..75948e012 100755 --- a/scripts/openmc-ace-to-hdf5 +++ b/scripts/openmc-ace-to-hdf5 @@ -92,7 +92,7 @@ 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, metastable) + data.add_temperature_from_ace(table) except Exception as e: print(f"Failed to convert {table.name}: {e}") continue From 663deb2761dddb11378407f3d2355ec8c42c57c0 Mon Sep 17 00:00:00 2001 From: Olek <45364492+yardasol@users.noreply.github.com> Date: Tue, 27 Sep 2022 11:26:41 -0500 Subject: [PATCH 2/2] Add flow control to differentiate indident neutron from thermal scattering data Co-authored-by: Paul Romano --- scripts/openmc-ace-to-hdf5 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/openmc-ace-to-hdf5 b/scripts/openmc-ace-to-hdf5 index 75948e012..66ae7e2a9 100755 --- a/scripts/openmc-ace-to-hdf5 +++ b/scripts/openmc-ace-to-hdf5 @@ -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