armi.nuclearDataIO.nuclearFileMetadata module¶
Assists in reconstruction/rewriting nuclear data files.
One might refer to the information stored in these files as the scaffolding or blueprints. Some of it can/could be derived based on data within the overall file; however, not all of it could be and it is always necessary to retain this type of data while reading the file.
-
class
armi.nuclearDataIO.nuclearFileMetadata.
_Metadata
[source]¶ Bases:
object
Simple dictionary wrapper, that returns
None
if the key does not exist.Notes
Cannot use a dictionary directly because it is difficult to subclass and broadcast them with MPI.
-
merge
(other, selfContainer, otherContainer, fileType, exceptionClass)[source]¶ Merge the contents of two metadata instances.
- Parameters
other (Similar Metadata class as self) – Metadata to be compared against
selfContainer (class) –
otherContainer (class) – Objects that hold the two metadata instances
fileType (str) – File type that created this metadata. Examples:
'ISOTXS', 'GAMISO', 'COMPXS'`
exceptionClass (Exception) – Type of exception to raise in the event of dissimilar metadata values
- Returns
mergedData – Returns a metadata instance of similar type as
self
andother
containing the correctly merged data of the two- Return type
Metadata
-
compare
(other, selfContainer, otherContainer, tolerance=0.0)[source]¶ Compare the metadata for two libraries.
- Parameters
other (Similar Metadata class as self) – Metadata to be compared against
selfContainer (class) –
otherContainer (class) – Objects that hold the two metadata instances
tolerance (float) – Acceptable difference between two metadata values
- Returns
equal – If the metadata are equal or not.
- Return type
-
-
class
armi.nuclearDataIO.nuclearFileMetadata.
FileMetadata
[source]¶ Bases:
armi.nuclearDataIO.nuclearFileMetadata._Metadata
Metadata description for a file.
- Variables
fileNames (list) – string list of file names
-
class
armi.nuclearDataIO.nuclearFileMetadata.
NuclideXSMetadata
[source]¶ Bases:
armi.nuclearDataIO.nuclearFileMetadata.FileMetadata
Metadata for library files containing nuclide cross sections, e.g.
ISOTXS
.
-
class
armi.nuclearDataIO.nuclearFileMetadata.
RegionXSMetadata
[source]¶ Bases:
armi.nuclearDataIO.nuclearFileMetadata.FileMetadata
Metadata for library files containing region cross sections, e.g.
COMPXS
-
class
armi.nuclearDataIO.nuclearFileMetadata.
NuclideMetadata
[source]¶ Bases:
armi.nuclearDataIO.nuclearFileMetadata._Metadata
Simple dictionary for providing metadata about how to read/write a nuclde to/from a file.