aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/mosflm.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2015-06-25 16:33:44 +0200
committerThomas White <taw@physics.org>2015-06-25 16:36:33 +0200
commit33a0ef4d46dff8281743359697178085fa551049 (patch)
tree830ef8024d1fc49d9e5c61a3ed16ef5181304be3 /libcrystfel/src/mosflm.c
parent3bd690ded0b78ae41f6e3cd34196b0e3287e10f3 (diff)
Set MOSFLM default flags to include cell parameters, and add some checks
Diffstat (limited to 'libcrystfel/src/mosflm.c')
-rw-r--r--libcrystfel/src/mosflm.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/libcrystfel/src/mosflm.c b/libcrystfel/src/mosflm.c
index c384fec2..4eac7874 100644
--- a/libcrystfel/src/mosflm.c
+++ b/libcrystfel/src/mosflm.c
@@ -852,11 +852,13 @@ IndexingPrivate *mosflm_prepare(IndexingMethod *indm, UnitCell *cell,
/* 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_CELL_PARAMETERS ) 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;
+ *indm &= ~INDEXING_USE_CELL_PARAMETERS;
}
/* Check if lattice type information is needed/provided */
@@ -869,7 +871,7 @@ IndexingPrivate *mosflm_prepare(IndexingMethod *indm, UnitCell *cell,
/* Flags that MOSFLM knows about */
*indm &= INDEXING_METHOD_MASK | INDEXING_CHECK_CELL_COMBINATIONS
| INDEXING_CHECK_CELL_AXES | INDEXING_CHECK_PEAKS
- | INDEXING_USE_LATTICE_TYPE| INDEXING_USE_CELL_PARAMETERS;;
+ | INDEXING_USE_LATTICE_TYPE| INDEXING_USE_CELL_PARAMETERS;
if ( (*indm & INDEXING_USE_LATTICE_TYPE)
&& !((*indm & INDEXING_CHECK_CELL_COMBINATIONS)
@@ -884,7 +886,17 @@ IndexingPrivate *mosflm_prepare(IndexingMethod *indm, UnitCell *cell,
"If this is a problem, consider using "
"mosflm-axes-latt or mosflm-comb-latt instead of "
"mosflm-raw-latt.\n", indexer_str(*indm));
+ /* It'll be OK if INDEXING_CHECK_CELL_PARAMETERS and
+ * MOSFLM 7.2.0 or later, but that's getting a bit too
+ * complicated to explain to the user. */
+ }
+ if ( (*indm & INDEXING_USE_CELL_PARAMETERS)
+ && !((*indm & INDEXING_CHECK_CELL_COMBINATIONS)
+ || (*indm & INDEXING_CHECK_CELL_AXES)) )
+ {
+ ERROR("WARNING: Using 'mosflm-raw' but providing cell "
+ "parameters as prior information to mosflm.\n");
}
mp = malloc(sizeof(struct mosflm_private));