armi.nuclearDataIO.xsLibraries module
Cross section library objects.
Cross section libraries, currently, contain neutron and/or gamma cross sections, but are not necessarily intended to be only neutron and gamma data.
- armi.nuclearDataIO.xsLibraries.compare(lib1, lib2)[source]
Compare two XSLibraries, and return True if equal, or False if not.
- armi.nuclearDataIO.xsLibraries.compareXSLibraryAttribute(lib1, lib2, attributeName, tolerance=0.0)[source]
Compare the values of an attribute in two libraries.
- armi.nuclearDataIO.xsLibraries.compareLibraryNeutronEnergies(lib1, lib2, tolerance=0.0)[source]
Compare the neutron velocities and energy upper bounds for two libraries.
- armi.nuclearDataIO.xsLibraries.getSuffixFromNuclideLabel(nucLabel)[source]
Return the xs suffix for the nuclide label.
- armi.nuclearDataIO.xsLibraries.getISOTXSLibrariesToMerge(xsLibrarySuffix, xsLibFileNames)[source]
Find ISOTXS libraries out of a list that should be merged based on the provided
xsLibrarySuffix.- Parameters:
Notes
Files that exist: ISOAA-n1, ISOAB-n1, ISOAA-n2, ISOAB-n2, ISOAA, ISOAB, ISODA, ISOBA. xsLibrarySuffix: ‘n2’ Results: ISOAA-n2, ISOAB-n2
- armi.nuclearDataIO.xsLibraries.mergeXSLibrariesInWorkingDirectory(lib, xsLibrarySuffix='', mergeGammaLibs=False, alternateDirectory=None)[source]
Merge neutron (ISOTXS) and gamma (GAMISO/PMATRX) library data into the provided library.
Notes
Convention is for fuel XS id to come first alphabetically (A, B, C, etc.) and then be followed by non-fuel. This should allow referenceDummyNuclide to be defined before it is needed by a non-fuel cross section, but if the convention is not followed then this could cause an issue.
- Parameters:
lib (obj) – ISOTXS library object
xsLibrarySuffix (str, optional) – XS library suffix used to determine which ISOTXS files are merged together, typically something like -doppler. If empty string, will merge everything without suffix (indicated by a -).
mergeGammaLibs (bool, optional) – If True, the GAMISO and PMATRX files that correspond to the ISOTXS library will be merged. Note: if these files do not exist this will fail.
alternateDirectory (str, optional) – An alternate directory in which to search for files other than the working directory. The main purpose of this is for testing, but it could also be useful to users.
- class armi.nuclearDataIO.xsLibraries.IsotxsLibrary[source]
Bases:
_XSLibraryIsotxsLibrary objects are a collection of cross sections (XS) for both neutron and gamma reactions.
IsotxsLibrary objects must be initialized with data through one of the read methods within this package
See also
armi.nuclearDataIO.cccc.isotxs.readBinary(),armi.nuclearDataIO.cccc.gamiso.readBinary(),armi.nuclearDataIO.cccc.pmatrx.readBinary(),CompxsLibraryExamples
>>> lib = xsLibraries.IsotxsLibrary() >>> # this doesn't have any information yet, we can read ISOTXS information >>> libIsotxs = isotxs.readBinary('ISOAA') >>> # any number of XSLibraries can be merged >>> lib.merge(libIsotxs) # now the `lib` contains the ISOAA information.
- property gammaEnergyUpperBounds
Get or set the gamma energy groups.
- property neutronDoseConversionFactors
Get or set the neutron dose conversion factors.
- property gammaDoseConversionFactors
Get or set the gamma does conversion factors.
- property numGroups
Get the number of neutron energy groups.
- property numGroupsGamma
Get the number of gamma energy groups.
- property xsIDs
Get the XS ID’s present in this library.
Assumes the suffixes are the last 2 letters in the nucNames
- property nuclideLabels
Get the nuclide Names.
- property nuclides
- class armi.nuclearDataIO.xsLibraries.CompxsLibrary[source]
Bases:
_XSLibraryLibrary object used in reading/writing COMPXS files.
Contains macroscopic cross sections for homogenized regions.
See also
IsotxsLibrary,armi.nuclearDataIO.cccc.compxs.readBinary()Examples
>>> lib = compxs.readBinary('COMPXS') >>> lib.regions
- property regions
- property regionLabels