aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am5
-rw-r--r--Makefile.in12
-rw-r--r--src/index.c14
-rw-r--r--src/index.h3
-rw-r--r--src/reax.c60
-rw-r--r--src/reax.h27
6 files changed, 114 insertions, 7 deletions
diff --git a/Makefile.am b/Makefile.am
index 5e378b39..b4ecd7e5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -70,7 +70,8 @@ src_indexamajig_SOURCES = src/indexamajig.c src/hdf5-file.c src/utils.c \
src/dirax.c src/mosflm.c \
src/reflist-utils.c src/symmetry.c \
src/geometry.c src/thread-pool.c \
- src/beam-parameters.c src/reflist.c src/stream.c
+ src/beam-parameters.c src/reflist.c src/stream.c \
+ src/reax.c
if HAVE_OPENCL
src_indexamajig_SOURCES += src/diffraction-gpu.c src/cl-utils.c
@@ -167,7 +168,7 @@ EXTRA_DIST += src/cell.h src/hdf5-file.h src/image.h src/utils.h \
src/symmetry.h src/povray.h src/index-priv.h src/geometry.h \
src/render_hkl.h src/stream.h src/thread-pool.h \
src/beam-parameters.h src/post-refinement.h src/hrs-scaling.h \
- src/reflist.h src/scaling-report.h
+ src/reflist.h src/scaling-report.h src/reax.h
crystfeldir = $(datadir)/crystfel
crystfel_DATA = data/diffraction.cl data/defs.h data/hdfsee.ui
diff --git a/Makefile.in b/Makefile.in
index 26d5410b..72dd96de 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -168,7 +168,7 @@ am__src_indexamajig_SOURCES_DIST = src/indexamajig.c src/hdf5-file.c \
src/filters.c src/diffraction.c src/detector.c src/dirax.c \
src/mosflm.c src/reflist-utils.c src/symmetry.c src/geometry.c \
src/thread-pool.c src/beam-parameters.c src/reflist.c \
- src/stream.c src/diffraction-gpu.c src/cl-utils.c
+ src/stream.c src/reax.c src/diffraction-gpu.c src/cl-utils.c
@HAVE_OPENCL_TRUE@am__objects_1 = src/diffraction-gpu.$(OBJEXT) \
@HAVE_OPENCL_TRUE@ src/cl-utils.$(OBJEXT)
am_src_indexamajig_OBJECTS = src/indexamajig.$(OBJEXT) \
@@ -179,7 +179,8 @@ am_src_indexamajig_OBJECTS = src/indexamajig.$(OBJEXT) \
src/mosflm.$(OBJEXT) src/reflist-utils.$(OBJEXT) \
src/symmetry.$(OBJEXT) src/geometry.$(OBJEXT) \
src/thread-pool.$(OBJEXT) src/beam-parameters.$(OBJEXT) \
- src/reflist.$(OBJEXT) src/stream.$(OBJEXT) $(am__objects_1)
+ src/reflist.$(OBJEXT) src/stream.$(OBJEXT) src/reax.$(OBJEXT) \
+ $(am__objects_1)
src_indexamajig_OBJECTS = $(am_src_indexamajig_OBJECTS)
src_indexamajig_LDADD = $(LDADD)
src_indexamajig_DEPENDENCIES = $(top_builddir)/lib/libgnu.a
@@ -652,7 +653,7 @@ EXTRA_DIST = configure m4/gnulib-cache.m4 tests/first_merge_check \
src/symmetry.h src/povray.h src/index-priv.h src/geometry.h \
src/render_hkl.h src/stream.h src/thread-pool.h \
src/beam-parameters.h src/post-refinement.h src/hrs-scaling.h \
- src/reflist.h src/scaling-report.h $(crystfel_DATA) \
+ src/reflist.h src/scaling-report.h src/reax.h $(crystfel_DATA) \
doc/twin-calculator.pdf doc/examples/lcls-dec.geom \
doc/examples/lcls-june-r0013-r0128.geom \
doc/examples/lcls-xpp-estimate.geom doc/examples/simple.geom \
@@ -699,7 +700,7 @@ src_indexamajig_SOURCES = src/indexamajig.c src/hdf5-file.c \
src/filters.c src/diffraction.c src/detector.c src/dirax.c \
src/mosflm.c src/reflist-utils.c src/symmetry.c src/geometry.c \
src/thread-pool.c src/beam-parameters.c src/reflist.c \
- src/stream.c $(am__append_6)
+ src/stream.c src/reax.c $(am__append_6)
@BUILD_HDFSEE_TRUE@src_hdfsee_SOURCES = src/hdfsee.c src/dw-hdfsee.c src/render.c \
@BUILD_HDFSEE_TRUE@ src/hdf5-file.c src/utils.c src/image.c src/filters.c \
@BUILD_HDFSEE_TRUE@ src/thread-pool.c src/detector.c
@@ -977,6 +978,7 @@ src/diffraction.$(OBJEXT): src/$(am__dirstamp) \
src/dirax.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
src/mosflm.$(OBJEXT): src/$(am__dirstamp) \
src/$(DEPDIR)/$(am__dirstamp)
+src/reax.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
src/diffraction-gpu.$(OBJEXT): src/$(am__dirstamp) \
src/$(DEPDIR)/$(am__dirstamp)
src/cl-utils.$(OBJEXT): src/$(am__dirstamp) \
@@ -1092,6 +1094,7 @@ mostlyclean-compile:
-rm -f src/povray.$(OBJEXT)
-rm -f src/powder_plot.$(OBJEXT)
-rm -f src/process_hkl.$(OBJEXT)
+ -rm -f src/reax.$(OBJEXT)
-rm -f src/reflist-utils.$(OBJEXT)
-rm -f src/reflist.$(OBJEXT)
-rm -f src/render.$(OBJEXT)
@@ -1143,6 +1146,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/povray.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/powder_plot.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/process_hkl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/reax.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/reflist-utils.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/reflist.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/render.Po@am__quote@
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]);
diff --git a/src/index.h b/src/index.h
index 03e246f4..9d4b69bd 100644
--- a/src/index.h
+++ b/src/index.h
@@ -28,6 +28,7 @@ typedef enum {
INDEXING_NONE,
INDEXING_DIRAX,
INDEXING_MOSFLM,
+ INDEXING_REAX,
} IndexingMethod;
@@ -42,6 +43,8 @@ enum {
typedef struct _indexingprivate IndexingPrivate;
+extern IndexingPrivate *indexing_private(IndexingMethod indm);
+
extern IndexingPrivate **prepare_indexing(IndexingMethod *indm, UnitCell *cell,
const char *filename,
struct detector *det,
diff --git a/src/reax.c b/src/reax.c
new file mode 100644
index 00000000..44dc52a6
--- /dev/null
+++ b/src/reax.c
@@ -0,0 +1,60 @@
+/*
+ * reax.c
+ *
+ * A new auto-indexer
+ *
+ * (c) 2011 Thomas White <taw@physics.org>
+ *
+ * Part of CrystFEL - crystallography with a FEL
+ *
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <math.h>
+
+#include "image.h"
+#include "utils.h"
+#include "peaks.h"
+#include "cell.h"
+#include "index.h"
+#include "index-priv.h"
+
+
+struct dvec
+{
+ double x;
+ double y;
+ double z;
+};
+
+
+struct reax_private
+{
+ IndexingPrivate base;
+};
+
+
+IndexingPrivate *reax_prepare()
+{
+ struct reax_private *priv;
+
+ priv = calloc(1, sizeof(*priv));
+ if ( priv == NULL ) return NULL;
+
+ priv->base.indm = INDEXING_REAX;
+
+ return (IndexingPrivate *)priv;
+}
+
+
+void reax_index(struct image *image, UnitCell *cell)
+{
+
+}
diff --git a/src/reax.h b/src/reax.h
new file mode 100644
index 00000000..8af6d3dc
--- /dev/null
+++ b/src/reax.h
@@ -0,0 +1,27 @@
+/*
+ * reax.h
+ *
+ * A new auto-indexer
+ *
+ * (c) 2011 Thomas White <taw@physics.org>
+ *
+ * Part of CrystFEL - crystallography with a FEL
+ *
+ */
+
+
+#ifndef REAX_H
+#define REAX_H
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "cell.h"
+
+extern IndexingPrivate *reax_prepare(void);
+
+extern void reax_index(struct image *image, UnitCell *cell);
+
+
+#endif /* REAX_H */