From 35d24a955d29abfde0d3c08970a6f2836621f73c Mon Sep 17 00:00:00 2001 From: liangjg Date: Fri, 28 Jul 2017 10:08:37 -0400 Subject: [PATCH] skip adding 0K elastic xs if it already exists --- openmc/data/neutron.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/openmc/data/neutron.py b/openmc/data/neutron.py index 1d3a0176d4..ed2f4f8b75 100644 --- a/openmc/data/neutron.py +++ b/openmc/data/neutron.py @@ -866,12 +866,13 @@ class IncidentNeutron(EqualityMixin): data.fission_energy = FissionEnergyRelease.from_endf(ev, data) # Add 0K elastic scattering cross section - pendf = Evaluation(pendf_file) - file_obj = StringIO(pendf.section[3, 2]) - get_head_record(file_obj) - params, xs = get_tab1_record(file_obj) - data.energy['0K'] = xs.x - data[2].xs['0K'] = xs + if '0K' not in data.energy: + pendf = Evaluation(pendf_file) + file_obj = StringIO(pendf.section[3, 2]) + get_head_record(file_obj) + params, xs = get_tab1_record(file_obj) + data.energy['0K'] = xs.x + data[2].xs['0K'] = xs finally: # Get rid of temporary files