serpentTools.samplers.DetectorSampler

class serpentTools.samplers.DetectorSampler(files)

Class responsible for reading multiple detector files

The following checks are performed to ensure that all detectors are of similar structure and content

  1. Each parser must have the same detectors

  2. The reshaped tally data must be of the same size for all detectors

These tests can be skipped by settings <sampler.skipPrecheck> to be False.

Parameters

files (str or iterable) – Single file or iterable (list) of files from which to read. Supports file globs, *det0.m expands to all files that end with det0.m

detectors

Dictionary of key, values pairs for detector names and corresponding SampledDetector instances

Type

dict

files

Unordered set containing full paths of unique files read

Type

set

settings

Dictionary of sampler-wide settings

Type

dict

parsers

Unordered set of all parsers that were successful

Type

set

map

Dictionary where key, value pairs are files and their corresponding parsers

Type

dict

__getitem__(name)

Retrieve a detector from detectors.

free()

Remove all parsers and individual containers from memory

process()

Process the repeated files to obtain true uncertainties

read()

Read all the files and create parser objects