executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
tallies-resultsConfigure OpenMC tallies and filters, inspect statepoint, summary, track, and particle-restart HDF5 outputs, and perform guarded post-processing, plotting, arithmetic, and uncertainty checks.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this route when the immediate task is to define what OpenMC scores, select filter bins, read an existing output file, or derive and visualize result data. This route interprets files and constructs tally/result objects; it does not run transport or manufacture a result when no output file is available.
cross_sections.xml availability, use
setup-runtime before interpreting a failed run.nuclear-data-depletion route. Do not duplicate those procedures in
this result-reading route.openmc.lib, C API/library mode,
random ray, CMFD, weight windows, or optional native integrations, use the
sibling advanced-solvers route.If only a tally/filter XML or a readable HDF5 file is involved, the Python API and HDF5-reader gates are sufficient; a transport executable and nuclear data are separate gates owned by the routes above.
Construct openmc.Tally with concrete openmc.Filter objects, then set
nuclides, scores, and, only when justified, estimator, triggers,
higher_moments, or multiply_density. Common filters include cell, material,
universe, surface, energy, outgoing energy, mesh, particle, time, distribcell,
reaction, angle, and mesh-derived filters. Use each filter's own validation and
units; do not pass arbitrary coordinate or ID arrays to a filter that expects a
mesh or domain object.
Inspect tally.filters, tally.nuclides, tally.scores, tally.estimator,
tally.num_filter_bins, tally.num_nuclides, tally.num_scores, and
tally.shape before exporting. Export a collection with
openmc.Tallies([...]).export_to_xml(path) or use the model's input-export
workflow. XML generation is not a simulation. For full model validity and
runtime execution, route to the sibling skills above.
For an explicit file, start with the safe metadata helper:
python scripts/inspect_statepoint.py --help
python scripts/inspect_statepoint.py path/to/statepoint.h5 --require-statepoint
The helper opens HDF5 only; it never launches OpenMC. Then use
openmc.StatePoint(path, autolink=False) when summary association is missing,
stale, or not independently identified. Use the context manager, inspect
sp.version, sp.run_mode, sp.n_realizations, sp.tallies, and the chosen
tally's labels and shape, and use sp.get_tally(...) with exact matching flags
when an ambiguous lookup could select the wrong tally.
The default autolink=True is a convenience, not provenance validation. If
geometry-aware labels or distribcell paths are required, open the intended
openmc.Summary(summary_path) explicitly, verify that its geometry and IDs
belong to the same run, and then call sp.link_with_summary(summary).
Use openmc.Tracks(path) only for a track file and openmc.Particle(path) only
for a particle-restart file. These readers validate their own HDF5 file types;
a collision-track, statepoint, summary, or source file is not interchangeable.
A particle-restart object describes a failed particle and is not evidence that a
future run can resume. Preserve compatible input, executable, data, and build
provenance for an actual restart, then route execution to setup-runtime.
Treat each result as indexed by filter bins, nuclide bins, and scores. Use
get_values(...) for labeled selection and
get_reshaped_data(value=..., expand_dims=True) for mesh-aware reshaping. For
CSV/tabular work, use get_pandas_dataframe() only after results and any
required summary context are present. Check np.isfinite values and zero
means before reporting relative errors.
Tally arithmetic (+, -, *, /, **), summation, and slicing require
result-bearing operands and deliberate label/shape semantics. Check
can_merge, filters, nuclides, scores, realizations, estimator, and density
semantics before combining. Built-in uncertainty propagation assumes independent
operands; same-run tally covariance is not automatically represented.
Distinguish two plotting paths:
Plot/Plots exports native geometry plot XML; PNG or voxel output still
requires a compatible native executable and optional support.sum, sum_sq,
realization count, mean, and standard deviation; do not replace NaN or
negative-variance symptoms with zero or silently clip them.Read api-reference.md for object contracts, output-formats-and-workflows.md for HDF5 layout and bounded workflows, and troubleshooting.md for symptom/cause/recovery paths. Keep the generated helper path-independent and pass it an explicit input file.