paperFigures

Print-quality figures for the dynamics-engine comparison paper.

The scenario scripts emit documentation figures sized for web pages; this script re-renders the figures placed in the paper from the stored results/*.json metrics, with fonts and legends sized for two-column print inclusion and one consistent color scheme (Paul Tol high-contrast: BSM blue, MuJoCo red, third series yellow).

Run after runAllComparisons.py and the sweep drivers. The input hashes in results/provenance.json are checked before any figure is rendered:

python3 paperFigures.py [outputDir]

To regenerate every publication input, render the print figures, and replace the manifest with hashes from one clean, matching Release build, run:

python3 paperFigures.py --update-provenance [outputDir]

The update command reruns every scenario and sweep that supplies a paper figure, table, or quantitative claim. It also regenerates the deep-space full-slosh and near-rigid controls; no pre-existing result file is certified.

outputDir defaults to results/paper next to this script.

paperFigures.markerFor(integratorName)[source]

Marker for an svIntegrator name; RKF45 checked before RK4 by order below.

paperFigures.paretoPanel(data, errorKey, errorLabel, floorKey, outFile)[source]

One work-precision panel: error vs wall-clock, both engines, marker per integrator.

paperFigures.regeneratePublicationEvidence(resultsDir=None)[source]

Regenerate every data and scenario-figure artifact used by the paper.

paperFigures.regeneratePublicationInputs(scenarioRunKwargs=None, sweepRunKwargs=None, resultsDir=None)[source]

Regenerate every JSON file consumed by the print renderer.

Parameters:
  • scenarioRunKwargs (dict, optional) – per-scenario keyword overrides. Publication provenance uses the full defaults; reduced overrides are useful for exercising the rendering pipeline during development.

  • sweepRunKwargs (dict, optional) – per-sweep keyword overrides with the same development-only purpose.

  • resultsDir (str, optional) – destination for regenerated JSON inputs. Defaults to the scenario results directory.

paperFigures.run(outputDir=None, provenanceFile=None, verifySource=True, resultsDir=None)[source]

Validate stored inputs, render figures, and verify their exact hashes.

paperFigures.scalingFigure(outputDir, resultsDir=None)[source]

Wall-clock vs DOF for the three implementations, with BSM/MuJoCo ratio labels.

paperFigures.sha256File(path)[source]

Return the hexadecimal SHA-256 digest of one artifact.

paperFigures.updateInputProvenance(path=None, outputDir=None, resultsDir=None)[source]

Regenerate publication inputs and replace their complete provenance.

paperFigures.validateFigureProvenance(provenance, outputDir)[source]

Reject missing or changed print figures after deterministic rendering.

paperFigures.validateInputProvenance(path=None, verifySource=True, resultsDir=None)[source]

Reject missing, stale, or source-inconsistent publication inputs.