Dose-evolution figures for a RadCluster_2_1 run, with EUROFER97 data overlaid.
Regenerates `plots/density_vs_dose.png` and `plots/size_vs_dose.png` (plus the
`_annotated` variants) for ANY run directory under `output/`.
WHY THIS FILE EXISTS. The reference figures for run
`20260904_212202_..._I80000V20000_im5vm5` were made by a script that was never
saved next to them -- `output/` is gitignored, so the only surviving relative,
`output/20260904_153005_f281fcf/make_figures.py`, is a DIFFERENT and earlier
variant: it plots the campaign row's `at_dose` trajectory out of
`digital_twin/results/B3_coal.jsonl`, not the run's own solution, and it draws
the marker-on-curve "annotated" style with no experimental bands. The notebook
never produced these figures at all. So the headline figures of the reference
case could not be regenerated from anything in version control. This script
closes that gap and is committed.
The six series are derived from the run's own `plots/plot_data.pkl`, using the
same expressions `digital_twin/run_ensemble.py` uses for the campaign
observables, so a figure and a ledger row for the same vector agree by
construction:
d_111 = 2*sqrt(mean_n_111 * Omega / (pi*b_111)) [loop, 1/2<111>]
d_100 = 2*sqrt(mean_n_100 * Omega / (pi*b_100)) [loop, <100>]
d_cav = 2*(3*mean_n_v*Omega/(4*pi))^(1/3) [spherical cavity]
Verified against the reference run: reproduces its provenance addendum's
"Model at key doses" table to every printed digit.
ENCODING (revised 2026-09-06). Experimental points are coloured by *literature
source*, not by defect population, and every source is named in the legend --
replacing the earlier filled/open "experiment, 330 C" / "experiment, 300/350 C"
pair, which spent two legend entries on temperature and none on provenance.
Defect population is carried by marker SHAPE (o = 1/2<111>, s = <100>,
^ = cavity), and the model legend entries repeat that shape, so a reader can
still tell which curve each measurement belongs against. The irradiation
temperature of an individual point is no longer encoded; every point in the
window is 300-350 C and the model is at 330 C.
Usage:
python codes/make_dose_figures.py <run_dir> [--annotated] [--in-place]
<run_dir> an output/ run directory (must contain plots/plot_data.pkl)
--annotated also write the marker/annotated *_annotated.png variants
--in-place write into <run_dir>/plots/ (default: a new timestamped dir,
so an existing reference run is never overwritten)
| make_dose_figures.attribute |
( |
|
df | ) |
|
Add a short `Source` per row of InterstitialLoop.xlsx.
The `Paper` column uses MERGED CELLS: one title heads a block of rows and
pandas leaves NaN on every row but the first, so attribution is a forward
fill. The fill is fenced by irradiation type: the sheet has one place --
Excel row 40 -- where a neutron row sits immediately below an ion block, and
an unfenced fill would hand it to Boulanger 2009 (an ion study). A finer
fence would be wrong: the Dethloff 2018 merge legitimately spans an HFR ->
BOR-60 facility change. Fencing leaves row 40 unattributed, exactly what
SOURCES.md caveat 1 records; it is then assigned to Chauhan 2021 by the
inference stated there (its 1/2<111> partner, same 6.2 nm, is Chauhan), and
the assumption is printed at run time. Fix the merge range to retire this.
Definition at line 140 of file make_dose_figures.py.