[cctbxbb] Unstable platform-dependent sort order for flex.sort_permutation

Luc Bourhis luc_j_bourhis at mac.com
Fri Nov 18 08:36:18 PST 2016


>> The permutations would lead to the same sequence of miller indices, but in the context of an unmerged reflection array (i.e. miller.array.sort_permutation), then the data associated with those miller indices would not necessarily be in the same order. As the dataset is then split into two half-datasets, this difference in sort order leads to a different value of the calculate correlation coefficient between those two half datasets:

>  I guess you need to extend it to also use the reflection intensity in the comparator if you really need reproducible sets :).

Interesting question! The simplest solution is definitively that advocated by Nick, stable sort. But that is arbitrary as far as the intensities are concerned to keep the order of the indices, especially since that indices order is most surely quite arbitrary in the first place. Sorting first on the indices and then on the intensities: is that any less arbitrary to compute the correlation?




More information about the cctbxbb mailing list