From ffc5c1f5619a178e6619f5ac34b43ea9aec3cd0e Mon Sep 17 00:00:00 2001 From: leonarski_f Date: Thu, 14 May 2026 20:11:27 +0200 Subject: [PATCH] IndexAndRefine: Save scaled reflections --- image_analysis/IndexAndRefine.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/image_analysis/IndexAndRefine.cpp b/image_analysis/IndexAndRefine.cpp index 41d8d3f4..2eeb781e 100644 --- a/image_analysis/IndexAndRefine.cpp +++ b/image_analysis/IndexAndRefine.cpp @@ -220,11 +220,6 @@ void IndexAndRefine::QuickPredictAndIntegrate(DataMessage &msg, [](const Reflection& a, const Reflection& b) { return a.d < b.d; }); } - { - std::unique_lock ul(reflections_mutex); - reflections[msg.number] = refl_ret; // Image is not processed twice, so thread-safe in principle, but better safe than sorry :) - } - msg.reflections = std::move(refl_ret); CalcISigma(msg); @@ -233,6 +228,11 @@ void IndexAndRefine::QuickPredictAndIntegrate(DataMessage &msg, msg.integration_time_s = std::chrono::duration(integration_end_time - integration_start_time).count(); ScaleImage(msg); + + { + std::unique_lock ul(reflections_mutex); + reflections[msg.number] = msg.reflections; // Image is not processed twice, so thread-safe in principle, but better safe than sorry :) + } } void IndexAndRefine::ProcessImage(DataMessage &msg,