From 6e277668b65851d2f50cba66da8ea784a247b4c5 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Sat, 18 Jul 2026 22:08:18 +0200 Subject: [PATCH] rugnux: header line for the per-image _image.dat scaling table The offline per-image scaling table had bare numeric columns. Prefix it with a '#' comment header (image_number scale_G bfactor_Ang2 mosaicity_deg wedge_deg cc_to_merge cc_n) so it is self-describing; numpy.loadtxt / gnuplot skip the comment line, so existing consumers are unaffected. Co-Authored-By: Claude Opus 4.8 (1M context) --- image_analysis/scale_merge/ScalingResult.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/image_analysis/scale_merge/ScalingResult.cpp b/image_analysis/scale_merge/ScalingResult.cpp index c01b88e5..83874371 100644 --- a/image_analysis/scale_merge/ScalingResult.cpp +++ b/image_analysis/scale_merge/ScalingResult.cpp @@ -40,6 +40,9 @@ void ScalingResult::SaveToFile(const std::string &filename) { "Cannot open " + img_path + " for writing"); } + // Header so the columns are self-describing (lines starting with '#' are comments for gnuplot/numpy). + img_file << "# image_number scale_G bfactor_Ang2 mosaicity_deg wedge_deg cc_to_merge cc_n\n"; + for (size_t i = 0; i < image_scale_g.size(); ++i) { img_file << i << " " << image_scale_g[i]