aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/index.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2013-02-18 14:51:36 +0100
committerThomas White <taw@physics.org>2013-02-18 14:51:36 +0100
commit31ec28ea0258bbb2272afa4346b55b183a43410c (patch)
treee5c3df47166401b9a80384a2f5f137d674f5bef9 /libcrystfel/src/index.c
parenta0f4c1506f1d7c1ad942bcccd30d3aaf0cd75bd4 (diff)
parent3732cd6e08e4b0e6b6eaafc01290bc2c23e9ec66 (diff)
Merge branch 'cornelius/xds' into tom/multicrystal
Conflicts: libcrystfel/Makefile.am libcrystfel/src/index.c libcrystfel/src/index.h
Diffstat (limited to 'libcrystfel/src/index.c')
-rw-r--r--libcrystfel/src/index.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/libcrystfel/src/index.c b/libcrystfel/src/index.c
index eee2e814..20e7cf24 100644
--- a/libcrystfel/src/index.c
+++ b/libcrystfel/src/index.c
@@ -11,6 +11,7 @@
* 2010-2013 Thomas White <taw@physics.org>
* 2010-2011 Richard Kirian <rkirian@asu.edu>
* 2012 Lorenzo Galli
+ * 2013 Cornelius Gati <cornelius.gati@cfel.de>
*
* This file is part of CrystFEL.
*
@@ -44,6 +45,7 @@
#include "peaks.h"
#include "dirax.h"
#include "mosflm.h"
+#include "xds.h"
#include "detector.h"
#include "index.h"
#include "index-priv.h"
@@ -84,6 +86,11 @@ IndexingPrivate **prepare_indexing(IndexingMethod *indm, UnitCell *cell,
iprivs[n] = mosflm_prepare(&indm[n], cell, filename,
det, beam, ltl);
break;
+
+ case INDEXING_XDS :
+ iprivs[n] = indexing_private(indm[n]);
+ break;
+
case INDEXING_REAX :
iprivs[n] = reax_prepare(&indm[n], cell, filename,
det, beam, ltl);
@@ -153,6 +160,10 @@ void cleanup_indexing(IndexingMethod *indms, IndexingPrivate **privs)
mosflm_cleanup(privs[n]);
break;
+ case INDEXING_XDS :
+ free(priv[n]);
+ break;
+
case INDEXING_REAX :
reax_cleanup(privs[n]);
break;
@@ -213,6 +224,10 @@ static int try_indexer(struct image *image, IndexingMethod indm,
return run_mosflm(image, ipriv);
break;
+ case INDEXING_XDS :
+ run_XDS(image, cell);
+ break;
+
case INDEXING_REAX :
return reax_index(image, ipriv);
break;
@@ -385,6 +400,9 @@ IndexingMethod *build_indexer_list(const char *str)
} else if ( strcmp(methods[i], "grainspotter") == 0) {
list[++nmeth] = INDEXING_DEFAULTS_GRAINSPOTTER;
+ } else if ( strcmp(methods[i], "xds") == 0) {
+ list[i] = INDEXING_XDS;
+
} else if ( strcmp(methods[i], "reax") == 0) {
list[++nmeth] = INDEXING_DEFAULTS_REAX;