From 5b5e67701a866ad97df4a76a3dec6734bfa9a307 Mon Sep 17 00:00:00 2001 From: Bryan Herman Date: Thu, 10 Apr 2014 16:48:59 -0400 Subject: [PATCH] cross sections xml file now updated if binary conversion occurs --- data/get_nndc_data.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/data/get_nndc_data.py b/data/get_nndc_data.py index 7bab93ba06..7ba3d66cfd 100755 --- a/data/get_nndc_data.py +++ b/data/get_nndc_data.py @@ -138,3 +138,15 @@ if not response or response.lower().startswith('y'): for f in ace_files: print(' Coverting {0}...'.format(os.path.split(f)[1])) ascii_to_binary(f, f) + + # Change cross_sections.xml file + xs_file = os.path.join('nndc', 'cross_sections.xml') + asc_str = "ascii" + bin_str = " binary \n " + bin_str += " 4096 \n " + bin_str += " 512 " + with open(xs_file) as fh: + text = fh.read() + text = text.replace(asc_str, bin_str) + with open(xs_file, 'w') as fh: + fh.write(text)