diff options
-rw-r--r-- | libcrystfel/CMakeLists.txt | 24 | ||||
-rw-r--r-- | libcrystfel/meson.build | 24 | ||||
-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 | ||||
-rw-r--r-- | src/indexamajig.c | 6 |
21 files changed, 62 insertions, 78 deletions
diff --git a/libcrystfel/CMakeLists.txt b/libcrystfel/CMakeLists.txt index 394156ed..6bac46f0 100644 --- a/libcrystfel/CMakeLists.txt +++ b/libcrystfel/CMakeLists.txt @@ -45,19 +45,12 @@ set(LIBCRYSTFEL_SOURCES src/reflist-utils.c src/filters.c src/index.c - src/dirax.c - src/mosflm.c src/cell-utils.c src/integer_matrix.c src/crystal.c - src/xds.c src/integration.c src/predict-refine.c - src/felix.c src/peakfinder8.c - src/taketwo.c - src/xgandalf.c - src/pinkindexer.c src/rational.c src/spectrum.c src/datatemplate.c @@ -66,9 +59,16 @@ set(LIBCRYSTFEL_SOURCES src/image-cbf.c src/image-hdf5.c src/image-msgpack.c - src/asdf.c ${BISON_symopp_OUTPUTS} ${FLEX_symopl_OUTPUTS} + src/indexers/dirax.c + src/indexers/mosflm.c + src/indexers/xds.c + src/indexers/felix.c + src/indexers/taketwo.c + src/indexers/asdf.c + src/indexers/xgandalf.c + src/indexers/pinkindexer.c ) set(LIBCRYSTFEL_HEADERS @@ -85,20 +85,12 @@ set(LIBCRYSTFEL_HEADERS src/index.h src/image.h src/filters.h - src/dirax.h - src/mosflm.h src/cell-utils.h src/integer_matrix.h src/crystal.h - src/xds.h src/predict-refine.h src/integration.h - src/asdf.h - src/felix.h src/peakfinder8.h - src/taketwo.h - src/xgandalf.h - src/pinkindexer.h src/rational.h src/spectrum.h src/datatemplate.h diff --git a/libcrystfel/meson.build b/libcrystfel/meson.build index 412fe90a..d8543eb8 100644 --- a/libcrystfel/meson.build +++ b/libcrystfel/meson.build @@ -80,21 +80,13 @@ libcrystfel_sources = ['src/image.c', 'src/crystal.c', 'src/integration.c', 'src/symmetry.c', - 'src/mosflm.c', - 'src/taketwo.c', - 'src/dirax.c', 'src/peakfinder8.c', 'src/thread-pool.c', 'src/peaks.c', 'src/utils.c', - 'src/felix.c', 'src/predict-refine.c', - 'src/xds.c', - 'src/asdf.c', 'src/filters.c', 'src/rational.c', - 'src/xgandalf.c', - 'src/pinkindexer.c', 'src/geometry.c', 'src/reflist.c', 'src/reflist-utils.c', @@ -104,6 +96,14 @@ libcrystfel_sources = ['src/image.c', 'src/image-cbf.c', 'src/image-hdf5.c', 'src/image-msgpack.c', + 'src/indexers/dirax.c', + 'src/indexers/felix.c', + 'src/indexers/mosflm.c', + 'src/indexers/taketwo.c', + 'src/indexers/xds.c', + 'src/indexers/asdf.c', + 'src/indexers/xgandalf.c', + 'src/indexers/pinkindexer.c', symop_lex_ch, symop_parse_ch, ] @@ -138,20 +138,12 @@ install_headers(['src/reflist.h', 'src/index.h', 'src/image.h', 'src/filters.h', - 'src/dirax.h', - 'src/mosflm.h', 'src/cell-utils.h', 'src/integer_matrix.h', 'src/crystal.h', - 'src/xds.h', 'src/predict-refine.h', 'src/integration.h', - 'src/asdf.h', - 'src/felix.h', 'src/peakfinder8.h', - 'src/taketwo.h', - 'src/xgandalf.h', - 'src/pinkindexer.h', 'src/rational.h', 'src/spectrum.h', 'src/datatemplate.h', 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); diff --git a/src/indexamajig.c b/src/indexamajig.c index 7ef4f35c..2d0e53c8 100644 --- a/src/indexamajig.c +++ b/src/indexamajig.c @@ -59,7 +59,6 @@ #include <reflist-utils.h> #include <cell-utils.h> #include <integration.h> -#include <taketwo.h> #include <image.h> #include <datatemplate.h> @@ -244,7 +243,10 @@ static error_t parse_arg(int key, char *arg, struct argp_state *state) ERROR("Invalid value for --min-peaks\n"); return EINVAL; } - (*(args->pinkindexer_opts_ptr))->min_peaks = args->iargs.min_peaks; + /* FIXME: Horrible layering violation, needed for + * pinkIndexer multi-lattice indexing but no longer + * possible. */ + //(*(args->pinkindexer_opts_ptr))->min_peaks = args->iargs.min_peaks; break; case 304 : |