aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2024-04-22 16:26:33 +0200
committerThomas White <taw@physics.org>2024-04-22 16:26:33 +0200
commit3438527c657d898f76658b464f018a045861af85 (patch)
treef325f78684262b4089fa1c0b243a2fbe283ec8f9
parent2ec6a17ed01f09733c8d425f8197e533781a8f99 (diff)
asdf: Force cell to be right-handed after refinement
In some rare cases, the cell changes from right to left handed during the vector refinement stage of asdf, while ending up at an apparently correct indexing solution. This commit just flips the axis round when necessary, in the same way that asdf already does in an earlier stage. I haven't done a proper survey, but I can say that the image I used to isolate and test this issue had very low resolution while still being what we would call "indexable". The left-handed cells appeared for six out of the 12173 hits in that run, or slightly below 0.05%. So, it's rare but not totally impossible.
-rw-r--r--libcrystfel/src/indexers/asdf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libcrystfel/src/indexers/asdf.c b/libcrystfel/src/indexers/asdf.c
index 6cfd741a..c136efc1 100644
--- a/libcrystfel/src/indexers/asdf.c
+++ b/libcrystfel/src/indexers/asdf.c
@@ -577,6 +577,7 @@ static int refine_asdf_cell(struct asdf_cell *c, gsl_vector **reflections,
calc_reciprocal(c->reciprocal, c->axes);
+ force_right_handed(c);
double a[3];
for ( i = 0; i < 3; i++ ) {
a[i] = gsl_blas_dnrm2(c->axes[i]);