From b163b4d6cc9bc0312b445047b2a057e685237e02 Mon Sep 17 00:00:00 2001 From: Cornelius Gati Date: Mon, 28 Jan 2013 15:47:30 +0100 Subject: Changed index.c/.h --- libcrystfel/src/index.c | 16 ++++++++++++++++ libcrystfel/src/index.h | 1 + libcrystfel/src/xds.h | 11 ++++++----- 3 files changed, 23 insertions(+), 5 deletions(-) (limited to 'libcrystfel/src') diff --git a/libcrystfel/src/index.c b/libcrystfel/src/index.c index 7d912902..49f5636b 100644 --- a/libcrystfel/src/index.c +++ b/libcrystfel/src/index.c @@ -11,6 +11,7 @@ * 2010-2012 Thomas White * 2010-2011 Richard Kirian * 2012 Lorenzo Galli + * 2013 Cornelius Gati * * This file is part of CrystFEL. * @@ -44,6 +45,7 @@ #include "peaks.h" #include "dirax.h" #include "mosflm.h" +#include "xds.h" #include "detector.h" #include "index.h" #include "index-priv.h" @@ -97,6 +99,10 @@ IndexingPrivate **prepare_indexing(IndexingMethod *indm, UnitCell *cell, iprivs[n] = indexing_private(indm[n]); break; + case INDEXING_XDS : + iprivs[n] = indexing_private(indm[n]); + break; + case INDEXING_REAX : iprivs[n] = reax_prepare(); break; @@ -132,6 +138,10 @@ void cleanup_indexing(IndexingPrivate **priv) free(priv[n]); break; + case INDEXING_XDS : + free(priv[n]); + break; + case INDEXING_REAX : reax_cleanup(priv[n]); break; @@ -196,6 +206,10 @@ void index_pattern(struct image *image, UnitCell *cell, IndexingMethod *indm, run_mosflm(image, cell); break; + case INDEXING_XDS : + run_XDS(image, cell); + break; + case INDEXING_REAX : reax_index(ipriv[n], image, cell); break; @@ -294,6 +308,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], "xds") == 0) { + list[i] = INDEXING_xds; } else if ( strcmp(methods[i], "reax") == 0) { list[i] = INDEXING_REAX; *need_cell = 1; diff --git a/libcrystfel/src/index.h b/libcrystfel/src/index.h index 9d23f3fb..406ad317 100644 --- a/libcrystfel/src/index.h +++ b/libcrystfel/src/index.h @@ -48,6 +48,7 @@ typedef enum { INDEXING_NONE, INDEXING_DIRAX, INDEXING_MOSFLM, + INDEXING_xds, INDEXING_REAX, } IndexingMethod; diff --git a/libcrystfel/src/xds.h b/libcrystfel/src/xds.h index 1aedf57f..3521ebc5 100644 --- a/libcrystfel/src/xds.h +++ b/libcrystfel/src/xds.h @@ -1,13 +1,14 @@ /* * grainspotter.h * - * Invoke GrainSpotter for multi-crystal autoindexing + * Invoke xds for crystal autoindexing * * Copyright © 2013 Deutsches Elektronen-Synchrotron DESY, * a research centre of the Helmholtz Association. * * Authors: * 2010-2013 Thomas White + * 2013 Cornelius Gati * * This file is part of CrystFEL. * @@ -26,8 +27,8 @@ * */ -#ifndef GRAINSPOTTER_H -#define GRAINSPOTTER_H +#ifndef xds_H +#define xds_H #ifdef HAVE_CONFIG_H #include @@ -36,7 +37,7 @@ #include "cell.h" -extern void run_grainspotter(struct image *image, UnitCell *cell); +extern void run_xds(struct image *image, UnitCell *cell); -#endif /* GRAINSPOTTER_H */ +#endif /* XDS_H */ -- cgit v1.2.3