serpentTools.read¶
-
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
BranchingReaderbumat
BumatReaderdep
DepletionReaderdet
DetectorReaderfission
FissionMatrixReaderhistory
HistoryReadermicroxs
MdxReaderresults
ResultsReadersensitivity
SensitivityReaderxsplot
XSPlotReader
- Returns
Correct subclass corresponding to the file type
- Return type
serpentTools.objects.base.BaseReader
- Raises
AttributeError – If the object created by the reader through
reader(filePath)does not have areadmethod.SerpentToolsException – If the reader could not be inferred or if the requested reader string is not supported
NotImplementedError – This has the ability to load in readers that may not be complete, and thus the
readmethod may raise this error.