aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/asdf.c
diff options
context:
space:
mode:
authorAlexandra Tolstikova <alexandra.tolstikova@desy.de>2015-06-18 14:19:20 +0200
committerAlexandra Tolstikova <alexandra.tolstikova@desy.de>2015-06-18 14:19:20 +0200
commit091e3378a95edab85a6c655629df4270fb041b04 (patch)
treec6ac9c7ba5199e9bf3b73880839cf07a3ec2bd34 /libcrystfel/src/asdf.c
parent704d778287ea73543cf0c7c7a32de97a818b6a09 (diff)
Fix bug in cell refinement
Diffstat (limited to 'libcrystfel/src/asdf.c')
-rw-r--r--libcrystfel/src/asdf.c4
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);