diff options
author | Lorenzo Galli <gallil@cfelsgi.desy.de> | 2012-02-20 14:57:02 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:45 +0100 |
commit | f017522931d7704dde09416473dfcfa5de629f4d (patch) | |
tree | 0e8ad4f6cf5e63086dcec41b4ed252d90b6d03c2 /libcrystfel/src/cell.c | |
parent | 30b0fffa60b00b48fc42bc75a9f8dcce8db7a4fc (diff) |
Added "--tolerance" option in indexamajig
Diffstat (limited to 'libcrystfel/src/cell.c')
-rw-r--r-- | libcrystfel/src/cell.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libcrystfel/src/cell.c b/libcrystfel/src/cell.c index c31697bc..a6df931b 100644 --- a/libcrystfel/src/cell.c +++ b/libcrystfel/src/cell.c @@ -669,7 +669,7 @@ static int same_vector(struct cvec a, struct cvec b) /* Attempt to make 'cell' fit into 'template' somehow */ UnitCell *match_cell(UnitCell *cell, UnitCell *template, int verbose, - int reduce) + float *tols, int reduce) { signed int n1l, n2l, n3l; double asx, asy, asz; @@ -683,8 +683,7 @@ UnitCell *match_cell(UnitCell *cell, UnitCell *template, int verbose, float best_fom = +999999999.9; /* Large number.. */ int ncand[3] = {0,0,0}; signed int ilow, ihigh; - float ltl = 5.0; /* percent */ - float angtol = deg2rad(1.5); + float angtol = deg2rad(tols[3]); if ( cell_get_reciprocal(template, &asx, &asy, &asz, &bsx, &bsy, &bsz, @@ -753,7 +752,7 @@ UnitCell *match_cell(UnitCell *cell, UnitCell *template, int verbose, /* Test modulus for agreement with moduli of template */ for ( i=0; i<3; i++ ) { - if ( !within_tolerance(lengths[i], tlen, ltl) ) + if ( !within_tolerance(lengths[i], tlen, tols[i]) ) continue; cand[i][ncand[i]].vec.u = tx; |