aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src
diff options
context:
space:
mode:
Diffstat (limited to 'libcrystfel/src')
-rw-r--r--libcrystfel/src/peaks.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libcrystfel/src/peaks.c b/libcrystfel/src/peaks.c
index ea524210..cd65a0c7 100644
--- a/libcrystfel/src/peaks.c
+++ b/libcrystfel/src/peaks.c
@@ -701,6 +701,7 @@ int indexing_peak_check(struct image *image, Crystal **crystals, int n_cryst,
struct rvec q;
double h,k,l,hd,kd,ld;
int j;
+ int ok = 0;
/* Assume all image "features" are genuine peaks */
f = image_get_feature(image->features, i);
@@ -736,12 +737,13 @@ int indexing_peak_check(struct image *image, Crystal **crystals, int n_cryst,
&& (fabs(k - kd) < min_dist)
&& (fabs(l - ld) < min_dist) )
{
- n_sane++;
- continue;
+ ok = 1;
+ break; /* Don't need to check other crystals */
}
}
+ n_sane += ok;
}