From c32958e6bc6bb64d1a58bbd60ca6ce2ba801b548 Mon Sep 17 00:00:00 2001 From: Helen Ginn Date: Sun, 29 Apr 2018 18:55:04 +0200 Subject: Various comments throughout code --- libcrystfel/src/taketwo.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'libcrystfel') diff --git a/libcrystfel/src/taketwo.c b/libcrystfel/src/taketwo.c index 9d557fd2..7eb671ee 100644 --- a/libcrystfel/src/taketwo.c +++ b/libcrystfel/src/taketwo.c @@ -1037,6 +1037,7 @@ static signed int find_next_index(gsl_matrix *rot, int *obs_members, int all_ok = 1; int matched = -1; + /* Check all existing members are happy to let in the newcomer */ for ( j=0; j MAX_RECIP_DISTANCE) { continue; @@ -1331,9 +1333,9 @@ static int find_seeds(struct TakeTwoCell *cell, struct taketwo_private *tp) int seed_num = 0; struct Seed *seeds = NULL; - /* Check to see if any angles match from the cell vectors */ - obs_vecs_match_angles(i, j, - &seeds, &seed_num, cell); + /* Check to see if any angles match from the cell + * vectors */ + obs_vecs_match_angles(i, j, &seeds, &seed_num, cell); if (seed_num == 0) { @@ -1908,6 +1910,8 @@ static void cleanup_taketwo_obs_vecs(struct SpotVec *obs_vecs, static void cleanup_taketwo_cell(struct TakeTwoCell *ttCell) { + /* n.b. solutions in ttCell are taken care of in the + * partial taketwo cleanup. */ int i; for ( i=0; inumOps; i++ ) { gsl_matrix_free(ttCell->rotSymOps[i]); @@ -2003,6 +2007,8 @@ static UnitCell *run_taketwo(UnitCell *cell, const struct taketwo_options *opts, if ( !success ) return NULL; + /* Find all the seeds, then take each one and extend them, returning + * a solution if it exceeds the NETWORK_MEMBER_THRESHOLD. */ find_seeds(&ttCell, tp); remove_old_solutions(&ttCell, tp); start_seeds(&solution, &ttCell); @@ -2011,8 +2017,8 @@ static UnitCell *run_taketwo(UnitCell *cell, const struct taketwo_options *opts, return NULL; } + /* If we have a solution, refine against vectors in the entire image */ ttCell.solution = solution; - match_all_obs_to_sol(&ttCell); refine_solution(&ttCell); solution = ttCell.solution; -- cgit v1.2.3