diff options
Diffstat (limited to 'libcrystfel/src/index.c')
-rw-r--r-- | libcrystfel/src/index.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libcrystfel/src/index.c b/libcrystfel/src/index.c index 446f57a3..bdabb062 100644 --- a/libcrystfel/src/index.c +++ b/libcrystfel/src/index.c @@ -56,6 +56,7 @@ #include "cell-utils.h" #include "felix.h" #include "predict-refine.h" +#include "taketwo.h" struct _indexingprivate @@ -120,6 +121,10 @@ static void *prepare_method(IndexingMethod *m, UnitCell *cell, priv = felix_prepare(m, cell, det, ltl, options); break; + case INDEXING_TAKETWO : + priv = taketwo_prepare(m, cell, det, ltl); + break; + default : ERROR("Don't know how to prepare indexing method %i\n", *m); break; @@ -252,6 +257,10 @@ void cleanup_indexing(IndexingPrivate *ipriv) free(ipriv->engine_private[n]); break; + case INDEXING_TAKETWO : + taketwo_cleanup(ipriv->engine_private[n]); + break; + default : ERROR("Don't know how to clean up indexing method %i\n", ipriv->methods[n]); @@ -329,6 +338,10 @@ static int try_indexer(struct image *image, IndexingMethod indm, r = felix_index(image, mpriv); break; + case INDEXING_TAKETWO : + r = taketwo_index(image, mpriv); + break; + default : ERROR("Unrecognised indexing method: %i\n", indm); return 0; @@ -662,6 +675,10 @@ char *indexer_str(IndexingMethod indm) strcpy(str, "xds"); break; + case INDEXING_TAKETWO : + strcpy(str, "taketwo"); + break; + case INDEXING_SIMULATION : strcpy(str, "simulation"); break; @@ -770,6 +787,11 @@ IndexingMethod get_indm_from_string(const char *str) method = INDEXING_DEFAULTS_FELIX; have_method = 1; + } else if ( strcmp(bits[i], "taketwo") == 0) { + if ( have_method ) return warn_method(str); + method = INDEXING_DEFAULTS_TAKETWO; + have_method = 1; + } else if ( strcmp(bits[i], "none") == 0) { if ( have_method ) return warn_method(str); method = INDEXING_NONE; |