aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-11-13 11:11:14 +0100
committerThomas White <taw@physics.org>2019-11-13 11:11:14 +0100
commit095bd6bb86b893c61a238f343765d04d3fb038a4 (patch)
tree9b62fbbdf72c2bcddf213213687fc9d263ddfb1f
parentf07d4483a2fe86750e1479c311cfaa942bb848de (diff)
Fix peak check logic for multiple crystals
It seems that the code wasn't properly updated when multi-crystal indexing was introducted. This "continue" statement didn't do anything.
-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;
}