Automated Report Generation from Simulations
Turning raw simulation outputs into consistent, verifiable, human-readable reports without manual copy-paste.
The problem it solves
A simulation campaign produces gigabytes of arrays, logs, and metadata. Hand-writing a summary invites transcription errors, stale numbers, and figures that no longer match the data. Automated report generation binds the document to the run: every number and plot is produced from the same output files, so the report cannot silently drift from the results.
How it works
- A run emits structured outputs plus a manifest of inputs, code version, and random seeds
- A templating step pulls values directly from those outputs into text and tables
- Figures are rendered from the arrays at report time, not pasted from a screenshot
- The document records provenance: which run, which commit, which parameters
from string import Template
def render(summary, tmpl):
# summary: dict pulled straight from run outputs
return Template(tmpl).substitute(
q=f"{summary['Q']:.3f}",
power=f"{summary['fusion_power_MW']:.1f}",
commit=summary['git_commit'][:8])
txt = render({'Q':3.424,'fusion_power_MW':88.7,'git_commit':'a1b2c3d4ee'},
'Q=$q, P=$power MW (run $commit)')
Why it matters for credibility
When an external reviewer reads a Kronos design summary, the value of Q 3.424 or 88.7 MW should trace to a specific run and code version. Automated generation makes that traceability the default rather than an afterthought, and it makes regeneration cheap when a model improves.
Limits
Automation formats and binds numbers; it does not judge whether the run was physically meaningful. A wrong input still produces a tidy report. So generated reports carry the run manifest and are reviewed alongside validation checks, never in place of them.
The same pipeline feeds the reproducible-science workflow, so a report and its underlying artifacts move together.