diff options
author | Alexandra Tolstikova <alexandra.tolstikova@desy.de> | 2015-06-18 14:19:20 +0200 |
---|---|---|
committer | Alexandra Tolstikova <alexandra.tolstikova@desy.de> | 2015-06-18 14:19:20 +0200 |
commit | 091e3378a95edab85a6c655629df4270fb041b04 (patch) | |
tree | c6ac9c7ba5199e9bf3b73880839cf07a3ec2bd34 /libcrystfel/src/asdf.c | |
parent | 704d778287ea73543cf0c7c7a32de97a818b6a09 (diff) |
Fix bug in cell refinement
Diffstat (limited to 'libcrystfel/src/asdf.c')
-rw-r--r-- | libcrystfel/src/asdf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libcrystfel/src/asdf.c b/libcrystfel/src/asdf.c index 49d87d92..d28fcf6a 100644 --- a/libcrystfel/src/asdf.c +++ b/libcrystfel/src/asdf.c @@ -778,13 +778,13 @@ static int create_cell(struct tvector tvec1, struct tvector tvec2, /* Index reflections with new cell axes */ check_refl_fitting_cell(c, reflections, N_reflections, IndexFit); - if ( c->n < 6 ) return 0; /* Refine cell until the number of fitting * reflections stops increasing */ int n = 0; int cell_correct = 1; - while ( c->n - n && cell_correct ) { + while ( c->n - n > 0 && cell_correct ) { + n = c->n; cell_correct = refine_asdf_cell(c, reflections, N_reflections, IndexFit); |