aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2024-05-14 14:09:24 +0200
committerThomas White <taw@physics.org>2024-05-14 14:09:24 +0200
commite2c8dab1f0d6747c79d7e9cd8318695f4e3fff3a (patch)
treedd992c950f87b35853158fe762275d3b00842ba2
parentf38099fe25fc0b32a17885a23b43134731541ac2 (diff)
compare_reindexed_cell_parameters: Small logic fix
I was trying to be too clever. The old version breaks if the G6 distance is exactly zero, which happens e.g. in one of the unit tests.
-rw-r--r--libcrystfel/src/cell-utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libcrystfel/src/cell-utils.c b/libcrystfel/src/cell-utils.c
index 80cdd955..a25accbc 100644
--- a/libcrystfel/src/cell-utils.c
+++ b/libcrystfel/src/cell-utils.c
@@ -2245,9 +2245,9 @@ static IntegerMatrix *check_permutations(UnitCell *cell_reduced, UnitCell *refer
best_diff = diff;
n_best = 0;
- }
+ best_m[n_best++] = intmat_copy(m);
- if ( diff < 1.001*best_diff ) {
+ } else if ( diff < 1.001*best_diff ) {
/* If the new solution is the same as the
* previous one, add it to the list */