mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
Fix S(a,b) ZAID bugs in NNDC data when converting
This commit is contained in:
parent
22e7113d26
commit
b1957d4785
1 changed files with 14 additions and 8 deletions
|
|
@ -114,15 +114,21 @@ for filename in glob.glob('nndc/293.6K/ENDF-B-VII.1-neutron-293.6K/*'):
|
|||
shutil.move(filename, 'nndc/293.6K/')
|
||||
|
||||
# ==============================================================================
|
||||
# EDIT GRAPHITE ZAID (6012 to 6000)
|
||||
# FIX ZAID ASSIGNMENTS FOR VARIOUS S(A,B) TABLES
|
||||
|
||||
print('Changing graphite ZAID from 6012 to 6000')
|
||||
graphite = os.path.join('nndc', 'tsl', 'graphite.acer')
|
||||
with open(graphite) as fh:
|
||||
text = fh.read()
|
||||
text = text.replace('6012', '6000', 1)
|
||||
with open(graphite, 'w') as fh:
|
||||
fh.write(text)
|
||||
def fix_zaid(table, old, new):
|
||||
filename = os.path.join('nndc', 'tsl', table)
|
||||
with open(filename, 'r') as fh:
|
||||
text = fh.read()
|
||||
text = text.replace(old, new, 1)
|
||||
with open(filename, 'w') as fh:
|
||||
fh.write(text)
|
||||
|
||||
print('Fixing ZAIDs for S(a,b) tables')
|
||||
fix_zaid('graphite.acer', '6012', '6000')
|
||||
fix_zaid('benzine.acer', '6012', '6000')
|
||||
fix_zaid('bebeo.acer', '8016', ' 0')
|
||||
fix_zaid('obeo.acer', '4009', ' 0')
|
||||
|
||||
# ==============================================================================
|
||||
# PROMPT USER TO DELETE .TAR.GZ FILES
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue