aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-08-08 11:05:52 +0200
committerThomas White <taw@physics.org>2019-08-16 10:27:00 +0200
commitfde5da00b76d0ae0d3d71b2596f9b4354ba9ff89 (patch)
treeff283f8721c12d3a3c4cd8e848620c5fa3d68a15 /libcrystfel/src
parentf6c9932aa1b41e36178a2471e6728c04fb45289a (diff)
compare_permuted_cell_parameters{_and_orientation}: Accept wrong-handed cell
Diffstat (limited to 'libcrystfel/src')
-rw-r--r--libcrystfel/src/cell-utils.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libcrystfel/src/cell-utils.c b/libcrystfel/src/cell-utils.c
index 2580f3fb..b207afe7 100644
--- a/libcrystfel/src/cell-utils.c
+++ b/libcrystfel/src/cell-utils.c
@@ -1811,12 +1811,14 @@ int compare_permuted_cell_parameters_and_orientation(UnitCell *cell,
UnitCell *nc;
int j, k;
int l = 0;
+ signed int det;
for ( j=0; j<3; j++ )
for ( k=0; k<3; k++ )
intmat_set(m, j, k, i[l++]);
- if ( intmat_det(m) != +1 ) continue;
+ det = intmat_det(m);
+ if ( (det != +1) && (det != -1) ) continue;
nc = cell_transform_intmat(cell, m);
@@ -2179,12 +2181,14 @@ int compare_permuted_cell_parameters(UnitCell *cell, UnitCell *reference,
UnitCell *test;
int j, k;
int l = 0;
+ signed int det;
for ( j=0; j<3; j++ )
for ( k=0; k<3; k++ )
intmat_set(m, j, k, i[l++]);
- if ( intmat_det(m) != +1 ) continue;
+ det = intmat_det(m);
+ if ( (det != +1) && (det != -1) ) continue;
test = cell_transform_intmat(cell, m);