diff options
author | Alexandra Tolstikova <alexandra.tolstikova@desy.de> | 2015-06-17 18:08:07 +0200 |
---|---|---|
committer | Alexandra Tolstikova <alexandra.tolstikova@desy.de> | 2015-06-17 18:08:07 +0200 |
commit | 704d778287ea73543cf0c7c7a32de97a818b6a09 (patch) | |
tree | d33496458534bf5df7f274bb268df095b4f1aa25 /libcrystfel/src | |
parent | 10e85f43e59949eec1c8a479b37b029d8d495c71 (diff) |
Check c->n after cell reduction
Diffstat (limited to 'libcrystfel/src')
-rw-r--r-- | libcrystfel/src/asdf.c | 7 |
1 files changed, 4 insertions, 3 deletions
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; |