Notice that if we are given an arbitrary rotation of M ⋆ 0 , say M ′ , it induces a set of possible Miller indices for the reciprocal spots of Q by considering the set {round(M q) : q ∈ Q} ⊂ Z 3 . Recall that for each q ∈ Q * , v q = (h q , k q , l q ) denotes the true set of 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 coincides 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 by running our robust optimization on each candidate basis, the optimization will succeed in solving the indexing problem for M .