From 9f265dd89b1fbb1db5f0d5998a85eebc5514ed5b Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 22 Sep 2017 11:13:30 +0200 Subject: If no cell params or lattice type, set nocell/nolatt at top level Another thing that the indexing engines don't need to be repsonsible for. --- libcrystfel/src/dirax.c | 11 ----------- libcrystfel/src/index.c | 33 ++++++++++++++++++++++++++++++--- libcrystfel/src/mosflm.c | 16 ---------------- libcrystfel/src/xds.c | 19 ------------------- 4 files changed, 30 insertions(+), 49 deletions(-) (limited to 'libcrystfel/src') diff --git a/libcrystfel/src/dirax.c b/libcrystfel/src/dirax.c index ecf8a4fd..764a6be1 100644 --- a/libcrystfel/src/dirax.c +++ b/libcrystfel/src/dirax.c @@ -605,17 +605,6 @@ void *dirax_prepare(IndexingMethod *indm, UnitCell *cell, struct detector *det, float *ltl) { struct dirax_private *dp; - int need_cell = 0; - - if ( *indm & INDEXING_CHECK_CELL_COMBINATIONS ) need_cell = 1; - if ( *indm & INDEXING_CHECK_CELL_AXES ) need_cell = 1; - - if ( need_cell && !cell_has_parameters(cell) ) { - ERROR("Altering your DirAx flags because cell parameters were" - " not provided.\n"); - *indm &= ~INDEXING_CHECK_CELL_COMBINATIONS; - *indm &= ~INDEXING_CHECK_CELL_AXES; - } /* Flags that DirAx knows about */ *indm &= INDEXING_METHOD_MASK; diff --git a/libcrystfel/src/index.c b/libcrystfel/src/index.c index 17153976..3e50b664 100644 --- a/libcrystfel/src/index.c +++ b/libcrystfel/src/index.c @@ -301,6 +301,9 @@ IndexingPrivate *setup_indexing(const char *method_list, UnitCell *cell, } if ( cell == NULL ) { + + int warn = 0; + if ( (flags & INDEXING_CHECK_CELL_COMBINATIONS) || (flags & INDEXING_CHECK_CELL_COMBINATIONS) ) { @@ -310,6 +313,33 @@ IndexingPrivate *setup_indexing(const char *method_list, UnitCell *cell, flags &= ~INDEXING_CHECK_CELL_COMBINATIONS; flags &= ~INDEXING_CHECK_CELL_AXES; } + + for ( i=0; i