aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-10-15 15:19:35 +0200
committerThomas White <taw@physics.org>2020-10-15 15:19:35 +0200
commit186a05e946f13d56ba23c58e67946b0531aa9095 (patch)
treee09e427d7457f5ed22ae897b04f1cf8d89df8070 /libcrystfel
parentbccf6547a6efb77e2564562af1daf25136283ac5 (diff)
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.
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/indexers/taketwo.c9
1 files 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<seed_num; k++ ) {
int seed_idx1 = seeds[k].idx1;
int seed_idx2 = seeds[k].idx2;