aboutsummaryrefslogtreecommitdiff
path: root/src/indexamajig.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2014-08-13 15:23:59 +0200
committerThomas White <taw@physics.org>2014-08-13 15:23:59 +0200
commit9ded4081da3f2f315b63914df7bb5fbc903b4516 (patch)
treef2d63b24ca5e35cdc36a9d1462f4833aabe13701 /src/indexamajig.c
parent918316caca74df894193922b1e0bc132afcf6ee5 (diff)
indexamajig: Add --highres
Diffstat (limited to 'src/indexamajig.c')
-rw-r--r--src/indexamajig.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c
index fcf97dd4..2ef98c2c 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -130,6 +130,7 @@ static void show_help(const char *s)
" Example: /data/data0.\n"
" Default: The first one found.\n"
" --push-res=<n> Integrate higher than apparent resolution cutoff.\n"
+" --highres=<n> Absolute resolution cutoff in Angstroms.\n"
"\n"
"\nFor time-resolved stuff, you might want to use:\n\n"
" --copy-hdf5-field <f> Copy the value of field <f> into the stream. You\n"
@@ -238,6 +239,7 @@ int main(int argc, char *argv[])
iargs.ipriv = NULL; /* No default */
iargs.int_meth = integration_method("rings-nocen", NULL);
iargs.push_res = 0.0;
+ iargs.highres = +INFINITY;
/* Long options */
const struct option longopts[] = {
@@ -292,6 +294,7 @@ int main(int argc, char *argv[])
{"push-res", 1, NULL, 19},
{"res-push", 1, NULL, 19}, /* compat */
{"peak-radius", 1, NULL, 20},
+ {"highres", 1, NULL, 21},
{0, 0, NULL, 0}
};
@@ -442,6 +445,15 @@ int main(int argc, char *argv[])
pkrad = strdup(optarg);
break;
+ case 21 :
+ if ( sscanf(optarg, "%f", &iargs.highres) != 1 ) {
+ ERROR("Invalid value for --highres\n");
+ return 1;
+ }
+ /* A -> m^-1 */
+ iargs.highres = 1.0 / (iargs.highres/1e10);
+ break;
+
case 0 :
break;