Added row_column parameter to Library.build_hdf5_store(...)`

This commit is contained in:
Will Boyd 2016-05-08 18:43:43 -04:00
parent ed5505cd97
commit 8aada0af29
2 changed files with 14 additions and 7 deletions

View file

@ -575,7 +575,8 @@ class Library(object):
return subdomain_avg_library
def build_hdf5_store(self, filename='mgxs.h5', directory='mgxs',
subdomains='all', nuclides='all', xs_type='macro'):
subdomains='all', nuclides='all', xs_type='macro',
row_column='inout'):
"""Export the multi-group cross section library to an HDF5 binary file.
This method constructs an HDF5 file which stores the library's
@ -605,6 +606,10 @@ class Library(object):
xs_type: {'macro', 'micro'}
Store the macro or micro cross section in units of cm^-1 or barns.
Defaults to 'macro'.
row_column: {'inout', 'outin'}
Store scattering matrices indexed first by incoming group and
second by outgoing group ('inout'), or vice versa ('outin').
Defaults to 'inout'.
Raises
------
@ -646,8 +651,8 @@ class Library(object):
if subdomains == 'avg':
mgxs = mgxs.get_subdomain_avg_xs()
mgxs.build_hdf5_store(filename, directory,
xs_type=xs_type, nuclides=nuclides)
mgxs.build_hdf5_store(filename, directory, xs_type=xs_type,
nuclides=nuclides, row_column=row_column)
def dump_to_file(self, filename='mgxs', directory='mgxs'):
"""Store this Library object in a pickle binary file.

View file

@ -1174,8 +1174,9 @@ class MGXS(object):
Store the macro or micro cross section in units of cm^-1 or barns.
Defaults to 'macro'.
row_column: {'inout', 'outin'}
Store scattering matrices indexed first by incoming group and second
by outgoing group ('inout'), or vice versa ('outin').
Store scattering matrices indexed first by incoming group and
second by outgoing group ('inout'), or vice versa ('outin').
Defaults to 'inout'.
append : bool
If true, appends to an existing HDF5 file with the same filename
directory (if one exists). Defaults to True.
@ -2005,8 +2006,9 @@ class ScatterMatrixXS(MGXS):
decreasing energy groups (decreasing or increasing energies).
Defaults to 'increasing'.
row_column: {'inout', 'outin'}
Return the cross section indexed first by incoming group and second
by outgoing group ('inout'), or vice versa ('outin').
Return the cross section indexed first by incoming group and
second by outgoing group ('inout'), or vice versa ('outin').
Defaults to 'inout'.
value : str
A string for the type of value to return - 'mean', 'std_dev', or
'rel_err' are accepted. Defaults to the empty string.