aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-03-13 16:10:08 +0100
committerThomas White <taw@physics.org>2019-03-13 16:10:08 +0100
commitc229a577b5c5578f1e83f8a6ee569bb5681524b9 (patch)
treeb023f62f995d9c02dee2954de89ed8aab0dc87eb /libcrystfel
parent811e6b353ee6e560fe6bd26e22dad49e7386cd54 (diff)
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.
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/cell.c8
1 files changed, 8 insertions, 0 deletions
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;