diff options
Diffstat (limited to 'libcrystfel/src')
-rw-r--r-- | libcrystfel/src/reax.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/libcrystfel/src/reax.c b/libcrystfel/src/reax.c index 45ec7f99..4f12075e 100644 --- a/libcrystfel/src/reax.c +++ b/libcrystfel/src/reax.c @@ -154,22 +154,21 @@ static void add_candidate(struct reax_search_v *s, struct dvec *dir, size_t ns; int i, cpos; + cpos = s->n_cand; for ( i=0; i<s->n_cand; i++ ) { - if ( fom > s->cand[i].fom ) { - cshift = s->cand[i]; - s->cand[i].v.x = dir->x*peak_mod; - s->cand[i].v.y = dir->y*peak_mod; - s->cand[i].v.z = dir->z*peak_mod; - s->cand[i].v.th = dir->th; - s->cand[i].v.ph = dir->ph; - s->cand[i].fom = fom; cpos = i; break; } - } + cshift.v.x = dir->x*peak_mod; + cshift.v.y = dir->y*peak_mod; + cshift.v.z = dir->z*peak_mod; + cshift.v.th = dir->th; + cshift.v.ph = dir->ph; + cshift.fom = fom; + for ( i=cpos; i<s->n_cand; i++ ) { struct reax_candidate cshift2; |