icecube.topsimulator.validationsuite module

icecube.topsimulator.validationsuite.CmpEqual(rep, cur, ref, **kwargs)

Compare equality. NaN == NaN yields true.

icecube.topsimulator.validationsuite.CmpFields(rep, cur, ref, *fields, **kwargs)

Compare two objects based on their field values, using equality.

icecube.topsimulator.validationsuite.CmpI3EventHeader(rep, cur, ref, **kwargs)

Compare fields of I3EventHeader, excluding random SubEventID.

icecube.topsimulator.validationsuite.CmpI3File(rep, fileNameCurrent, fileNameReference, restrictFrames=None, restrictKeys=None, ignoreKeys=None, strictOnLayout=False, keyBasedCmp=None, **kwargs)

Compare contents of two I3Files.

Files are compared frame by frame. The set of keys to compare can be restricted (restrictKeys) or selected frame keys can be ignored (ignoreKeys). If strictOnLayout is False, curFrame may contain more keys than refFrame; otherwise the key sets have to be identical. Key-based comparison functions can be passed (keyBasedCmp) and will overwrite type-based comparison.

icecube.topsimulator.validationsuite.CmpI3Frame(rep, curFrame, refFrame, restrictKeys=None, ignoreKeys=None, strictOnLayout=False, keyBasedCmp=None, **kwargs)

Compare contents of two I3Frames.

Frames are compared key by key. The set of keys to compare can be restricted (restrictKeys) or selected frame keys can be ignored (ignoreKeys). If strictOnLayout is False, curFrame may contain more keys than refFrame; otherwise the key sets have to be identical. Key-based comparison functions can be passed (keyBasedCmp) and will overwrite type-based comparison.

icecube.topsimulator.validationsuite.CmpI3Particle(rep, cur, ref, **kwargs)

Compare fields of I3Particle, excluding random ParticleID.

icecube.topsimulator.validationsuite.CmpI3Position(rep, cur, ref, **kwargs)

Compare I3Position (or I3Direction) comparing only (x,y,z)

icecube.topsimulator.validationsuite.CmpI3Tree(rep, cur, ref, **kwargs)

Compare trees by size and element-wise.

icecube.topsimulator.validationsuite.CmpIteritems(rep, cur, ref, **kwargs)

Compare trees by size and element-wise.

icecube.topsimulator.validationsuite.CmpMap(rep, cur, ref, **kwargs)

Compare maps by size and element-wise.

icecube.topsimulator.validationsuite.CmpSeries(rep, cur, ref, **kwargs)

Compare series by size and element-wise.

class icecube.topsimulator.validationsuite.GeneralComparison

Bases: object

General comparison class for validation.

Comparison functions can be registered (see register) based on the identity of the class object. Generic comparison based on duck typing and some heuristics is the default (see __call__).

register(classObject, compareFunction)

Register a comparison function based on object type.

class icecube.topsimulator.validationsuite.ValidationReport(title, verbosity=2)

Bases: ValidationSection

A structured validation report.

The report is convertable to str and bool. Conversion to str generates the text report. Conversion to bool returns True if all comparisons were successful and False otherwise.

exception()
failure(msg='')
flag(msg)
info(msg)
result(isOk, failureMsg='', successMsg='')
section(header)
success(msg='')
warn(msg)
class icecube.topsimulator.validationsuite.ValidationSection(parent, header='', verbosity=2)

Bases: list

Section of a validation report.

A section is a container for test results with a header. It can contain test results, messages, and other sections.

counts()