From 5f8e26e3dc82fda67050efc4ac7cc242175f5bad Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Sun, 8 Nov 2026 09:10:43 +0100 Subject: [PATCH] Lite receiver: no integration The Lite receiver indexes each image and no longer integrates, whatever the broker's quick_integration says: it calls the shared analysis with quick_integration off. Per-image reflections, integrated-reflection counts and B factors are left unset on this path, as on the FPGA one - integration is rugnux's. jfjoch_lite_perf_test loses -Q. JFJochReceiverLite checks that indexing happens and integration does not. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01HVeDQsU5a8AJUdJPgWevAK --- receiver/JFJochReceiverLite.cpp | 8 ++++++-- tests/JFJochReceiverLiteTest.cpp | 9 +++++++++ tools/jfjoch_lite_perf_test.cpp | 8 +------- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/receiver/JFJochReceiverLite.cpp b/receiver/JFJochReceiverLite.cpp index 4b7ea1c9e..edd7ad8bf 100644 --- a/receiver/JFJochReceiverLite.cpp +++ b/receiver/JFJochReceiverLite.cpp @@ -75,8 +75,12 @@ void JFJochReceiverLite::OnImage(uint32_t id, DataMessage &data_msg, std::chrono auto image_start_time = std::chrono::high_resolution_clock::now(); AzimuthalIntegrationProfile profile(*az_int_mapping); - if (analysis[id]) - analysis[id]->AnalyzeStreamImage(data_msg, profile, GetSpotFindingSettings()); + if (analysis[id]) { + // Indexing only: integration is rugnux's (live or offline), not the Lite receiver's. + SpotFindingSettings settings = GetSpotFindingSettings(); + settings.quick_integration = false; + analysis[id]->AnalyzeStreamImage(data_msg, profile, settings); + } auto image_end_time = std::chrono::high_resolution_clock::now(); std::chrono::duration image_duration = image_end_time - image_start_time; diff --git a/tests/JFJochReceiverLiteTest.cpp b/tests/JFJochReceiverLiteTest.cpp index f9a009729..570ae31bb 100644 --- a/tests/JFJochReceiverLiteTest.cpp +++ b/tests/JFJochReceiverLiteTest.cpp @@ -93,6 +93,7 @@ TEST_CASE("JFJochReceiverLite", "[JFJochReceiver]") { settings.max_pix_per_spot = 200; settings.high_resolution_limit = 2.0; settings.low_resolution_limit = 50.0; + settings.quick_integration = true; // asked for, and still not done service.SetSpotFindingSettings(settings); service.Indexing(experiment.GetIndexingSettings()); @@ -105,6 +106,14 @@ TEST_CASE("JFJochReceiverLite", "[JFJochReceiver]") { CHECK(receiver_out.status.images_sent == experiment.GetImageNum()); CHECK(!receiver_out.status.cancelled); + // The Lite receiver indexes each image and integrates none: integration is rugnux's. + REQUIRE(receiver_out.scan_result.images.size() == experiment.GetImageNum()); + for (const auto &i: receiver_out.scan_result.images) { + CHECK(i.uc.has_value()); + CHECK(!i.integrated_reflections.has_value()); + CHECK(!i.b_factor.has_value()); + } + // No progress value at the end of the measurement REQUIRE(!service.GetProgress().has_value()); diff --git a/tools/jfjoch_lite_perf_test.cpp b/tools/jfjoch_lite_perf_test.cpp index 8365b044f..dc29beeeb 100644 --- a/tools/jfjoch_lite_perf_test.cpp +++ b/tools/jfjoch_lite_perf_test.cpp @@ -22,7 +22,6 @@ void print_usage(Logger &logger) { logger.Info(" -X Indexing (none|fft|fftw|ffbidx), ffbidx is default"); logger.Info(" -t Indexing thread pool size (default: 4)"); logger.Info(" -f FFT indexing search vectors"); - logger.Info(" -Q Quick integration"); logger.Info(" -G Geometry refinement"); } @@ -41,7 +40,6 @@ int main(int argc, char **argv) { IndexingAlgorithmEnum indexing = IndexingAlgorithmEnum::FFBIDX; std::optional fft_num_vectors; uint16_t indexing_threads = 4; - bool quick_integrate = false; RegisterHDF5Filter(); @@ -51,7 +49,7 @@ int main(int argc, char **argv) { } int opt; - while ((opt = getopt(argc, argv, "N:P:i:F::QGvX:t:f:")) != -1) { + while ((opt = getopt(argc, argv, "N:P:i:F::GvX:t:f:")) != -1) { switch (opt) { case 'N': nthreads = atol(optarg); @@ -84,9 +82,6 @@ int main(int argc, char **argv) { else filename = "lite_perf_test"; break; - case 'Q': - quick_integrate = true; - break; case 'G': use_geom = true; break; @@ -185,7 +180,6 @@ int main(int argc, char **argv) { settings.max_pix_per_spot = 200; settings.high_resolution_limit = 2.0; settings.low_resolution_limit = 50.0; - settings.quick_integration = quick_integrate; service.SetSpotFindingSettings(settings); auto start_time = std::chrono::system_clock::now();