From a9d289c5c9c5c3491b8ecd6580c381a423094734 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 12 Feb 2013 02:16:44 -0800 Subject: Improve handling of indexing methods --- libcrystfel/src/reax.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'libcrystfel/src/reax.c') 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; } -- cgit v1.2.3