cctbx / cctbx_project

Computational Crystallography Toolbox
https://cci.lbl.gov/docs/cctbx
Other
210 stars 111 forks source link

experiment_filter: add ability to exclude cells matching a cluster #847

Closed dwpaley closed 1 year ago

dwpaley commented 1 year ago

This is motivated by the use case where a pseudomerohedral indexing ambiguity is resolved by unit cell clustering and manual reindexing. For example: for an orthorhombic unit cell 100 x 102 x 150 A, there is a pseudomerohedral indexing ambiguity around the rotation axis a+b. The misindexed lattices will cluster around 102 x 100 x 150 A. If the clusters are separable, then this is resolved by separately isolating the second cluster and reindexing it with modify_reindex_to_reference, then merging both clusters (which are now indexed consistently).

The skip_component parameter is needed because this approach fails if an experiment belongs to both components and thus appears twice in the final merge. Therefore when we isolate component 1, we exclude any experiment that also matches component 0.