aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/taketwo.c
diff options
context:
space:
mode:
authorHelen Ginn <helen@strubi.ox.ac.uk>2018-04-27 22:29:03 +0200
committerThomas White <taw@physics.org>2018-05-02 09:46:14 +0200
commitc7d9278a28efb9c0f7166167c1848f339864778b (patch)
treeb22661c00b741460bb300126c17c41c465761dce /libcrystfel/src/taketwo.c
parentbe84751456dfd993472f64994cb26542b272dbb6 (diff)
Give up if seed count already high
Diffstat (limited to 'libcrystfel/src/taketwo.c')
-rw-r--r--libcrystfel/src/taketwo.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/libcrystfel/src/taketwo.c b/libcrystfel/src/taketwo.c
index 293d9551..0cf1aeb6 100644
--- a/libcrystfel/src/taketwo.c
+++ b/libcrystfel/src/taketwo.c
@@ -1323,14 +1323,20 @@ static int find_seeds(struct TakeTwoCell *cell, struct taketwo_private *tp)
cell->seeds[cell->seed_count] = seeds[i];
cell->seed_count++;
}
+
+ if (cell->seed_count > 1000) {
+ break;
+ }
}
+
+ if (cell->seed_count > 1000) {
+ break;
+ }
+
}
qsort(cell->seeds, cell->seed_count, sizeof(struct Seed), sort_seed_by_score);
- if (cell->seed_count > 1000) {
- cell->seed_count = 1000;
- }
return 1;
}