From 704d778287ea73543cf0c7c7a32de97a818b6a09 Mon Sep 17 00:00:00 2001 From: Alexandra Tolstikova Date: Wed, 17 Jun 2015 18:08:07 +0200 Subject: Check c->n after cell reduction --- libcrystfel/src/asdf.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'libcrystfel/src') diff --git a/libcrystfel/src/asdf.c b/libcrystfel/src/asdf.c index da12e3c1..49d87d92 100644 --- a/libcrystfel/src/asdf.c +++ b/libcrystfel/src/asdf.c @@ -545,7 +545,7 @@ static int refine_asdf_cell(struct asdf_cell *c, gsl_vector **reflections, gsl_vector *r[] = {gsl_vector_alloc(c->n), gsl_vector_alloc(c->n), gsl_vector_alloc(c->n)}; - + gsl_vector *res = gsl_vector_alloc(3); gsl_matrix *cov = gsl_matrix_alloc (3, 3); double chisq; @@ -778,7 +778,8 @@ 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; @@ -1053,7 +1054,7 @@ static int index_refls(gsl_vector **reflections, int N_reflections, int run_asdf(struct image *image, IndexingPrivate *ipriv) -{ +{ int i, j; double LevelFit = 1./1000; -- cgit v1.2.3