aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/mosflm.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2014-11-21 16:45:44 +0100
committerThomas White <taw@physics.org>2014-11-21 16:45:44 +0100
commit65a80a982aaa9194c0f58b5cef7a8eeea27b82b1 (patch)
tree6d90062d866ea04b4731a2ab21dd7fbc2a6caa6f /libcrystfel/src/mosflm.c
parente24735836de763cc00ede79673d494687a0a4882 (diff)
Fix indexing flags check for mosflm
Diffstat (limited to 'libcrystfel/src/mosflm.c')
-rw-r--r--libcrystfel/src/mosflm.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libcrystfel/src/mosflm.c b/libcrystfel/src/mosflm.c
index 3319a261..0328c174 100644
--- a/libcrystfel/src/mosflm.c
+++ b/libcrystfel/src/mosflm.c
@@ -836,15 +836,20 @@ IndexingPrivate *mosflm_prepare(IndexingMethod *indm, UnitCell *cell,
struct mosflm_private *mp;
int need_cell = 0;
+ /* Check if cell parameters are needed/provided */
if ( *indm & INDEXING_CHECK_CELL_COMBINATIONS ) need_cell = 1;
if ( *indm & INDEXING_CHECK_CELL_AXES ) need_cell = 1;
- if ( *indm & INDEXING_USE_LATTICE_TYPE ) need_cell = 1;
-
if ( need_cell && !cell_has_parameters(cell) ) {
ERROR("Altering your MOSFLM flags because cell parameters were"
" not provided.\n");
*indm &= ~INDEXING_CHECK_CELL_COMBINATIONS;
*indm &= ~INDEXING_CHECK_CELL_AXES;
+ }
+
+ /* Check if lattice type information is needed/provided */
+ if ( (*indm & INDEXING_USE_LATTICE_TYPE) && (cell == NULL) ) {
+ ERROR("Altering your MOSFLM flags because lattice type "
+ "information was not provided.\n");
*indm &= ~INDEXING_USE_LATTICE_TYPE;
}