// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute // SPDX-License-Identifier: GPL-3.0-only #pragma once #include #include "../common/CrystalLattice.h" #include "../common/Coord.h" struct MultiLatticeSearchResult { Coord rotation_vector; // Rodrigues vector: axis * angle, magnitude == angle [rad] }; // Input: lattices assumed to describe the same crystal (same unit cell), differing // only by orientation, and describing non-overlapping sets of spots. // The first lattice is the reference. A subsequent lattice is kept only if its unit // cell matches the reference (within tolerances); for each kept lattice we find the // proper rotation R mapping reference -> lattice std::vector MultiLatticeSearch(const std::vector &lattices, float dist_tolerance = 0.03f, float angle_tolerance_deg = 3.0f);