Merge pull request #1535 from paulromano/njoy-acethermal-fix

Make sure output_dir gets set for ThermalScattering.from_njoy
This commit is contained in:
Amanda Lund 2020-03-26 09:28:24 -05:00 committed by GitHub
commit 2f2b70cf24
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -766,8 +766,8 @@ class ThermalScattering(EqualityMixin):
"""
with tempfile.TemporaryDirectory() as tmpdir:
# Run NJOY to create an ACE library
kwargs.setdefault('ace', os.path.join(tmpdir, 'ace'))
kwargs.setdefault('xsdir', os.path.join(tmpdir, 'xsdir'))
kwargs.setdefault('output_dir', tmpdir)
kwargs.setdefault('ace', os.path.join(kwargs['output_dir'], 'ace'))
kwargs['evaluation'] = evaluation
kwargs['evaluation_thermal'] = evaluation_thermal
make_ace_thermal(filename, filename_thermal, temperatures, **kwargs)