Skip to content

Commit

Permalink
Fix path handling for thermal ACE generation (#3171)
Browse files Browse the repository at this point in the history
Co-authored-by: Paul Romano <[email protected]>
  • Loading branch information
janmalec and paulromano authored Jan 11, 2025
1 parent c226c78 commit d2edf0c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions openmc/data/njoy.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ def make_ace(filename, temperatures=None, acer=True, xsdir=None,


def make_ace_thermal(filename, filename_thermal, temperatures=None,
ace='ace', xsdir=None, output_dir=None, error=0.001,
ace=None, xsdir=None, output_dir=None, error=0.001,
iwt=2, evaluation=None, evaluation_thermal=None,
table_name=None, zaids=None, nmix=None, **kwargs):
"""Generate thermal scattering ACE file from ENDF files
Expand All @@ -441,7 +441,7 @@ def make_ace_thermal(filename, filename_thermal, temperatures=None,
Temperatures in Kelvin to produce data at. If omitted, data is produced
at all temperatures given in the ENDF thermal scattering sublibrary.
ace : str, optional
Path of ACE file to write
Path of ACE file to write. Default to ``"ace"``.
xsdir : str, optional
Path of xsdir file to write. Defaults to ``"xsdir"`` in the same
directory as ``ace``
Expand Down Expand Up @@ -589,7 +589,7 @@ def make_ace_thermal(filename, filename_thermal, temperatures=None,
commands += 'stop\n'
run(commands, tapein, tapeout, **kwargs)

ace = output_dir / ace
ace = (output_dir / "ace") if ace is None else Path(ace)
xsdir = (ace.parent / "xsdir") if xsdir is None else Path(xsdir)
with ace.open('w') as ace_file, xsdir.open('w') as xsdir_file:
# Concatenate ACE and xsdir files together
Expand Down

0 comments on commit d2edf0c

Please sign in to comment.