f4enix.input.xsdirpyne.OpenMCXsdir#
- class f4enix.input.xsdirpyne.OpenMCXsdir(filename, libmanager, library)#
Bases:
Xsdir- Parameters:
filename (str) – Path to xsdir file.
Methods
__init__(filename, libmanager, library)find_table(name[, mode])Find all tables for a given ZAID.
find_zaids(lib)Find all zaids for a given library.
nucs()Provides a set of the valid nuclide ids for nuclides contained in the xsdir.
read(libmanager, library)Populate the Xsdir object by reading the file.
to_xsdata(filename)Writes a Serpent xsdata file for all continuous energy xs tables.
zaid_has_table(zaidname, lib)Check if a ZAID has a table in a given library.
- find_table(name, mode='default')#
Find all tables for a given ZAID.
Modified for JADE, a bug was corrected since table.name do not find natural zaids.
- Parameters:
name (str) – The ZIAD name.
mode (str) – if ‘default’, the default behaviour is used. If ‘exact’ the zaid is searched in that specific library. If ‘default-fast’ it is run in an accellerated loop giving only the libraries names. default is ‘default’.
- Returns:
tables – All XsdirTable objects for a given ZAID.
- Return type:
list
- find_zaids(lib)#
Find all zaids for a given library.
- Parameters:
lib (str) – The library suffix.
- Returns:
tables – All XsdirTable objects for a given library.
- Return type:
list
- nucs()#
Provides a set of the valid nuclide ids for nuclides contained in the xsdir.
- Returns:
valid_nucs – The valid nuclide ids.
- Return type:
set
- read(libmanager, library)#
Populate the Xsdir object by reading the file.
- to_xsdata(filename)#
Writes a Serpent xsdata file for all continuous energy xs tables.
- Parameters:
filename (str) – The output filename.
- zaid_has_table(zaidname: str, lib: str) bool#
Check if a ZAID has a table in a given library.
- Parameters:
zaidname (str) – The ZAID name (e.g. 1001).
lib (str) – The lib suffix (e.g. 31c)
- Returns:
True if the ZAID has a table in the given library.
- Return type:
bool