aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-09-16 16:51:01 +0200
committerThomas White <taw@physics.org>2019-09-16 16:51:01 +0200
commit0baa4ee4a66888f907fdbfd45eb6d2aa1ca3dfd2 (patch)
tree0271751bac4380ff1e1b1da6da202dda3188876e
parent35ee4fcebf8ed5a1affc71f3db19958c96761e3f (diff)
Fix cell comparison logic
-rw-r--r--libcrystfel/src/index.c1
-rw-r--r--libcrystfel/src/index.h2
-rw-r--r--src/indexamajig.c2
3 files changed, 3 insertions, 2 deletions
diff --git a/libcrystfel/src/index.c b/libcrystfel/src/index.c
index 4c82e868..f6e81109 100644
--- a/libcrystfel/src/index.c
+++ b/libcrystfel/src/index.c
@@ -543,6 +543,7 @@ static int check_cell(IndexingFlags flags, Crystal *cr, UnitCell *target,
tolerance, &rm);
if ( out != NULL ) {
+ /* Replace crystal's cell with new one */
cell_free(crystal_get_cell(cr));
crystal_set_cell(cr, out);
rtnl_mtx_free(rm);
diff --git a/libcrystfel/src/index.h b/libcrystfel/src/index.h
index ec7ed61b..eb5cf7e4 100644
--- a/libcrystfel/src/index.h
+++ b/libcrystfel/src/index.h
@@ -122,7 +122,7 @@ typedef enum {
INDEXING_CHECK_PEAKS = 32,
/** Check that the unit cell agrees with the target cell */
- INDEXING_CHECK_CELL = 32,
+ INDEXING_CHECK_CELL = 64,
} IndexingFlags;
diff --git a/src/indexamajig.c b/src/indexamajig.c
index bd159a9a..b50858ab 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -1243,7 +1243,7 @@ int main(int argc, char *argv[])
}
if ( !if_nocheck ) {
- flags &= INDEXING_CHECK_CELL;
+ flags |= INDEXING_CHECK_CELL;
}
if ( if_refine ) {