aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/index.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcrystfel/src/index.c')
-rw-r--r--libcrystfel/src/index.c29
1 files changed, 26 insertions, 3 deletions
diff --git a/libcrystfel/src/index.c b/libcrystfel/src/index.c
index 944c3f10..b409e80e 100644
--- a/libcrystfel/src/index.c
+++ b/libcrystfel/src/index.c
@@ -12,6 +12,7 @@
* 2010-2011 Richard Kirian <rkirian@asu.edu>
* 2012 Lorenzo Galli
* 2013 Cornelius Gati <cornelius.gati@cfel.de>
+ * 2015 Kenneth Beyerlein <kenneth.beyerlein@desy.de>
*
* This file is part of CrystFEL.
*
@@ -51,6 +52,7 @@
#include "index.h"
#include "geometry.h"
#include "cell-utils.h"
+#include "felix.h"
static int debug_index(struct image *image)
@@ -67,7 +69,8 @@ static int debug_index(struct image *image)
IndexingPrivate **prepare_indexing(IndexingMethod *indm, UnitCell *cell,
- struct detector *det, float *ltl)
+ struct detector *det, float *ltl,
+ const char *options)
{
int n;
int nm = 0;
@@ -106,6 +109,10 @@ IndexingPrivate **prepare_indexing(IndexingMethod *indm, UnitCell *cell,
iprivs[n] = (IndexingPrivate *)strdup("Hello!");
break;
+ case INDEXING_FELIX :
+ iprivs[n] = felix_prepare(&indm[n], cell, det, ltl, options);
+ break;
+
default :
ERROR("Don't know how to prepare indexing method %i\n",
indm[n]);
@@ -170,10 +177,14 @@ void cleanup_indexing(IndexingMethod *indms, IndexingPrivate **privs)
mosflm_cleanup(privs[n]);
break;
- case INDEXING_XDS :
+ case INDEXING_XDS :
xds_cleanup(privs[n]);
break;
+ case INDEXING_FELIX :
+ felix_cleanup(privs[n]);
+ break;
+
case INDEXING_DEBUG :
free(privs[n]);
break;
@@ -244,6 +255,11 @@ static int try_indexer(struct image *image, IndexingMethod indm,
case INDEXING_DEBUG :
return debug_index(image);
+ break;
+
+ case INDEXING_FELIX :
+ return felix_index(image, ipriv);
+ break;
default :
ERROR("Unrecognised indexing method: %i\n", indm);
@@ -366,6 +382,10 @@ char *indexer_str(IndexingMethod indm)
strcpy(str, "mosflm");
break;
+ case INDEXING_FELIX :
+ strcpy(str, "felix");
+ break;
+
case INDEXING_XDS :
strcpy(str, "xds");
break;
@@ -438,9 +458,12 @@ IndexingMethod *build_indexer_list(const char *str)
} else if ( strcmp(methods[i], "mosflm") == 0) {
list[++nmeth] = INDEXING_DEFAULTS_MOSFLM;
- } else if ( strcmp(methods[i], "xds") == 0) {
+ } else if ( strcmp(methods[i], "xds") == 0) {
list[++nmeth] = INDEXING_DEFAULTS_XDS;
+ } else if ( strcmp(methods[i], "felix") == 0) {
+ list[++nmeth] = INDEXING_DEFAULTS_FELIX;
+
} else if ( strcmp(methods[i], "none") == 0) {
list[++nmeth] = INDEXING_NONE;