From 186a05e946f13d56ba23c58e67946b0531aa9095 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 15 Oct 2020 15:19:35 +0200 Subject: TakeTwo: Limit number of seeds to 10, and reduce MAX_OBS_VECTORS to 300 This gives a huge speed improvement, without sacrificing very much in indexing rate. --- libcrystfel/src/indexers/taketwo.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libcrystfel/src/indexers/taketwo.c b/libcrystfel/src/indexers/taketwo.c index d54091c7..4243adcb 100644 --- a/libcrystfel/src/indexers/taketwo.c +++ b/libcrystfel/src/indexers/taketwo.c @@ -233,7 +233,10 @@ struct TakeTwoCell /* Maximum observed vectors before TakeTwo gives up and deals with * what is already there. */ -#define MAX_OBS_VECTORS 100000 +#define MAX_OBS_VECTORS 300 + +/* Maximum number of seeds to start from in start_seeds() */ +#define MAX_SEEDS 10 /* Tolerance for two angles to be considered the same */ #define ANGLE_TOLERANCE (deg2rad(0.6)) @@ -1577,10 +1580,12 @@ static unsigned int start_seeds(gsl_matrix **rotation, struct TakeTwoCell *cell) int member_num = 0; int max_members = 0; gsl_matrix *rot = NULL; + int k; + + if ( seed_num > MAX_SEEDS ) seed_num = MAX_SEEDS; /* We have seeds! Pass each of them through the seed-starter */ /* If a seed has the highest achieved membership, make note...*/ - int k; for ( k=0; k