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.

items()[source]

Returns items similar to the dict implementation.

keys()[source]

Returns keys similar to the dict implementation.

values()[source]
update(other)[source]

Updates the underlying dictionary, similar to the dict implementation.

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 and other containing the correctly merged data of the two

Return type

Metadata

_getSkippedKeys(other, selfContainer, otherContainer, mergedData)[source]
_mergeLibrarySpecificData(other, selfContainer, otherContainer, mergedData)[source]
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

bool

class armi.nuclearDataIO.nuclearFileMetadata.FileMetadata[source]

Bases: armi.nuclearDataIO.nuclearFileMetadata._Metadata

Metadata description for a file.

Variables

fileNames (list) – string list of file names

update(other)[source]

Update this metadata with metadata from another file.

_mergeLibrarySpecificData(other, selfContainer, otherContainer, mergedData)[source]
class armi.nuclearDataIO.nuclearFileMetadata.NuclideXSMetadata[source]

Bases: armi.nuclearDataIO.nuclearFileMetadata.FileMetadata

Metadata for library files containing nuclide cross sections, e.g. ISOTXS.

_getSkippedKeys(other, selfContainer, otherContainer, mergedData)[source]
_mergeLibrarySpecificData(other, selfContainer, otherContainer, mergedData)[source]
class armi.nuclearDataIO.nuclearFileMetadata.RegionXSMetadata[source]

Bases: armi.nuclearDataIO.nuclearFileMetadata.FileMetadata

Metadata for library files containing region cross sections, e.g. COMPXS

_mergeLibrarySpecificData(other, selfContainer, otherContainer, mergedData)[source]
_getSkippedKeys(other, selfContainer, otherContainer, mergedData)[source]
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.