aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/index.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2016-01-13 00:49:10 +0100
committerThomas White <taw@physics.org>2016-01-13 00:49:10 +0100
commit351226f9df1f274729bbe486b70c2caa2e6756bc (patch)
tree64134318e64f350dd9b557a508512345b2b1fad5 /libcrystfel/src/index.c
parent3df3322433fd3e4532d90ec2d1771a1be5babd4b (diff)
Fix logic for -retry and -multi
Diffstat (limited to 'libcrystfel/src/index.c')
-rw-r--r--libcrystfel/src/index.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libcrystfel/src/index.c b/libcrystfel/src/index.c
index af5b81c7..79fa4c3f 100644
--- a/libcrystfel/src/index.c
+++ b/libcrystfel/src/index.c
@@ -408,16 +408,22 @@ void index_pattern(struct image *image,
int done = 0;
int r;
int ntry = 0;
+ int success = 0;
do {
r = try_indexer(image, indms[n], iprivs[n]);
+ success += r;
ntry++;
done = finished_retry(indms[n], r, image);
if ( ntry > 5 ) done = 1;
} while ( !done );
+ /* Stop now if the pattern is indexed (don't try again for more
+ * crystals with a different indexing method) */
+ if ( success ) break;
+
n++;
}