From e6ea30ea4c3f3f8da95690e4d015144e30e406d2 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 26 Mar 2019 14:45:52 +0100 Subject: Fix order of matrix operations in compare_reindexed_cell_parameters() --- libcrystfel/src/cell-utils.c | 67 ++++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 34 deletions(-) (limited to 'libcrystfel') diff --git a/libcrystfel/src/cell-utils.c b/libcrystfel/src/cell-utils.c index a36ebe1c..8e37240a 100644 --- a/libcrystfel/src/cell-utils.c +++ b/libcrystfel/src/cell-utils.c @@ -2007,7 +2007,7 @@ int compare_reindexed_cell_parameters(UnitCell *cell_in, UnitCell *reference_in, IntegerMatrix *CBint; RationalMatrix *CiA; RationalMatrix *CB; - RationalMatrix *m; + RationalMatrix *M; double a, b, c, al, be, ga; double av[3], bv[3], cv[3]; Rational *cand_a; @@ -2015,8 +2015,8 @@ int compare_reindexed_cell_parameters(UnitCell *cell_in, UnitCell *reference_in, Rational *cand_c; int ncand_a, ncand_b, ncand_c; int ia, ib; - RationalMatrix *MCiA; - RationalMatrix *CBMCiA; + RationalMatrix *MCB; + RationalMatrix *CiAMCB; double min_dist = +INFINITY; /* Actually compare against primitive version of reference */ @@ -2040,9 +2040,9 @@ int compare_reindexed_cell_parameters(UnitCell *cell_in, UnitCell *reference_in, cand_b = find_candidates(b, av, bv, cv, ltl, &ncand_b); cand_c = find_candidates(c, av, bv, cv, ltl, &ncand_c); - m = rtnl_mtx_new(3, 3); - MCiA = rtnl_mtx_new(3, 3); - CBMCiA = rtnl_mtx_new(3, 3); + M = rtnl_mtx_new(3, 3); + MCB = rtnl_mtx_new(3, 3); + CiAMCB = rtnl_mtx_new(3, 3); for ( ia=0; ia atl ) continue; @@ -2071,19 +2071,19 @@ int compare_reindexed_cell_parameters(UnitCell *cell_in, UnitCell *reference_in, /* Gamma OK, now look for place for c axis */ for ( ic=0; ic