aboutsummaryrefslogtreecommitdiff
path: root/src/index.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-07-28 16:49:59 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:35 +0100
commit90b6f53e9cdc77cfc7d5de2cd3990678e4cf0df5 (patch)
tree82fa5466e74d95c08358db3591721a4a1bfeb49c /src/index.c
parentae14f700da6b8a2f2aabcd6a9354e30911474843 (diff)
Initial ReAx work
Diffstat (limited to 'src/index.c')
-rw-r--r--src/index.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/index.c b/src/index.c
index 2fa7f58d..f0845c3a 100644
--- a/src/index.c
+++ b/src/index.c
@@ -29,10 +29,11 @@
#include "detector.h"
#include "index.h"
#include "index-priv.h"
+#include "reax.h"
/* Base class constructor for unspecialised indexing private data */
-static IndexingPrivate *indexing_private(IndexingMethod indm)
+IndexingPrivate *indexing_private(IndexingMethod indm)
{
struct _indexingprivate *priv;
priv = calloc(1, sizeof(struct _indexingprivate));
@@ -65,6 +66,9 @@ IndexingPrivate **prepare_indexing(IndexingMethod *indm, UnitCell *cell,
case INDEXING_MOSFLM :
iprivs[n] = indexing_private(indm[n]);
break;
+ case INDEXING_REAX :
+ iprivs[n] = reax_prepare();
+ break;
}
}
@@ -92,6 +96,9 @@ void cleanup_indexing(IndexingPrivate **priv)
case INDEXING_MOSFLM :
free(priv[n]);
break;
+ case INDEXING_REAX :
+ free(priv[n]);
+ break;
}
n++;
@@ -145,6 +152,9 @@ void index_pattern(struct image *image, UnitCell *cell, IndexingMethod *indm,
case INDEXING_MOSFLM :
run_mosflm(image, cell);
break;
+ case INDEXING_REAX :
+ reax_index(image, cell);
+ break;
}
if ( image->ncells == 0 ) {
n++;
@@ -229,6 +239,8 @@ IndexingMethod *build_indexer_list(const char *str, int *need_cell)
list[i] = INDEXING_DIRAX;
} else if ( strcmp(methods[i], "mosflm") == 0) {
list[i] = INDEXING_MOSFLM;
+ } else if ( strcmp(methods[i], "reax") == 0) {
+ list[i] = INDEXING_REAX;
} else {
ERROR("Unrecognised indexing method '%s'\n",
methods[i]);