diff options
author | Thomas White <taw@physics.org> | 2020-08-07 17:43:18 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-08-07 18:07:07 +0200 |
commit | c0b01532441407dc97eaa9d44b540f1dd0223990 (patch) | |
tree | a1526e8bb84d38e8e6dfab05d2d95e1a5b5a3d10 /libcrystfel/src | |
parent | 08327436744a05e68daf1676f0fa4a82fb74408f (diff) |
Move indexers out of API
Diffstat (limited to 'libcrystfel/src')
-rw-r--r-- | libcrystfel/src/index.c | 16 | ||||
-rw-r--r-- | libcrystfel/src/index.h | 14 | ||||
-rw-r--r-- | libcrystfel/src/indexers/asdf.c (renamed from libcrystfel/src/asdf.c) | 0 | ||||
-rw-r--r-- | libcrystfel/src/indexers/asdf.h (renamed from libcrystfel/src/asdf.h) | 0 | ||||
-rw-r--r-- | libcrystfel/src/indexers/dirax.c (renamed from libcrystfel/src/dirax.c) | 0 | ||||
-rw-r--r-- | libcrystfel/src/indexers/dirax.h (renamed from libcrystfel/src/dirax.h) | 0 | ||||
-rw-r--r-- | libcrystfel/src/indexers/felix.c (renamed from libcrystfel/src/felix.c) | 0 | ||||
-rw-r--r-- | libcrystfel/src/indexers/felix.h (renamed from libcrystfel/src/felix.h) | 3 | ||||
-rw-r--r-- | libcrystfel/src/indexers/mosflm.c (renamed from libcrystfel/src/mosflm.c) | 0 | ||||
-rw-r--r-- | libcrystfel/src/indexers/mosflm.h (renamed from libcrystfel/src/mosflm.h) | 0 | ||||
-rw-r--r-- | libcrystfel/src/indexers/pinkindexer.c (renamed from libcrystfel/src/pinkindexer.c) | 27 | ||||
-rw-r--r-- | libcrystfel/src/indexers/pinkindexer.h (renamed from libcrystfel/src/pinkindexer.h) | 20 | ||||
-rw-r--r-- | libcrystfel/src/indexers/taketwo.c (renamed from libcrystfel/src/taketwo.c) | 0 | ||||
-rw-r--r-- | libcrystfel/src/indexers/taketwo.h (renamed from libcrystfel/src/taketwo.h) | 3 | ||||
-rw-r--r-- | libcrystfel/src/indexers/xds.c (renamed from libcrystfel/src/xds.c) | 0 | ||||
-rw-r--r-- | libcrystfel/src/indexers/xds.h (renamed from libcrystfel/src/xds.h) | 0 | ||||
-rw-r--r-- | libcrystfel/src/indexers/xgandalf.c (renamed from libcrystfel/src/xgandalf.c) | 0 | ||||
-rw-r--r-- | libcrystfel/src/indexers/xgandalf.h (renamed from libcrystfel/src/xgandalf.h) | 3 |
18 files changed, 42 insertions, 44 deletions
diff --git a/libcrystfel/src/index.c b/libcrystfel/src/index.c index b62f1926..a50d4d31 100644 --- a/libcrystfel/src/index.c +++ b/libcrystfel/src/index.c @@ -46,18 +46,18 @@ #include "image.h" #include "utils.h" #include "peaks.h" -#include "dirax.h" -#include "asdf.h" -#include "mosflm.h" -#include "xds.h" #include "index.h" #include "geometry.h" #include "cell-utils.h" -#include "felix.h" #include "predict-refine.h" -#include "taketwo.h" -#include "xgandalf.h" -#include "pinkindexer.h" +#include "indexers/dirax.h" +#include "indexers/asdf.h" +#include "indexers/mosflm.h" +#include "indexers/xds.h" +#include "indexers/felix.h" +#include "indexers/taketwo.h" +#include "indexers/xgandalf.h" +#include "indexers/pinkindexer.h" /** \file index.h */ diff --git a/libcrystfel/src/index.h b/libcrystfel/src/index.h index 58fe64b7..8fc6db09 100644 --- a/libcrystfel/src/index.h +++ b/libcrystfel/src/index.h @@ -142,12 +142,18 @@ extern IndexingMethod get_indm_from_string_2(const char *method, int *err); #include "cell.h" #include "image.h" -#include "taketwo.h" -#include "xgandalf.h" -#include "pinkindexer.h" -#include "felix.h" #include "datatemplate.h" +typedef struct felix_options FelixOptions; +typedef struct taketwo_options TakeTwoOptions; +typedef struct xgandalf_options XGandalfOptions; +typedef struct pinkIndexer_options PinkIndexerOptions; + +extern struct argp felix_argp; +extern struct argp pinkIndexer_argp; +extern struct argp taketwo_argp; +extern struct argp xgandalf_argp; + extern IndexingPrivate *setup_indexing(const char *methods, UnitCell *cell, const DataTemplate *dtempl, float *ltl, diff --git a/libcrystfel/src/asdf.c b/libcrystfel/src/indexers/asdf.c index 1536a109..1536a109 100644 --- a/libcrystfel/src/asdf.c +++ b/libcrystfel/src/indexers/asdf.c diff --git a/libcrystfel/src/asdf.h b/libcrystfel/src/indexers/asdf.h index b3ccffcc..b3ccffcc 100644 --- a/libcrystfel/src/asdf.h +++ b/libcrystfel/src/indexers/asdf.h diff --git a/libcrystfel/src/dirax.c b/libcrystfel/src/indexers/dirax.c index 24be87ba..24be87ba 100644 --- a/libcrystfel/src/dirax.c +++ b/libcrystfel/src/indexers/dirax.c diff --git a/libcrystfel/src/dirax.h b/libcrystfel/src/indexers/dirax.h index da4ae3d5..da4ae3d5 100644 --- a/libcrystfel/src/dirax.h +++ b/libcrystfel/src/indexers/dirax.h diff --git a/libcrystfel/src/felix.c b/libcrystfel/src/indexers/felix.c index 524e68a7..524e68a7 100644 --- a/libcrystfel/src/felix.c +++ b/libcrystfel/src/indexers/felix.c diff --git a/libcrystfel/src/felix.h b/libcrystfel/src/indexers/felix.h index f7e4d26a..3c9d4a94 100644 --- a/libcrystfel/src/felix.h +++ b/libcrystfel/src/indexers/felix.h @@ -39,9 +39,6 @@ * Felix indexer interface */ -typedef struct felix_options FelixOptions; -extern struct argp felix_argp; - extern void *felix_prepare(IndexingMethod *indm, UnitCell *cell, struct felix_options *opts); diff --git a/libcrystfel/src/mosflm.c b/libcrystfel/src/indexers/mosflm.c index bacd345f..bacd345f 100644 --- a/libcrystfel/src/mosflm.c +++ b/libcrystfel/src/indexers/mosflm.c diff --git a/libcrystfel/src/mosflm.h b/libcrystfel/src/indexers/mosflm.h index 9e956066..9e956066 100644 --- a/libcrystfel/src/mosflm.h +++ b/libcrystfel/src/indexers/mosflm.h diff --git a/libcrystfel/src/pinkindexer.c b/libcrystfel/src/indexers/pinkindexer.c index e82f2f02..67bd48f5 100644 --- a/libcrystfel/src/pinkindexer.c +++ b/libcrystfel/src/indexers/pinkindexer.c @@ -32,17 +32,36 @@ #include "pinkindexer.h" -#ifdef HAVE_PINKINDEXER #include <stdlib.h> +#include <sys/errno.h> +#include <argp.h> #include "utils.h" #include "cell-utils.h" #include "peaks.h" -#include "pinkIndexer/adaptions/crystfel/Lattice.h" -#include "pinkIndexer/adaptions/crystfel/ExperimentSettings.h" -#include "pinkIndexer/adaptions/crystfel/PinkIndexer.h" +struct pinkIndexer_options { + unsigned int considered_peaks_count; + unsigned int angle_resolution; + unsigned int refinement_type; + float maxResolutionForIndexing_1_per_A; + float tolerance; + int multi; + int thread_count; + int min_peaks; + int no_check_indexed; + float reflectionRadius; /* In m^-1 */ + float customPhotonEnergy; + float customBandwidth; + float maxRefinementDisbalance; +}; + +#ifdef HAVE_PINKINDEXER + +#include <pinkIndexer/adaptions/crystfel/Lattice.h> +#include <pinkIndexer/adaptions/crystfel/ExperimentSettings.h> +#include <pinkIndexer/adaptions/crystfel/PinkIndexer.h> #define MAX_MULTI_LATTICE_COUNT 8 diff --git a/libcrystfel/src/pinkindexer.h b/libcrystfel/src/indexers/pinkindexer.h index 83e879db..cab88a75 100644 --- a/libcrystfel/src/pinkindexer.h +++ b/libcrystfel/src/indexers/pinkindexer.h @@ -29,26 +29,8 @@ #ifndef LIBCRYSTFEL_SRC_PINKINDEXER_H_ #define LIBCRYSTFEL_SRC_PINKINDEXER_H_ -typedef struct pinkIndexer_options PinkIndexerOptions; -extern struct argp pinkIndexer_argp; - -struct pinkIndexer_options { - unsigned int considered_peaks_count; - unsigned int angle_resolution; - unsigned int refinement_type; - float maxResolutionForIndexing_1_per_A; - float tolerance; - int multi; - int thread_count; - int min_peaks; - int no_check_indexed; - float reflectionRadius; /* In m^-1 */ - float customPhotonEnergy; - float customBandwidth; - float maxRefinementDisbalance; -}; - #include <stddef.h> + #include "index.h" #include "datatemplate.h" diff --git a/libcrystfel/src/taketwo.c b/libcrystfel/src/indexers/taketwo.c index 65265b0e..65265b0e 100644 --- a/libcrystfel/src/taketwo.c +++ b/libcrystfel/src/indexers/taketwo.c diff --git a/libcrystfel/src/taketwo.h b/libcrystfel/src/indexers/taketwo.h index 2239a77a..50fa221d 100644 --- a/libcrystfel/src/taketwo.h +++ b/libcrystfel/src/indexers/taketwo.h @@ -38,9 +38,6 @@ /** \file taketwo.h */ -typedef struct taketwo_options TakeTwoOptions; -extern struct argp taketwo_argp; - extern void *taketwo_prepare(IndexingMethod *indm, struct taketwo_options *opts, UnitCell *cell); extern const char *taketwo_probe(UnitCell *cell); diff --git a/libcrystfel/src/xds.c b/libcrystfel/src/indexers/xds.c index 02610d5e..02610d5e 100644 --- a/libcrystfel/src/xds.c +++ b/libcrystfel/src/indexers/xds.c diff --git a/libcrystfel/src/xds.h b/libcrystfel/src/indexers/xds.h index 8c4dc6d0..8c4dc6d0 100644 --- a/libcrystfel/src/xds.h +++ b/libcrystfel/src/indexers/xds.h diff --git a/libcrystfel/src/xgandalf.c b/libcrystfel/src/indexers/xgandalf.c index 2d2dca48..2d2dca48 100644 --- a/libcrystfel/src/xgandalf.c +++ b/libcrystfel/src/indexers/xgandalf.c diff --git a/libcrystfel/src/xgandalf.h b/libcrystfel/src/indexers/xgandalf.h index 86294354..288d141a 100644 --- a/libcrystfel/src/xgandalf.h +++ b/libcrystfel/src/indexers/xgandalf.h @@ -37,9 +37,6 @@ * XGANDALF indexer interface */ -typedef struct xgandalf_options XGandalfOptions; -extern struct argp xgandalf_argp; - #include "index.h" extern int run_xgandalf(struct image *image, void *ipriv); |