aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2013-02-09 17:34:15 -0800
committerThomas White <taw@physics.org>2013-02-09 17:34:15 -0800
commit32d6d83a69b852170ba56f40f2e3d0b7536b34fb (patch)
tree63c2e0f3d994f58ae64ca05ecbc38d691e66f3b3 /libcrystfel/src
parent463ab1b598c3ca8a120989f8a26c480a67b66268 (diff)
MOSFLM returns 'hexagonal H' if we ask for 'rhombohedral R'. Growl.
Diffstat (limited to 'libcrystfel/src')
-rw-r--r--libcrystfel/src/mosflm.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/libcrystfel/src/mosflm.c b/libcrystfel/src/mosflm.c
index 43bfdea6..9b1e36e3 100644
--- a/libcrystfel/src/mosflm.c
+++ b/libcrystfel/src/mosflm.c
@@ -150,9 +150,30 @@ static int check_cell(struct mosflm_private *mp, struct image *image,
}
if ( mp->indm & INDEXING_USE_LATTICE_TYPE ) {
+
LatticeType latt;
+ char cen;
+
latt = cell_get_lattice_type(mp->template);
+ cen = cell_get_centering(mp->template);
+
+ /* If we ask MOSFLM for 'rhombohedral R', it gives us
+ * 'hexagonal H' back. Grumble. Time to fix that up... */
+ if ( latt == L_RHOMBOHEDRAL ) {
+
+ UnitCell *fixup;
+ assert(cen == 'R');
+ cell_set_lattice_type(out, L_HEXAGONAL);
+ cell_set_centering(out, 'H');
+ fixup = uncenter_cell(out, NULL);
+ cell_free(out);
+ out = fixup;
+
+ }
+
cell_set_lattice_type(out, latt);
+ cell_set_centering(out, cen);
+
}
crystal_set_cell(cr, out);