From 28b263b02c1029741c89d35b5f726889eb2f1da7 Mon Sep 17 00:00:00 2001 From: Alexandra Tolstikova Date: Wed, 21 Sep 2022 14:22:19 +0200 Subject: 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. --- src/gui_index.c | 6 ++++-- src/indexamajig.c | 8 +++++++- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'src') 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); -- cgit v1.2.3