Skip to content

Conversation

@SteSeg
Copy link
Collaborator

@SteSeg SteSeg commented Nov 26, 2025

Example usage:

import openmc_fusion_benchmarks as ofb

# Extract results
results = ofb.BenchmarkResults('benchmark_results.h5')

# List tally names avaliable in the result files
print(results.tallies)

# Select a tally
tally = results.get_tally(name='tally_name')

# Manipulate (e.g. get means)
means = tally.sel(column='mean').squeeze()  # exactly like a xarray.DataArray

The object for a tally is a xarray.DataArray. So it may have several dimensions. It is possible to get the labels of the dimensions with print(tally.coords). Notable dimensions for typycal ofb tallies are column, row and realization. A slice of column and row are basically the result of an openmc.Statepoint(...).get_tally(...).get_pandas_dataframe(). So, typycal columns are classic openmc's mean, std. dev., energy low [eV] etc.
The realization dimension is populated by the uncertainty quantification - total Monte Carlo results (see PR #65).

@coveralls
Copy link

coveralls commented Nov 26, 2025

Pull Request Test Coverage Report for Build 19879742806

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 21 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.4%) to 38.54%

Files with Coverage Reduction New Missed Lines %
/usr/share/miniconda3/envs/test-env/lib/python3.13/site-packages/openmc_fusion_benchmarks/benchmark.py 4 29.32%
/usr/share/miniconda3/envs/test-env/lib/python3.13/site-packages/openmc_fusion_benchmarks/uq/tmc_engine.py 4 24.14%
/usr/share/miniconda3/envs/test-env/lib/python3.13/site-packages/openmc_fusion_benchmarks/utils.py 13 20.0%
Totals Coverage Status
Change from base Build 19517104281: 0.4%
Covered Lines: 190
Relevant Lines: 493

💛 - Coveralls

@SteSeg SteSeg merged commit 812577f into eepeterson:develop Dec 3, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants