MCTAL file#

The complete API can be found at f4enix.output.meshtal.Mctal

All tallies are parsed and brought into a pandas dataframe format

# Import the mctal module
from f4enix.output.mctal import Mctal

# Parse the Mctal file
file = 'mctal'
mctal = Mctal(file)

# get a summary of the min and max errors across tallies
mctal.get_error_summary().sort_values(by='tally num')
/home/docs/checkouts/readthedocs.org/user_builds/f4enix/envs/developing/lib/python3.10/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html
  from .autonotebook import tqdm as notebook_tqdm
tally num min rel error max rel error
0 4 NaN 1.0000
22 6 0.0007 0.0272
19 14 NaN 1.0000
1 16 0.0008 0.0381
2 24 0.0009 0.0162
20 26 0.0010 0.0274
3 34 0.0009 0.0209
4 44 0.0010 0.0213
5 54 0.0011 0.0210
6 64 0.0010 0.0159
7 74 0.0010 0.0201
8 84 0.0011 0.0211
9 94 0.0010 0.0277
10 104 0.0035 0.0151
11 114 0.0053 0.0190
12 124 0.0050 0.0184
13 134 0.0075 0.0277
14 144 0.0015 0.0030
15 154 0.0014 0.0033
16 164 0.0014 0.0033
17 174 0.0133 0.0151
18 204 0.0009 0.0264
21 214 0.0009 0.0256
# Access the data of a specific tally (204 in this case)
mctal.tallydata[204]
Cells Value Error
0 2 3367640.0 0.0264
1 3 4183630.0 0.0255
2 4 6022490.0 0.0242
3 5 9160960.0 0.0231
4 6 14496000.0 0.0219
... ... ... ...
92 101 1948950.0 0.0209
93 102 1197290.0 0.0219
94 103 709479.0 0.0230
95 104 390849.0 0.0244
96 105 161990.0 0.0251

97 rows × 3 columns