From d8ccd52c363485f4aed69f691de9667444b1ca4d Mon Sep 17 00:00:00 2001 From: Valerio Mariani Date: Fri, 17 Jul 2015 12:22:13 +0200 Subject: Check that XDS indexing options are compatible with data provided by the user --- libcrystfel/src/xds.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/libcrystfel/src/xds.c b/libcrystfel/src/xds.c index f5985e73..36898949 100644 --- a/libcrystfel/src/xds.c +++ b/libcrystfel/src/xds.c @@ -619,6 +619,19 @@ IndexingPrivate *xds_prepare(IndexingMethod *indm, UnitCell *cell, struct detector *det, float *ltl) { struct xds_private *xp; + 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_CELL_PARAMETERS ) need_cell = 1; + if ( need_cell && !cell_has_parameters(cell) ) { + ERROR("Altering your XDS flags because cell parameters were" + " not provided.\n"); + *indm &= ~INDEXING_CHECK_CELL_COMBINATIONS; + *indm &= ~INDEXING_CHECK_CELL_AXES; + *indm &= ~INDEXING_USE_CELL_PARAMETERS; + } /* Either cell,latt and cell provided, or nocell-nolatt and no cell * - complain about anything else. Could figure this out automatically, -- cgit v1.2.3