aboutsummaryrefslogtreecommitdiff
path: root/src/indexamajig.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2023-02-08 15:52:29 +0100
committerThomas White <taw@physics.org>2023-02-08 15:52:29 +0100
commitc25749106ba046e1d13ec91703952aafc0fb6807 (patch)
tree30835cb398654ad888c21c47f0b44e639b3e0fda /src/indexamajig.c
parent129ddd9f60ff61b3bd7ec87b9c5d108d1d54045d (diff)
indexamajig: Use static clen as --camera-length-estimate, if given
This makes it work the same way as --wavelength-estimate.
Diffstat (limited to 'src/indexamajig.c')
-rw-r--r--src/indexamajig.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c
index 67206070..2f431636 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -856,6 +856,7 @@ int main(int argc, char *argv[])
struct fromfile_options *fromfile_opts = NULL;
struct asdf_options *asdf_opts = NULL;
double wl_from_dt;
+ double clen_from_dt;
/* Defaults for "top level" arguments */
args.filename = NULL;
@@ -1260,6 +1261,16 @@ int main(int argc, char *argv[])
args.iargs.wavelength_estimate = wl_from_dt;
}
+ clen_from_dt = data_template_get_clen_if_possible(args.iargs.dtempl);
+ if ( !isnan(clen_from_dt) ) {
+ if ( !isnan(args.iargs.clen_estimate) ) {
+ ERROR("WARNING: Ignoring your value for "
+ "--camera-length-estimate because the geometry file "
+ "already contains a static value.\n");
+ }
+ args.iargs.clen_estimate = clen_from_dt;
+ }
+
/* Prepare the indexing system */
if ( args.indm_str == NULL ) {