Score T4 rows against the experimental bands in targets_T4.json.
WHY THIS IS NOT A ONE-LINER. The database reports what TEM measures: ONE loop
density and ONE mean diameter, over BOTH Burgers characters, above a detection
limit. The model reports the two populations separately and unfiltered. So the
comparison has to be built, not read off:
N_loop_total <- N_100_vis_1 + N_111_vis_1 (TEM-visible, d_min = 1 nm)
d_loop_mean <- number-weighted mean of d_100_nm and d_111_nm using those
SAME visible densities as weights
dominant BV <- f_100_tem_1 > 0.5 vs < 0.5
Using the raw N_loops_100 / N_loops_111 instead of the _vis_1 fields would
compare an unfiltered model against a filtered measurement, and the model's
1/2<111> population sits at ~0.8 nm -- entirely below the detection limit -- so
that error is worth a factor of several, not a few percent.
The diameter weighting is an APPROXIMATION: it weights each character's mean by
its visible count, which is right only if the within-character distributions do
not overlap the cutoff too strongly. It is the best available from the row
fields; the exact quantity would need the size distribution.
Usage:
python score_T4.py --rows <file.jsonl> [--targets targets_T4.json] [--top N]