diff --git a/image_analysis/RotationIndexer.cpp b/image_analysis/RotationIndexer.cpp index 73fc6b97..79eaa892 100644 --- a/image_analysis/RotationIndexer.cpp +++ b/image_analysis/RotationIndexer.cpp @@ -88,7 +88,7 @@ void RotationIndexer::TryIndex() { .crystal_system = search_result_.system, .min_spots = experiment.GetIndexingSettings().GetViableCellMinSpots(), .refine_beam_center = true, - .refine_distance_mm = true, + .refine_distance_mm = false, .axis = axis_ }; @@ -125,8 +125,12 @@ std::optional RotationIndexer::ProcessImage(int64_t image accumulated_images++; last_accumulated_image = image; - if (!indexed_lattice && accumulated_images >= min_images_for_indexing && image >= first_image_to_try_indexing) + if (!indexed_lattice && accumulated_images >= min_images_for_indexing && image >= first_image_to_try_indexing) { TryIndex(); + // If fails - only try reindexing at the end, as it is very expensive operation (atm) + if (!indexed_lattice) + first_image_to_try_indexing = INT64_MAX; + } } if (indexed_lattice) {