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/indexamajig.c | |
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/indexamajig.c')
-rw-r--r-- | src/indexamajig.c | 20 |
1 files changed, 17 insertions, 3 deletions
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, |