aboutsummaryrefslogtreecommitdiff
path: root/src/indexamajig.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-01-13 10:46:44 +0100
committerThomas White <taw@physics.org>2010-01-13 10:46:44 +0100
commitf7d118ec0bc9e7dd964bbb9a8bc4fad46b8412d7 (patch)
treec4e3da3218d1f8c61a3e0e6147a260245018d9e0 /src/indexamajig.c
parent26dc86b5b6624177591909ae3d2c8d7d8bae9159 (diff)
Make DirAx use optional
Diffstat (limited to 'src/indexamajig.c')
-rw-r--r--src/indexamajig.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c
index 7c2e1b5d..7f863a65 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -23,7 +23,7 @@
#include "utils.h"
#include "hdf5-file.h"
-#include "dirax.h"
+#include "index.h"
#include "intensities.h"
#include "ewald.h"
#include "peaks.h"
@@ -39,8 +39,10 @@ static void show_help(const char *s)
"\n"
" -i, --input=<filename> Specify file containing list of images to process.\n"
" '-' means stdin, which is the default.\n"
-" --no-index Do everything else (including fine peak search),\n"
-" but don't invoke the indexing program.\n"
+" --no-index Do everything else (including fine peak search and\n"
+" writing 'xfel.drx' if DirAx is being used), but\n"
+" don't actually index.\n"
+" --dirax Use DirAx for indexing.\n"
"\n");
}
@@ -55,6 +57,7 @@ int main(int argc, char *argv[])
int n_hits;
int config_noindex = 0;
int config_dumpfound = 0;
+ int config_dirax = 0;
/* Long options */
const struct option longopts[] = {
@@ -62,6 +65,7 @@ int main(int argc, char *argv[])
{"input", 1, NULL, 'i'},
{"no-index", 0, &config_noindex, 1},
{"dump-found-peaks", 0, &config_dumpfound, 1},
+ {"dirax", 0, &config_dirax, 1},
{0, 0, NULL, 0}
};
@@ -135,7 +139,10 @@ int main(int argc, char *argv[])
if ( fom > 0 ) {
/* Calculate orientation matrix (by magic) */
- index_pattern(&image, config_noindex, config_dumpfound);
+ index_pattern(&image, config_noindex, config_dumpfound,
+ config_dirax);
+
+ if ( image.molecule == NULL ) continue;
/* View head-on (unit cell is tilted) */
image.orientation.x = 0.0;