From d8af26290429aa6ffe1ba02c15a5392079edffb9 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 3 Sep 2019 17:18:24 +0200 Subject: Force --no-check-peaks and --no-refine if pinkIndexer is used, and add a warning --- libcrystfel/src/index.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'libcrystfel') diff --git a/libcrystfel/src/index.c b/libcrystfel/src/index.c index 5a1673c3..a3479a6c 100644 --- a/libcrystfel/src/index.c +++ b/libcrystfel/src/index.c @@ -423,6 +423,29 @@ IndexingPrivate *setup_indexing(const char *method_list, UnitCell *cell, if ( ipriv->engine_private[i] == NULL ) return NULL; + if ( methods[i] & INDEXING_PINKINDEXER ) { + if ( n > 1 ) { + ERROR("WARNING: Using PinkIndexer at the same " + "time as other indexers is not " + "recommended.\n"); + } + + if ( flags & INDEXING_CHECK_PEAKS ) { + ERROR("WARNING: Setting --no-check-peaks " + "because PinkIndexer is in use.\n"); + } + flags |= INDEXING_CHECK_PEAKS; + flags ^= INDEXING_CHECK_PEAKS; + + if ( flags & INDEXING_REFINE ) { + ERROR("WARNING: Setting --no-refine because " + "PinkIndexer is in use.\n"); + } + flags |= INDEXING_REFINE; + flags ^= INDEXING_REFINE; + } + + for ( j=0; j