aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-09-03 17:18:24 +0200
committerThomas White <taw@physics.org>2019-09-12 16:35:52 +0200
commitd8af26290429aa6ffe1ba02c15a5392079edffb9 (patch)
treeb642689898e4638654f0a4877e1a5fa24b8417c7
parentb0ceb28b75b7b0642cc40fa5dc4a48dcf8ec92ec (diff)
Force --no-check-peaks and --no-refine if pinkIndexer is used, and add a warning
-rw-r--r--libcrystfel/src/index.c23
1 files changed, 23 insertions, 0 deletions
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<i; j++ ) {
if ( methods[i] == methods[j] ) {
ERROR("Duplicate indexing method.\n");