diff options
-rw-r--r-- | libcrystfel/src/cell-utils.c | 12 | ||||
-rw-r--r-- | libcrystfel/src/cell-utils.h | 2 | ||||
-rw-r--r-- | src/cell_tool.c | 6 |
3 files changed, 10 insertions, 10 deletions
diff --git a/libcrystfel/src/cell-utils.c b/libcrystfel/src/cell-utils.c index da1e6fd5..a21ae570 100644 --- a/libcrystfel/src/cell-utils.c +++ b/libcrystfel/src/cell-utils.c @@ -3,13 +3,13 @@ * * Unit Cell utility functions * - * Copyright © 2012-2017 Deutsches Elektronen-Synchrotron DESY, + * Copyright © 2012-2019 Deutsches Elektronen-Synchrotron DESY, * a research centre of the Helmholtz Association. * Copyright © 2012 Lorenzo Galli * * Authors: - * 2009-2012,2014-2017 Thomas White <taw@physics.org> - * 2012 Lorenzo Galli + * 2009-2019 Thomas White <taw@physics.org> + * 2012 Lorenzo Galli * * This file is part of CrystFEL. * @@ -1647,9 +1647,9 @@ int compare_cell_parameters(UnitCell *cell1, UnitCell *cell2, cell_get_parameters(cell1, &a1, &b1, &c1, &al1, &be1, &ga1); cell_get_parameters(cell2, &a2, &b2, &c2, &al2, &be2, &ga2); - if ( !within_tolerance(a1, a2, ltl) ) return 0; - if ( !within_tolerance(b1, b2, ltl) ) return 0; - if ( !within_tolerance(c1, c2, ltl) ) return 0; + if ( !within_tolerance(a1, a2, ltl*100.0) ) return 0; + if ( !within_tolerance(b1, b2, ltl*100.0) ) return 0; + if ( !within_tolerance(c1, c2, ltl*100.0) ) return 0; if ( fabs(al1-al2) > atl ) return 0; if ( fabs(be1-be2) > atl ) return 0; if ( fabs(ga1-ga2) > atl ) return 0; diff --git a/libcrystfel/src/cell-utils.h b/libcrystfel/src/cell-utils.h index 1a4f3bcc..a1a6fd46 100644 --- a/libcrystfel/src/cell-utils.h +++ b/libcrystfel/src/cell-utils.h @@ -3,7 +3,7 @@ * * Unit Cell utility functions * - * Copyright © 2012-2018 Deutsches Elektronen-Synchrotron DESY, + * Copyright © 2012-2019 Deutsches Elektronen-Synchrotron DESY, * a research centre of the Helmholtz Association. * Copyright © 2012 Lorenzo Galli * diff --git a/src/cell_tool.c b/src/cell_tool.c index b48b538e..03c58f5e 100644 --- a/src/cell_tool.c +++ b/src/cell_tool.c @@ -400,8 +400,8 @@ int main(int argc, char *argv[]) char *cell_file = NULL; UnitCell *cell; char *toler = NULL; - float ltl = 5.0; /* in percent */ - float atl = deg2rad(1.5); + float ltl = 0.05; /* fraction */ + float atl = deg2rad(1.5); /* radians */ char *sym_str = NULL; SymOpList *sym = NULL; int mode = CT_NOTHING; @@ -518,7 +518,7 @@ int main(int argc, char *argv[]) ERROR("Invalid parameters for --tolerance\n"); return 1; } - /* ltl stays in percent */ + ltl /= 100.0; /* percent to fraction */ atl = deg2rad(atl); free(toler); } |