aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/reax.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2013-02-12 02:16:44 -0800
committerThomas White <taw@physics.org>2013-02-12 02:16:44 -0800
commita9d289c5c9c5c3491b8ecd6580c381a423094734 (patch)
tree8b438263b69d4b28bcc84eb5f2f8c547ef2055cd /libcrystfel/src/reax.c
parent9b7274a5b5d8a241277d61e980a8ddf922ebf293 (diff)
Improve handling of indexing methods
Diffstat (limited to 'libcrystfel/src/reax.c')
-rw-r--r--libcrystfel/src/reax.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/libcrystfel/src/reax.c b/libcrystfel/src/reax.c
index f454503c..3460a4f2 100644
--- a/libcrystfel/src/reax.c
+++ b/libcrystfel/src/reax.c
@@ -1084,7 +1084,7 @@ void reax_index(IndexingPrivate *pp, struct image *image, UnitCell *cell)
}
-IndexingPrivate *reax_prepare(IndexingMethod indm, UnitCell *cell,
+IndexingPrivate *reax_prepare(IndexingMethod *indm, UnitCell *cell,
const char *filename, struct detector *det,
struct beam_params *beam, float *ltl)
{
@@ -1100,6 +1100,12 @@ IndexingPrivate *reax_prepare(IndexingMethod indm, UnitCell *cell,
p = calloc(1, sizeof(*p));
if ( p == NULL ) return NULL;
+ /* Flags that ReAx knows about */
+ *indm &= INDEXING_METHOD_MASK | INDEXING_CHECK_PEAKS;
+
+ /* Flags that ReAx requires */
+ *indm |= INDEXING_USE_LATTICE_TYPE;
+
p->angular_inc = deg2rad(1.0);
/* Reserve memory, over-estimating the number of directions */
@@ -1160,7 +1166,7 @@ IndexingPrivate *reax_prepare(IndexingMethod indm, UnitCell *cell,
p->r_plan = fftw_plan_dft_2d(p->cw, p->ch, p->r_fft_in, p->r_fft_out,
1, FFTW_MEASURE);
- p->indm = indm;
+ p->indm = *indm;
return (IndexingPrivate *)p;
}