diff options
author | Thomas White <taw@physics.org> | 2021-03-10 14:30:18 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2021-03-11 15:59:08 +0100 |
commit | 1f02539c192e1c400474ea480341ccefb49eaf36 (patch) | |
tree | 17ba602621e321d209ed95cb7bf8612511a6a5f0 /src | |
parent | fb230df5c97b1a351db3d3aedbb90b59b8688651 (diff) |
indexamajig: Add --wavelength-estimate
This is a more sensible non-indexer-specific and non-Xray-specific
replacement for --pinkIndexer-override-photon-energy
Diffstat (limited to 'src')
-rw-r--r-- | src/gui_index.c | 3 | ||||
-rw-r--r-- | src/indexamajig.c | 20 | ||||
-rw-r--r-- | src/process_image.h | 1 |
3 files changed, 20 insertions, 4 deletions
diff --git a/src/gui_index.c b/src/gui_index.c index 85e36f36..f244f1f5 100644 --- a/src/gui_index.c +++ b/src/gui_index.c @@ -516,9 +516,10 @@ static void run_indexing_once(struct crystfelproject *proj) &pinkIndexer_opts, &felix_opts); - ipriv = setup_indexing(methods, cell, proj->dtempl, + ipriv = setup_indexing(methods, cell, proj->indexing_params.tols, indexing_flags(&proj->indexing_params), + proj->cur_image->lambda, taketwoopts, xgandalf_opts, pinkIndexer_opts, felix_opts); free(methods); diff --git a/src/indexamajig.c b/src/indexamajig.c index 3780b33a..f33d3ec8 100644 --- a/src/indexamajig.c +++ b/src/indexamajig.c @@ -9,7 +9,7 @@ * Copyright © 2012 Lorenzo Galli * * Authors: - * 2010-2020 Thomas White <taw@physics.org> + * 2010-2021 Thomas White <taw@physics.org> * 2011 Richard Kirian * 2012 Lorenzo Galli * 2012 Chunhong Yoon @@ -455,6 +455,14 @@ static error_t parse_arg(int key, char *arg, struct argp_state *state) * better than the user expected. */ break; + case 413 : + if (sscanf(arg, "%f", &args->iargs.wavelength_estimate) != 1) + { + ERROR("Invalid value for --wavelength-estimate\n"); + return EINVAL; + } + break; + /* ---------- Integration ---------- */ case 501 : @@ -666,6 +674,7 @@ int main(int argc, char *argv[]) args.iargs.fix_divergence = -1.0; args.iargs.no_image_data = 0; args.iargs.no_mask_data = 0; + args.iargs.wavelength_estimate = NAN; argp_program_version_hook = show_version; @@ -763,6 +772,8 @@ int main(int argc, char *argv[]) "accounted for by the indexing solution"}, {"check-peaks", 411, NULL, OPTION_HIDDEN, NULL}, {"no-cell-combinations", 412, NULL, OPTION_HIDDEN, NULL}, + {"wavelength-estimate", 413, "metres", 0, + "Estimate of the incident radiation wavelength, in metres."}, {NULL, 0, 0, OPTION_DOC, "Integration options:", 5}, {"integration", 501, "method", OPTION_NO_USAGE, "Integration method"}, @@ -960,9 +971,12 @@ int main(int argc, char *argv[]) flags |= INDEXING_RETRY; } - args.iargs.ipriv = setup_indexing(args.indm_str, args.iargs.cell, + args.iargs.ipriv = setup_indexing(args.indm_str, + args.iargs.cell, args.iargs.dtempl, - args.iargs.tols, flags, + args.iargs.tols, + flags, + args.iargs.wavelength_estimate, taketwo_opts, xgandalf_opts, pinkindexer_opts, diff --git a/src/process_image.h b/src/process_image.h index e64118dd..8174f73d 100644 --- a/src/process_image.h +++ b/src/process_image.h @@ -98,6 +98,7 @@ struct index_args signed int wait_for_file; /* -1 means wait forever */ int no_image_data; int no_mask_data; + float wavelength_estimate; }; |