From 98fbe0c2c9f26c1b681837475b202a2e9cbf67ca Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Wed, 14 Oct 2026 14:58:34 +0200 Subject: [PATCH] PROTOTYPE: the min-pix 1 search gate applies only to de-novo indexing With a known cell the min-pix 1 list is searched again whatever the min-pix 2 list holds. On sparse serial data the frames with almost no spot of two pixels are real hits: a weakly diffracting hexagonal run (20000 frames, -C -S) lost half its indexed frames and observations to the gate (6.5 -> 3.4%, 273k -> 120k observations, CC1/2 .83 -> .74); with the gate off for a known cell it matches the original scheme (6.5%, 274k, .83). De novo the gate stays: there the cells a free search fits to single pixels were unrelated to the crystal's. Co-Authored-By: Claude Opus 5.5 (1M context) --- image_analysis/MXAnalysisWithoutFPGA.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/image_analysis/MXAnalysisWithoutFPGA.cpp b/image_analysis/MXAnalysisWithoutFPGA.cpp index 5411e0942..67a29a0ea 100644 --- a/image_analysis/MXAnalysisWithoutFPGA.cpp +++ b/image_analysis/MXAnalysisWithoutFPGA.cpp @@ -253,10 +253,11 @@ void MXAnalysisWithoutFPGA::Analyze(DataMessage &output, // n_indexed^2 / n_total (indexed count weighted by indexed fraction) together with its spot // list, and integrate that one. The lattice is searched for once per frame: the first list // it is found on hands it to the others, which only refine and score it (FrameIndexerCalls). - // The min-pix 1 list is not searched where the min-pix 2 list holds fewer spots than a - // lattice needs: such a frame has (almost) no spot of two pixels, and the lattices a search - // fits to its single pixels were measured to be spurious - de novo, cells unrelated to the - // crystal's; against a known cell, frames that add nothing to the merge. + // De novo, the min-pix 1 list is not searched where the min-pix 2 list holds fewer spots than + // a lattice needs: such a frame has (almost) no spot of two pixels, and the cells a free search + // fits to its single pixels were measured to be unrelated to the crystal's. Against a known + // cell it is searched: on sparse serial data those frames are real hits (measured - leaving + // them out halved the observations of a weakly diffracting run). const auto detect_start_time = std::chrono::steady_clock::now(); finder.Detect(*preprocessor_buffer, spot_finding_settings); const auto &components = finder.ExtractComponents(*preprocessor_buffer, spot_finding_settings); @@ -282,7 +283,7 @@ void MXAnalysisWithoutFPGA::Analyze(DataMessage &output, mp2_spot_count = std::count_if(output.spots.begin(), output.spots.end(), [&](const auto &spot) { return experiment.GetIndexingSettings().GetIndexIceRings() || !spot.ice_ring; }); - if (mp == 1 && !frame_calls.lattice_found + if (mp == 1 && !frame_calls.lattice_found && !experiment.GetUnitCell().has_value() && mp2_spot_count < experiment.GetIndexingSettings().GetViableCellMinSpots()) continue; const bool indexed = indexer.IndexFrameOnly(output, s, &frame_calls);