aboutsummaryrefslogtreecommitdiff
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
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.
-rw-r--r--doc/man/indexamajig.17
-rw-r--r--libcrystfel/src/index.c27
-rw-r--r--libcrystfel/src/index.h10
-rw-r--r--src/indexamajig.c22
4 files changed, 20 insertions, 46 deletions
diff --git a/doc/man/indexamajig.1 b/doc/man/indexamajig.1
index 1866231a..16dc7247 100644
--- a/doc/man/indexamajig.1
+++ b/doc/man/indexamajig.1
@@ -120,7 +120,7 @@ You do not need to explicitly specify anything more than the indexing method its
If you don't know what to give for this option, leave it out completely. Indexamajig will then automatically select indexing methods based on the programs available on your computer.
-The indexing results from the indexing engine will be put through a number of refinement and checking stages. See the options \fB--no-check-cell, --no-cell-combinations, --no-multi, --no-retry\fR and \fB--no-refine\fR below for more details.
+The indexing results from the indexing engine will be put through a number of refinement and checking stages. See the options \fB--no-check-cell, --no-multi, --no-retry\fR and \fB--no-refine\fR below for more details.
.SH PEAK INTEGRATION
If the pattern could be successfully indexed, peaks will be predicted in the pattern and their intensities measured. You have a choice of integration methods, and you specify the method using \fB--integration\fR. Choose from:
@@ -368,11 +368,6 @@ The default is \fB--tolerance=5,5,5,1.5\fR.
Do not check the cell parameters against the reference unit cell (given with \fB-p\fR). If you've used older versions of CrystFEL, this replaces putting "-raw" in the indexing method.
.PD 0
-.IP \fB--no-cell-combinations
-.PD
-When checking the cell parameters against the reference cell (see \fB-p\fR), do not make combinations of the axes of the candidate cell (such as \fBa'\fR=2\fBa\fR+\fBb\fR) to make it fit. Usually this reduces the success rate, but is necessary if one of the cell parameters is close to a multiple of the others. \fRThis happens for tetragonal lysozyme\fB.
-
-.PD 0
.IP \fB--multi
.PD
Enable the "subtract and retry" method, where after a successful indexing attempt the spots accounted for by the indexing solution are removed before trying to index again in the hope of finding a second lattice. This doesn't have anything to do with the multi-lattice indexing algorithms such as Felix.
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
diff --git a/src/indexamajig.c b/src/indexamajig.c
index 78f26709..efad3fb0 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -137,8 +137,6 @@ static void show_help(const char *s)
" --tolerance=<tol> Tolerances for cell comparison\n"
" Default: 5,5,5,1.5,1.5,1.5\n"
" --no-check-cell Don't check lattice parameters against input cell\n"
-" --no-cell-combinations\n"
-" Don't use axis combinations when checking cell\n"
" --multi Repeat indexing to index multiple hits\n"
" --no-retry Don't repeat indexing to increase indexing rate\n"
" --no-refine Skip the prediction refinement step\n"
@@ -282,7 +280,7 @@ int main(int argc, char *argv[])
int have_push_res = 0;
char *command_line_peak_path = NULL;
int if_refine = 1;
- int if_nocomb = 0;
+ int if_nocomb_unused = 0;
int if_nocheck = 0;
int if_peaks = 1;
int if_multi = 0;
@@ -402,7 +400,7 @@ int main(int argc, char *argv[])
{"profile", 0, &iargs.profile, 1},
{"no-half-pixel-shift",0, &iargs.half_pixel_shift, 0},
{"no-refine", 0, &if_refine, 0},
- {"no-cell-combinations",0,&if_nocomb, 1},
+ {"no-cell-combinations",0,&if_nocomb_unused, 1},
{"no-check-cell", 0, &if_nocheck, 1},
{"no-cell-check", 0, &if_nocheck, 1},
{"check-peaks", 0, &if_peaks, 1},
@@ -938,6 +936,11 @@ int main(int argc, char *argv[])
}
+ if ( if_nocomb_unused ) {
+ ERROR("WARNING: --no-cell-combinations is no longer used, "
+ "and has been ignored.\n");
+ }
+
/* Check for minimal information */
if ( filename == NULL ) {
ERROR("You need to provide the input filename (use -i)\n");
@@ -1237,15 +1240,8 @@ int main(int argc, char *argv[])
STATUS("No reference unit cell provided.\n");
}
- if ( if_nocomb ) {
- flags |= INDEXING_CHECK_CELL_AXES;
- } else {
- flags |= INDEXING_CHECK_CELL_COMBINATIONS;
- }
-
- if ( if_nocheck ) {
- flags &= ~INDEXING_CHECK_CELL_AXES;
- flags &= ~INDEXING_CHECK_CELL_COMBINATIONS;
+ if ( !if_nocheck ) {
+ flags &= INDEXING_CHECK_CELL;
}
if ( if_refine ) {