diff options
author | Valerio Mariani <valerio.mariani@desy.de> | 2015-07-17 12:22:13 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2015-07-17 14:38:47 +0200 |
commit | d8ccd52c363485f4aed69f691de9667444b1ca4d (patch) | |
tree | 45bc228de8d101d47ec895fe9a2dd0d890e01b1b /libcrystfel | |
parent | eed34caa5fa7208cd63da88ceb987f027d650ee9 (diff) |
Check that XDS indexing options are compatible with data provided by the user
Diffstat (limited to 'libcrystfel')
-rw-r--r-- | libcrystfel/src/xds.c | 13 |
1 files changed, 13 insertions, 0 deletions
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, |