Recall that for each q ∈ Q ⋆ , v q = (h q , k q , l q ) denotes the true Miller indices of q. The goal of our sampling strategy is to construct candidates basis being rotations of M ⋆ 0 such that at least for one of them, the induced Miller indices of this basis mostly coincide with the true Miller indices of Q ⋆ . That is, we want to sample a basis M such that ROUND( M q) = v q for most reciprocal spots q ∈ Q ⋆ . If that were the case, then these induced Miller indices play the role of the oracle, and by running the proposed robust estimation procedure on them, the optimization will succeed in solving the indexing problem. The larger the number of candidate samples we take, the higher the chances of obtaining such M , but the higher the computational cost. 0 is attached to it by making a and a ⋆ 0 coincide. Then M ⋆ 0 is rotated around the axis defined by a. Snapshots are stored every predefined number of degrees producing a set of rotated copies of M ⋆ 0 being the basis samples that correspond to a.