diff options
author | Thomas White <taw@physics.org> | 2017-09-08 11:41:51 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2017-09-15 14:31:01 +0200 |
commit | 60c48f3876b0d3c30bf729ce691dbd3f56665c4c (patch) | |
tree | 44868373d7053924a3de614568cdc148e01de61e /libcrystfel/src/index.h | |
parent | 3f1c6a1fbc241721aafeb9e1e6c0cbdb1eb810b5 (diff) |
Simplify indexing options
mosflm-cell-nolatt-multi-refine-bad-retry.... it's all getting a bit
too much. This commit removes all the options from the indexing methods
except for the prior information flags (cell/nocell and latt/nolatt).
All the other options are now given at the top level with new
indexamajig options, e.g. --no-multi and --no-retry. They are applied
to all the methods, with no option to (say) use retry for one method and
not for another.
This also makes the "peak alignment test" default to OFF, and
multi-lattice indexing ON. I think that the prediction refinement does
a good enough job of checking the validity of indexing solutions,
allowing us to turn off the alignment check which filters out most
multi-lattice solutions.
Diffstat (limited to 'libcrystfel/src/index.h')
-rw-r--r-- | libcrystfel/src/index.h | 77 |
1 files changed, 27 insertions, 50 deletions
diff --git a/libcrystfel/src/index.h b/libcrystfel/src/index.h index 8b3aadeb..2aad377b 100644 --- a/libcrystfel/src/index.h +++ b/libcrystfel/src/index.h @@ -39,36 +39,22 @@ #endif -#define INDEXING_DEFAULTS_DIRAX (INDEXING_DIRAX | INDEXING_CHECK_PEAKS \ - | INDEXING_CHECK_CELL_COMBINATIONS \ - | INDEXING_RETRY | INDEXING_REFINE) - -#define INDEXING_DEFAULTS_ASDF (INDEXING_ASDF | INDEXING_CHECK_PEAKS \ - | INDEXING_CHECK_CELL_COMBINATIONS \ - | INDEXING_RETRY | INDEXING_REFINE) - -#define INDEXING_DEFAULTS_MOSFLM (INDEXING_MOSFLM | INDEXING_CHECK_PEAKS \ - | INDEXING_CHECK_CELL_COMBINATIONS \ - | INDEXING_USE_LATTICE_TYPE \ - | INDEXING_USE_CELL_PARAMETERS \ - | INDEXING_RETRY | INDEXING_REFINE) - -#define INDEXING_DEFAULTS_FELIX (INDEXING_FELIX \ - | INDEXING_USE_LATTICE_TYPE \ - | INDEXING_USE_CELL_PARAMETERS \ - | INDEXING_RETRY | INDEXING_REFINE) - -#define INDEXING_DEFAULTS_TAKETWO (INDEXING_TAKETWO | INDEXING_CHECK_PEAKS \ - | INDEXING_USE_CELL_PARAMETERS \ - | INDEXING_USE_LATTICE_TYPE \ - | INDEXING_RETRY | INDEXING_REFINE) - -/* Axis check is needed for XDS, because it likes to permute the axes */ -#define INDEXING_DEFAULTS_XDS (INDEXING_XDS | INDEXING_USE_LATTICE_TYPE \ - | INDEXING_USE_CELL_PARAMETERS \ - | INDEXING_CHECK_CELL_AXES \ - | INDEXING_CHECK_PEAKS \ - | INDEXING_RETRY | INDEXING_REFINE) +#define INDEXING_DEFAULTS_DIRAX (INDEXING_DIRAX) + +#define INDEXING_DEFAULTS_ASDF (INDEXING_ASDF) + +#define INDEXING_DEFAULTS_MOSFLM (INDEXING_MOSFLM | INDEXING_USE_LATTICE_TYPE \ + | INDEXING_USE_CELL_PARAMETERS) + +#define INDEXING_DEFAULTS_FELIX (INDEXING_FELIX | INDEXING_USE_LATTICE_TYPE \ + | INDEXING_USE_CELL_PARAMETERS) + +#define INDEXING_DEFAULTS_TAKETWO (INDEXING_TAKETWO \ + | INDEXING_USE_CELL_PARAMETERS \ + | INDEXING_USE_LATTICE_TYPE) + +#define INDEXING_DEFAULTS_XDS (INDEXING_XDS | INDEXING_USE_LATTICE_TYPE \ + | INDEXING_USE_CELL_PARAMETERS) /** * IndexingMethod: @@ -82,21 +68,10 @@ * @INDEXING_ASDF: Use in-built "asdf" indexer * @INDEXING_TAKETWO: Use in-built "taketwo" indexer * @INDEXING_ERROR: Special value for unrecognised indexing engine name - * @INDEXING_CHECK_CELL_COMBINATIONS: Check linear combinations of unit cell - * axes for agreement with given cell. - * @INDEXING_CHECK_CELL_AXES: Check unit cell axes for agreement with given - * cell, and permute them if necessary. - * @INDEXING_CHECK_PEAKS: Check that the peaks can be explained by the indexing - * result. * @INDEXING_USE_LATTICE_TYPE: Use lattice type and centering information to * guide the indexing process. * @INDEXING_USE_CELL_PARAMETERS: Use the unit cell parameters to guide the * indexing process. - * @INDEXING_RETRY: If the indexer doesn't succeed, delete the weakest peaks - * and try again. - * @INDEXING_MULTI: If the indexer succeeds, delete the peaks explained by the - * lattice and try again in the hope of finding another crystal. - * @INDEXING_REFINE: Perform "prediction refinement" after indexing. * * An enumeration of all the available indexing methods. The dummy value * @INDEXING_SIMULATION is used by partial_sim to indicate that no indexing was @@ -120,14 +95,8 @@ typedef enum { /* Bits at the top of the IndexingMethod are flags which modify the * behaviour of the indexer. */ - INDEXING_CHECK_CELL_COMBINATIONS = 256, - INDEXING_CHECK_CELL_AXES = 512, - INDEXING_CHECK_PEAKS = 1024, INDEXING_USE_LATTICE_TYPE = 2048, INDEXING_USE_CELL_PARAMETERS = 4096, - INDEXING_RETRY = 8192, - INDEXING_MULTI = 16384, - INDEXING_REFINE = 32768, } IndexingMethod; @@ -135,8 +104,16 @@ typedef enum { * core of the indexing method */ #define INDEXING_METHOD_MASK (0xff) -/* Indexing flags which the indexing method does not need to know about */ -#define INDEXING_CONTROL_FLAGS (INDEXING_RETRY | INDEXING_MULTI | INDEXING_REFINE) +typedef enum { + + INDEXING_RETRY = 1, + INDEXING_MULTI = 2, + INDEXING_REFINE = 4, + INDEXING_CHECK_CELL_COMBINATIONS = 8, + INDEXING_CHECK_CELL_AXES = 16, + INDEXING_CHECK_PEAKS = 32, + +} IndexingFlags; #ifdef __cplusplus extern "C" { @@ -162,7 +139,7 @@ extern IndexingMethod get_indm_from_string(const char *method); extern IndexingPrivate *setup_indexing(const char *methods, UnitCell *cell, struct detector *det, float *ltl, - int no_refine, const char *options, + IndexingFlags flags, const char *options, struct taketwo_options *ttopts); extern void index_pattern(struct image *image, IndexingPrivate *ipriv); |