sandy.aleph2.output_file module
This module contains all classes and functions necessary to work with the ALEPH-2 output file.
- class sandy.aleph2.output_file.OutputFile(text)
Bases:
object
Class dedicated to store the content of the ‘output’ ile produced by in any succesfull ALEPH-2 run.
- Attributes:
Methods
from_file
(file[, encoding, errors])Initialize object reading ALEPH-2 output from file.
from_string
(string)Initialize object reading ALEPH-2 output from string.
get_keff
()Get dataframe with time-dependent keff and uncertainty.
Extract neutronics/burnup calculated results available in the ALEPH summary and group them by material.
get_table
(table_number)For a specified table number, return a dictionary of tables indexed by material number.
parse_tables
([keep_tables, verbose])Parse ALEPH-2 output file, extract output tables and store them in attribute data.
- property data
Dictionary of ALEPH-2 output sections. Keys are the table numbers, values are dictionaries with pandas.DataFrame objects indexed by material number.
- Returns:
- dict
dictionary of ALEPH-2 output sections.
- Raises:
- AttributeError
if tables were not parsed you must first run parse_output.
Notes
data[0] is the ALEPH-2 summary also accessible with attribute summary.
- classmethod from_file(file, encoding='utf8', errors='ignore')
Initialize object reading ALEPH-2 output from file.
- Parameters:
- filestr
filename
- encodingstr, optional, default is ‘utf8’
encoding used to open the file and passed to python function open
- errorsstr, optional, default is ‘ignore’
option passed to python function open and that specifies how encoding and decoding errors are to be handled
- Returns:
- OutputFile
Container for ALEPH-2 output file content
- classmethod from_string(string)
Initialize object reading ALEPH-2 output from string.
- Parameters:
- string: `str`
string containing the ALEPH-2 output
- Returns:
- OutputFile
Container for ALEPH-2 output file content
- get_keff()
Get dataframe with time-dependent keff and uncertainty.
- Returns:
- pd.DataFrame
dataframe with keff and uncertainty as columns, time as rows
- get_materials()
Extract neutronics/burnup calculated results available in the ALEPH summary and group them by material.
- Returns:
- AlephMaterials
dictionary of ALEPH materials with neutronics/burnup calculated results (available from the ALEPH summary).
- get_table(table_number)
For a specified table number, return a dictionary of tables indexed by material number.
- Parameters:
- table_numberïnt
Table number found in the ALEPH-2 output file.
- Returns:
- dict
dictionary of tables.
- parse_tables(keep_tables=[], verbose=True)
Parse ALEPH-2 output file, extract output tables and store them in attribute data.
- Parameters:
- keep_tableslist
list of tables to be read. If empty keep all. Default is all.
- verbosebool
If True, print what tbale is read. Default is True.
- Returns:
- None.
Notes
Note
‘Contact gamma doses’ introduced in ALEPH-2.9.1 are not parsed. The integration of this piece of information in the parsing algorithm has not yet been implemented.
- property summary
Summary string of the ALEPH-2 output, i.e., the first output section before the tables.
- sandy.aleph2.output_file.read_output(file)