From d6b4d3d274012054dde84d03e1b19ade7223c3c9 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 21 Jan 2016 14:58:26 +0100 Subject: Use a fresh copy of the peak list for each new indexing method --- libcrystfel/src/index.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libcrystfel') diff --git a/libcrystfel/src/index.c b/libcrystfel/src/index.c index 2c6780dd..2b84a621 100644 --- a/libcrystfel/src/index.c +++ b/libcrystfel/src/index.c @@ -392,7 +392,6 @@ void index_pattern(struct image *image, IndexingMethod *indms, IndexingPrivate **iprivs) { int n = 0; - ImageFeatureList *peaks; ImageFeatureList *orig; if ( indms == NULL ) return; @@ -401,9 +400,7 @@ void index_pattern(struct image *image, image->crystals = NULL; image->n_crystals = 0; - peaks = sort_peaks(image->features); orig = image->features; - image->features = peaks; while ( indms[n] != INDEXING_NONE ) { @@ -412,6 +409,8 @@ void index_pattern(struct image *image, int ntry = 0; int success = 0; + image->features = sort_peaks(orig); + do { r = try_indexer(image, indms[n], iprivs[n]); @@ -422,6 +421,8 @@ void index_pattern(struct image *image, } while ( !done ); + image_feature_list_free(image->features); + /* Stop now if the pattern is indexed (don't try again for more * crystals with a different indexing method) */ if ( success ) break; @@ -432,7 +433,6 @@ void index_pattern(struct image *image, image->indexed_by = indms[n]; image->features = orig; - image_feature_list_free(peaks); } -- cgit v1.2.3