aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexandra Tolstikova <alexandra.tolstikova@desy.de>2022-09-21 14:22:19 +0200
committerThomas White <taw@physics.org>2022-09-21 14:22:54 +0200
commit28b263b02c1029741c89d35b5f726889eb2f1da7 (patch)
tree78b0cf5330c30be9d09f9d240540353a7cf003ea /src
parent1f53f659e757cc7d4704a885bab50f7060231d16 (diff)
asdf: Add fast mode
This adds an optional fast mode for asdf indexing, which is around 3 times faster with only a few percent lower success rate.
Diffstat (limited to 'src')
-rw-r--r--src/gui_index.c6
-rw-r--r--src/indexamajig.c8
2 files changed, 11 insertions, 3 deletions
diff --git a/src/gui_index.c b/src/gui_index.c
index b629c751..660dac1c 100644
--- a/src/gui_index.c
+++ b/src/gui_index.c
@@ -577,6 +577,7 @@ static void run_indexing_once(struct crystfelproject *proj)
struct xgandalf_options *xgandalf_opts;
struct pinkindexer_options *pinkIndexer_opts;
struct fromfile_options *fromfile_opts;
+ struct asdf_options *asdf_opts;
char *old_cwd;
char *tmpdir;
int r;
@@ -613,7 +614,8 @@ static void run_indexing_once(struct crystfelproject *proj)
&xgandalf_opts,
&pinkIndexer_opts,
&felix_opts,
- &fromfile_opts);
+ &fromfile_opts,
+ &asdf_opts);
ipriv = setup_indexing(methods, cell,
proj->indexing_params.tols,
@@ -623,7 +625,7 @@ static void run_indexing_once(struct crystfelproject *proj)
1,
taketwoopts, xgandalf_opts,
pinkIndexer_opts, felix_opts,
- NULL);
+ NULL, asdf_opts);
free(methods);
index_pattern(proj->cur_image, ipriv);
diff --git a/src/indexamajig.c b/src/indexamajig.c
index add455b4..461b2216 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -101,6 +101,7 @@ struct indexamajig_arguments
struct xgandalf_options **xgandalf_opts_ptr;
struct pinkindexer_options **pinkindexer_opts_ptr;
struct fromfile_options **fromfile_opts_ptr;
+ struct asdf_options **asdf_opts_ptr;
};
@@ -313,6 +314,7 @@ static error_t parse_arg(int key, char *arg, struct argp_state *state)
state->child_inputs[2] = args->xgandalf_opts_ptr;
state->child_inputs[3] = args->pinkindexer_opts_ptr;
state->child_inputs[4] = args->fromfile_opts_ptr;
+ state->child_inputs[5] = args->asdf_opts_ptr;
break;
case 'h' :
@@ -840,6 +842,7 @@ int main(int argc, char *argv[])
struct xgandalf_options *xgandalf_opts = NULL;
struct pinkindexer_options *pinkindexer_opts = NULL;
struct fromfile_options *fromfile_opts = NULL;
+ struct asdf_options *asdf_opts = NULL;
double wl_from_dt;
/* Defaults for "top level" arguments */
@@ -878,6 +881,7 @@ int main(int argc, char *argv[])
args.xgandalf_opts_ptr = &xgandalf_opts;
args.pinkindexer_opts_ptr = &pinkindexer_opts;
args.fromfile_opts_ptr = &fromfile_opts;
+ args.asdf_opts_ptr = &asdf_opts;
/* Defaults for process_image arguments */
args.iargs.cell = NULL;
@@ -1088,6 +1092,7 @@ int main(int argc, char *argv[])
{&xgandalf_argp, 0, NULL, -2},
{&pinkIndexer_argp, 0, NULL, -2},
{&fromfile_argp, 0, NULL, -2},
+ {&asdf_argp, 0, NULL, -2},
{0}
};
@@ -1295,7 +1300,8 @@ int main(int argc, char *argv[])
xgandalf_opts,
pinkindexer_opts,
felix_opts,
- fromfile_opts);
+ fromfile_opts,
+ asdf_opts);
free(args.filename);