From c7d9278a28efb9c0f7166167c1848f339864778b Mon Sep 17 00:00:00 2001 From: Helen Ginn Date: Fri, 27 Apr 2018 22:29:03 +0200 Subject: Give up if seed count already high --- libcrystfel/src/taketwo.c | 12 +++++++++--- 1 file 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; } -- cgit v1.2.3