From 0358ad008302c93675089f0265a68e6e1997da93 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 26 Jan 2011 14:08:01 +0100 Subject: indexamajig: Remove "--check-sanity" option Why wouldn't you want sane results? --- src/index.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/index.c') diff --git a/src/index.c b/src/index.c index 23a8016a..e3926c8e 100644 --- a/src/index.c +++ b/src/index.c @@ -200,12 +200,19 @@ void index_pattern(struct image *image, UnitCell *cell, IndexingMethod *indm, break; } - image->indexed_cell = new_cell; - if ( new_cell != NULL ) { - STATUS("Matched on attempt %i.\n", i); + /* No cell? Move on to the next method */ + if ( new_cell == NULL ) { + goto done; + } + + /* Sanity check */ + if ( !peak_sanity_check(image, new_cell, 0, 0.1) ) { + STATUS("Failed peak sanity check.\n"); goto done; } + image->indexed_cell = new_cell; + } /* Move on to the next indexing method */ -- cgit v1.2.3