From 2d118f6df18bbc75934f25f3a5bb9ac4ecd7cd9c Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Wed, 14 Oct 2026 12:14:25 +0200 Subject: [PATCH] stills merge export: French-Wilson and free-R flags on the merge's workers, output unchanged ExportReflections ran French-Wilson single-threaded: about 1 s on the P1 search merge of a 25k-frame stills run (180k reflections). It now uses the merge's thread count, as AssignRfreeFlags does; both give the same result at any worker count by construction. mtz/unmerged-mtz data, hkl, cif and report identical (--mode scale, 25k-frame XFEL run). Co-Authored-By: Claude Opus 5.5 (1M context) --- image_analysis/scale_merge/Merge.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/image_analysis/scale_merge/Merge.cpp b/image_analysis/scale_merge/Merge.cpp index 4f72271c7..039924825 100644 --- a/image_analysis/scale_merge/Merge.cpp +++ b/image_analysis/scale_merge/Merge.cpp @@ -462,8 +462,10 @@ std::vector MergeOnTheFly::ExportIntensities() { std::vector MergeOnTheFly::ExportReflections() { auto out = ExportIntensities(); - AssignRfreeFlags(out, space_group, scaling_settings.GetRfreeFraction(), 500, reference_cell); - ApplyFrenchWilson(out, space_group); + AssignRfreeFlags(out, space_group, scaling_settings.GetRfreeFraction(), 500, reference_cell, nthreads); + FrenchWilsonOptions fw_opts; + fw_opts.num_threads = static_cast(nthreads); // the same amplitudes at any worker count + ApplyFrenchWilson(out, space_group, fw_opts); return out; }