aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-08-29 14:03:43 +0200
committerThomas White <taw@physics.org>2019-08-29 14:03:43 +0200
commit7836e89222bf587639adc1ad06dfd6d216d25379 (patch)
tree3de88262b743d6d5fbd4a4f719ff970ddc95ae7a /libcrystfel
parent1b3b9301d3229536333a84e6e4aa1cfad1b45d74 (diff)
indexamajig: Remove --no-cell-combinations
Also remove all the related API stuff. We now have a much better way of checking indexing results.
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/index.c27
-rw-r--r--libcrystfel/src/index.h10
2 files changed, 10 insertions, 27 deletions
diff --git a/libcrystfel/src/index.c b/libcrystfel/src/index.c
index 45b24afb..cb6b979b 100644
--- a/libcrystfel/src/index.c
+++ b/libcrystfel/src/index.c
@@ -101,19 +101,9 @@ static void set_last_task(char *lt, const char *task)
static void show_indexing_flags(IndexingFlags flags)
{
- char check[64];
-
- assert( !((flags & INDEXING_CHECK_CELL_COMBINATIONS)
- && (flags & INDEXING_CHECK_CELL_AXES)) );
STATUS("Indexing parameters:\n");
- strcpy(check, onoff(flags & (INDEXING_CHECK_CELL_COMBINATIONS | INDEXING_CHECK_CELL_AXES)));
- if ( flags & INDEXING_CHECK_CELL_AXES ) {
- strcat(check, " (axis permutations only)");
- }
- if ( flags & INDEXING_CHECK_CELL_COMBINATIONS ) {
- strcat(check, " (axis combinations)");
- }
- STATUS(" Check unit cell parameters: %s\n", check);
+ STATUS(" Check unit cell parameters: %s\n",
+ onoff(flags & INDEXING_CHECK_CELL));
STATUS(" Check peak alignment: %s\n",
onoff(flags & INDEXING_CHECK_PEAKS));
STATUS(" Refine indexing solutions: %s\n",
@@ -361,14 +351,11 @@ IndexingPrivate *setup_indexing(const char *method_list, UnitCell *cell,
int warn = 0;
- if ( (flags & INDEXING_CHECK_CELL_COMBINATIONS)
- || (flags & INDEXING_CHECK_CELL_AXES) )
- {
+ if ( flags & INDEXING_CHECK_CELL ) {
ERROR("WARNING: Forcing --no-check-cell because "
"reference unit cell parameters were not "
"given.\n");
- flags &= ~INDEXING_CHECK_CELL_COMBINATIONS;
- flags &= ~INDEXING_CHECK_CELL_AXES;
+ flags &= ~INDEXING_CHECK_CELL;
}
for ( i=0; i<n; i++ ) {
@@ -550,8 +537,7 @@ static int check_cell(IndexingFlags flags, Crystal *cr, UnitCell *target,
RationalMatrix *rm;
/* Check at all? */
- if ( ! ((flags & INDEXING_CHECK_CELL_COMBINATIONS)
- || (flags & INDEXING_CHECK_CELL_AXES)) ) return 0;
+ if ( !(flags & INDEXING_CHECK_CELL) ) return 0;
if ( compare_reindexed_cell_parameters(crystal_get_cell(cr), target,
tolerance, &rm) )
@@ -648,9 +634,6 @@ static int try_indexer(struct image *image, IndexingMethod indm,
crystal_set_profile_radius(cr, 0.02e9);
crystal_set_mosaicity(cr, 0.0);
- assert( !((ipriv->flags & INDEXING_CHECK_CELL_COMBINATIONS)
- && (ipriv->flags & INDEXING_CHECK_CELL_AXES)) );
-
/* Pre-refinement unit cell check if requested */
if ( check_cell(ipriv->flags, cr, ipriv->target_cell,
ipriv->tolerance) )
diff --git a/libcrystfel/src/index.h b/libcrystfel/src/index.h
index 15b21e25..ec7ed61b 100644
--- a/libcrystfel/src/index.h
+++ b/libcrystfel/src/index.h
@@ -115,15 +115,15 @@ typedef enum {
/** Refine the indexing solution */
INDEXING_REFINE = 4,
- /** Check the unit cell, including derivative lattices */
- INDEXING_CHECK_CELL_COMBINATIONS = 8,
-
- /** Check the unit cell, only permuting axes if necessary */
- INDEXING_CHECK_CELL_AXES = 16,
+ /* 8, 16 reserved (formerly INDEXING_CHECK_CELL_COMBINATIONS and
+ * INDEXING_CHECK_CELL_AXES respectively) */
/** Check that the peaks agree with the indexing solution */
INDEXING_CHECK_PEAKS = 32,
+ /** Check that the unit cell agrees with the target cell */
+ INDEXING_CHECK_CELL = 32,
+
} IndexingFlags;
#ifdef __cplusplus