About H5 statepoint reading in Matlab

Hello again!

So, instead of using the Python API, I decided to read the StatePoint.h5 file instead in Matlab. After reading a flux from a CellFilter (not a mesh tally), I get the following 3D-matrix dimensions: (2 X 1 X (No. of cells)). The first “2” in the dimensions corresponds to the fact that the first raw will be the mean value of the track-length tally (in cm) and then the second raw would be related to the statistical uncertainty of the tally. My question is; is such value from the h5 file that has been read in Matlab already the relative STD in percentage of its associated track-length value ? Or, could you help me clarify please this doubt I have?

Thanks in advanced !

Hi Augusto,

Those two numbers correspond to the sum (not the mean) of the tallied values and the sum of the squares of the tallied values. To get the mean, you need to divide the sum by the number of realizations (which is also found in the statepoint). The variance can be computed from the sum, sum of squares, and number of realizations via this formula: https://docs.openmc.org/en/stable/methods/tallies.html#equation-unbiased-variance

In case you’re curious, the values are stored in the statepoint as sum and sum squared rather than mean and variance because it’s the information OpenMC needs in order to restart a run that was halted early.

Sterling