remove the argument "error" out of "from_njoy" function

This commit is contained in:
liangjg 2017-07-31 17:52:55 -04:00
parent 7988bad6da
commit 8bb990b65a
3 changed files with 12 additions and 17 deletions

View file

@ -824,7 +824,7 @@ class IncidentNeutron(EqualityMixin):
return data
@classmethod
def from_njoy(cls, filename, temperatures=None, error=0.001, **kwargs):
def from_njoy(cls, filename, temperatures=None, **kwargs):
"""Generate incident neutron data by running NJOY.
Parameters
@ -834,8 +834,6 @@ class IncidentNeutron(EqualityMixin):
temperatures : iterable of float
Temperatures in Kelvin to produce data at. If omitted, data is
produced at room temperature (293.6 K)
error : float, optional
Fractional error tolerance for NJOY processing.
**kwargs
Keyword arguments passed to :func:`openmc.data.njoy.make_ace`
@ -853,7 +851,7 @@ class IncidentNeutron(EqualityMixin):
ace_file = os.path.join(tmpdir, 'ace')
xsdir_file = os.path.join(tmpdir, 'xsdir')
pendf_file = os.path.join(tmpdir, 'pendf')
make_ace(filename, temperatures, error, ace_file, xsdir_file,
make_ace(filename, temperatures, ace_file, xsdir_file,
pendf_file, **kwargs)
# Create instance from ACE tables within library

View file

@ -228,8 +228,8 @@ def make_pendf(filename, pendf='pendf', error=0.001, stdout=False):
return run(commands, tapein, tapeout, stdout)
def make_ace(filename, temperatures=None, error=0.001, ace='ace', xsdir='xsdir',
pendf=None, **kwargs):
def make_ace(filename, temperatures=None, ace='ace', xsdir='xsdir',
pendf=None, error=0.001, **kwargs):
"""Generate incident neutron ACE file from an ENDF file
Parameters
@ -239,14 +239,14 @@ def make_ace(filename, temperatures=None, error=0.001, ace='ace', xsdir='xsdir',
temperatures : iterable of float, optional
Temperatures in Kelvin to produce ACE files at. If omitted, data is
produced at room temperature (293.6 K).
error : float, optional
Fractional error tolerance for NJOY processing.
ace : str, optional
Path of ACE file to write
xsdir : str, optional
Path of xsdir file to write
pendf : str, optional
Path of pendf file to write. If omitted, the pendf file is not saved.
error : float, optional
Fractional error tolerance for NJOY processing.
**kwargs
Keyword arguments passed to :func:`openmc.data.njoy.run`
@ -315,8 +315,8 @@ def make_ace(filename, temperatures=None, error=0.001, ace='ace', xsdir='xsdir',
return retcode
def make_ace_thermal(filename, filename_thermal, temperatures=None, error=0.001,
ace='ace', xsdir='xsdir', **kwargs):
def make_ace_thermal(filename, filename_thermal, temperatures=None,
ace='ace', xsdir='xsdir', error=0.001, **kwargs):
"""Generate thermal scattering ACE file from ENDF files
Parameters
@ -328,12 +328,12 @@ def make_ace_thermal(filename, filename_thermal, temperatures=None, error=0.001,
temperatures : iterable of float, optional
Temperatures in Kelvin to produce data at. If omitted, data is produced
at all temperatures given in the ENDF thermal scattering sublibrary.
error : float, optional
Fractional error tolerance for NJOY processing.
ace : str, optional
Path of ACE file to write
xsdir : str, optional
Path of xsdir file to write
error : float, optional
Fractional error tolerance for NJOY processing.
**kwargs
Keyword arguments passed to :func:`openmc.data.njoy.run`

View file

@ -588,8 +588,7 @@ class ThermalScattering(EqualityMixin):
return table
@classmethod
def from_njoy(cls, filename, filename_thermal, temperatures=None,
error=0.001, **kwargs):
def from_njoy(cls, filename, filename_thermal, temperatures=None, **kwargs):
"""Generate incident neutron data by running NJOY.
Parameters
@ -602,8 +601,6 @@ class ThermalScattering(EqualityMixin):
Temperatures in Kelvin to produce data at. If omitted, data is
produced at all temperatures in the ENDF thermal scattering
sublibrary.
error : float, optional
Fractional error tolerance for NJOY processing.
**kwargs
Keyword arguments passed to :func:`openmc.data.njoy.make_ace_thermal`
@ -620,7 +617,7 @@ class ThermalScattering(EqualityMixin):
# Run NJOY to create an ACE library
ace_file = os.path.join(tmpdir, 'ace')
xsdir_file = os.path.join(tmpdir, 'xsdir')
make_ace_thermal(filename, filename_thermal, temperatures, error,
make_ace_thermal(filename, filename_thermal, temperatures,
ace_file, xsdir_file, **kwargs)
# Create instance from ACE tables within library