aboutsummaryrefslogtreecommitdiff
path: root/src/indexamajig.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-03-25 15:24:36 +0100
committerThomas White <taw@physics.org>2021-03-25 16:16:01 +0100
commit31ab21aba60d592d7fc78a302e2f5620727445ee (patch)
treeffbe06942043943ec5df9cfcf2ed4a5c9f4e0a5c /src/indexamajig.c
parent1440b2b897845b713450ef1bc8460d2d6d7bb337 (diff)
indexamajig: Add --camera-length-estimate
Unfortunately, PinkIndexer needs the real camera length for its centre refinement. Giving a fake value and scaling the resulting shift does not work - the indexing rate drops with even a small error. Ideally, this would work in the same way as --wavelength-estimate, by using a static value from the geometry file if it's given. However, this is rather complicated to implement because of the way all the units stuff is implemented. Therefore, this is left as an improvement for the future.
Diffstat (limited to 'src/indexamajig.c')
-rw-r--r--src/indexamajig.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c
index d5d3d31a..eb39a32c 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -467,6 +467,15 @@ static error_t parse_arg(int key, char *arg, struct argp_state *state)
return EINVAL;
}
break;
+
+ case 415 :
+ if (sscanf(arg, "%f", &args->iargs.clen_estimate) != 1)
+ {
+ ERROR("Invalid value for --camera-length-estimate\n");
+ return EINVAL;
+ }
+ break;
+
/* ---------- Integration ---------- */
case 501 :
@@ -682,6 +691,7 @@ int main(int argc, char *argv[])
args.iargs.no_image_data = 0;
args.iargs.no_mask_data = 0;
args.iargs.wavelength_estimate = NAN;
+ args.iargs.clen_estimate = NAN;
args.iargs.n_threads = 1;
argp_program_version_hook = show_version;
@@ -784,6 +794,8 @@ int main(int argc, char *argv[])
"Estimate of the incident radiation wavelength, in metres."},
{"max-indexer-threads", 414, "n", 0,
"Maximum number of threads allowed for indexing engines."},
+ {"camera-length-estimate", 415, "metres", 0,
+ "Estimate of the camera length, in metres."},
{NULL, 0, 0, OPTION_DOC, "Integration options:", 5},
{"integration", 501, "method", OPTION_NO_USAGE, "Integration method"},
@@ -996,6 +1008,7 @@ int main(int argc, char *argv[])
args.iargs.tols,
flags,
args.iargs.wavelength_estimate,
+ args.iargs.clen_estimate,
args.iargs.n_threads,
taketwo_opts,
xgandalf_opts,