armi.bookkeeping.db.compareDB module

Use the generic API of the database class to compare two ARMI databases

class armi.bookkeeping.db.compareDB.DMNames[source]

Bases: object

Common names for aspects of the data model in ARMI

TIMESTEPS = 'timesteps'
REACTORS = 'reactors'
ASSEMBLIES = 'assemblies'
BLOCKS = 'blocks'
class armi.bookkeeping.db.compareDB.DatabaseComparer(ref, src, exclusion: Optional[Sequence[str]] = None, weights=None, tolerance=0.01, selection=None, timestepMatchup=None)[source]

Bases: object

This class facilitates the comparison of two databases

hasDifferences()[source]
output()[source]

Format the resulting differences as best as possible for human comprehension

write(fname='')[source]

Output the results of the database comparison to a file

compare() → int[source]

Compare the source to the reference database, updating self.results with the findings

armi.bookkeeping.db.compareDB.areComparable(src, ref)[source]
armi.bookkeeping.db.compareDB.compare(src, ref, weight)[source]

Compare two values, with a leaning towards treating them as numbers

Returns the % difference between the two. Currently treats non-numeric values very naively as all-or-nothing similarities

class armi.bookkeeping.db.compareDB.Comparisons[source]

Bases: object

Simple enumeration of different comparison issues

class Errors[source]

Bases: object

Cell entries possible for failures in the comparison

MISMATCHED_TYPES = 'ERR1'
MISMATCHED_LENGTHS = 'ERR2'
static outputErrorKey()[source]

Return a textual representation of the error

class Labels[source]

Bases: object

Row labels indicating what the given cell entry values denote

LISTS_FULL = ['% AVG', '% AAVG', '%MDIFF']
LISTS_MDIFFONLY = ['%MDIFF', '-', '-']
SINGULAR = [' %CHA ', ' :SRC:', ' :REF:']
ERROR = ['ERROR', 'ERROR', 'ERROR']