From c229a577b5c5578f1e83f8a6ee569bb5681524b9 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 13 Mar 2019 16:10:08 +0100 Subject: determine_centering: Check 1,1,1 in both directions The original centering must be able to provide a lattice point for 1,1,1 in the new centering. The new centering's 1,1,1 point must also map to a lattice point in the original centering. Note that it's no use checking 0,0,0, because it'll just be a load of zeroes. --- libcrystfel/src/cell.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libcrystfel/src/cell.c b/libcrystfel/src/cell.c index 1dcb6bfb..1e463bf7 100644 --- a/libcrystfel/src/cell.c +++ b/libcrystfel/src/cell.c @@ -801,6 +801,7 @@ static char determine_centering(RationalMatrix *P, char cen) check_point_bwd(P, &cmask, cen, CMASK_I, rtnl(1,2), rtnl(1,2), rtnl(1,2)); check_point_bwd(P, &cmask, cen, CMASK_H, rtnl(2,3), rtnl(1,3), rtnl(1,3)); check_point_bwd(P, &cmask, cen, CMASK_H, rtnl(1,3), rtnl(2,3), rtnl(2,3)); + check_point_bwd(P, &cmask, cen, CMASK_ALL, rtnl(1,1), rtnl(1,1), rtnl(1,1)); /* Check whether the current centering's lattice points will all * coincide with lattice points in the new centering. Eliminate any @@ -809,31 +810,38 @@ static char determine_centering(RationalMatrix *P, char cen) case 'P' : case 'R' : + check_point_fwd(P, &cmask, rtnl(1,1), rtnl(1,1), rtnl(1,1)); break; case 'A' : + check_point_fwd(P, &cmask, rtnl(1,1), rtnl(1,1), rtnl(1,1)); check_point_fwd(P, &cmask, rtnl_zero(), rtnl(1,2), rtnl(1,2)); break; case 'B' : + check_point_fwd(P, &cmask, rtnl(1,1), rtnl(1,1), rtnl(1,1)); check_point_fwd(P, &cmask, rtnl(1,2), rtnl_zero(), rtnl(1,2)); break; case 'C' : + check_point_fwd(P, &cmask, rtnl(1,1), rtnl(1,1), rtnl(1,1)); check_point_fwd(P, &cmask, rtnl(1,2), rtnl(1,2), rtnl_zero()); break; case 'I' : + check_point_fwd(P, &cmask, rtnl(1,1), rtnl(1,1), rtnl(1,1)); check_point_fwd(P, &cmask, rtnl(1,2), rtnl(1,2), rtnl(1,2)); break; case 'F' : + check_point_fwd(P, &cmask, rtnl(1,1), rtnl(1,1), rtnl(1,1)); check_point_fwd(P, &cmask, rtnl_zero(), rtnl(1,2), rtnl(1,2)); check_point_fwd(P, &cmask, rtnl(1,2), rtnl_zero(), rtnl(1,2)); check_point_fwd(P, &cmask, rtnl(1,2), rtnl(1,2), rtnl_zero()); break; case 'H' : + check_point_fwd(P, &cmask, rtnl(1,1), rtnl(1,1), rtnl(1,1)); check_point_fwd(P, &cmask, rtnl(2,3), rtnl(1,3), rtnl(1,3)); check_point_fwd(P, &cmask, rtnl(1,3), rtnl(2,3), rtnl(2,3)); break; -- cgit v1.2.3