From 626f7abc30d9036951e82b1dc7c9a3863ded4e63 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Tue, 27 Jan 2026 10:17:10 +0100 Subject: [PATCH] IndexAndRefine: Work in progress to understand why rotation indexing doesn't work --- image_analysis/IndexAndRefine.cpp | 12 ++++++++---- tools/jfjoch_process.cpp | 1 - 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/image_analysis/IndexAndRefine.cpp b/image_analysis/IndexAndRefine.cpp index 891c9e17..c7259e1f 100644 --- a/image_analysis/IndexAndRefine.cpp +++ b/image_analysis/IndexAndRefine.cpp @@ -35,10 +35,10 @@ IndexAndRefine::IndexingOutcome IndexAndRefine::DetermineLatticeAndSymmetry(Data } outcome.experiment.BeamX_pxl(result->geom.GetBeamX_pxl()) - .BeamY_pxl(result->geom.GetBeamY_pxl()) - .DetectorDistance_mm(result->geom.GetDetectorDistance_mm()) - .PoniRot1_rad(result->geom.GetPoniRot1_rad()) - .PoniRot2_rad(result->geom.GetPoniRot2_rad()); + .BeamY_pxl(result->geom.GetBeamY_pxl()) + .DetectorDistance_mm(result->geom.GetDetectorDistance_mm()) + .PoniRot1_rad(result->geom.GetPoniRot1_rad()) + .PoniRot2_rad(result->geom.GetPoniRot2_rad()); outcome.symmetry.centering = result->search_result.centering; outcome.symmetry.niggli_class = result->search_result.niggli_class; outcome.symmetry.crystal_system = result->search_result.system; @@ -99,9 +99,13 @@ void IndexAndRefine::RefineGeometryIfNeeded(DataMessage &msg, IndexAndRefine::In .min_spots = experiment.GetIndexingSettings().GetViableCellMinSpots(), .refine_beam_center = true, .refine_distance_mm = false, + .refine_detector_angles = false, .max_time = 0.04 // 40 ms is max allowed time for the operation }; + if (experiment.IsRotationIndexing()) + data.refine_beam_center = false; + if (outcome.symmetry.crystal_system == gemmi::CrystalSystem::Trigonal) data.crystal_system = gemmi::CrystalSystem::Hexagonal; diff --git a/tools/jfjoch_process.cpp b/tools/jfjoch_process.cpp index 5d3634b5..acc3f91c 100644 --- a/tools/jfjoch_process.cpp +++ b/tools/jfjoch_process.cpp @@ -133,7 +133,6 @@ int main(int argc, char **argv) { experiment.Mode(DetectorMode::Standard); // Ensure full image analysis experiment.PixelSigned(true); experiment.OverwriteExistingFiles(true); - experiment.PolarizationFactor(0.0); // Configure Indexing IndexingSettings indexing_settings;