T to each a by making a ⋆ 0 and a coincide. We then produce several copies by spinning these bases around their fixed vector a. We rank these produced bases and choose the most promising among them to get a set M of candidate bases. Both ranking strategies prefer candidates where the Laue condition is closer to being satisfied for more reciprocal spots. Finally, for each M ∈ M, we consider the Miller indices induced by M as a target for solving (2), i.e., we have |M| instances that we solve in parallel using our proposed robust estimation procedure of Algorithm 1. Among the solutions found, we report the one with the largest number of reciprocal spots for Q ⋆ and lower penalization (by using residual threshold annealing, we guarantee that the solutions are below the maximum allowed threshold). The penalization compares the shape of the final basis with the given M ⋆ 0 and gives high penalization if the length of the vectors or the angles differ by a large margin. Details on this last part of our algorithm can be found in Supplementary material.