serpentTools.read(filePath, reader='infer')

Simple entry point to read a file and obtain the processed reader.

Parameters
• filePath (str) – Path to the file to be reader

• reader (str or callable) –

Type of reader to use. If a string is given, then the actions described below will happen. If callable, then that function will be used with the file path as the first argument.

String argument

Action

infer

Infer the correct reader based on the file

branch

BranchingReader

bumat

BumatReader

dep

DepletionReader

det

DetectorReader

fission

FissionMatrixReader

history

HistoryReader

microxs

MdxReader

results

ResultsReader

sensitivity

SensitivityReader

xsplot

XSPlotReader

Returns

Correct subclass corresponding to the file type

Return type

• AttributeError – If the object created by the reader through reader(filePath) does not have a read method.
• NotImplementedError – This has the ability to load in readers that may not be complete, and thus the read method may raise this error.