From 29fdf21f5bc807e612cb560d262617304fef33fe Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 6 Mar 2019 15:11:17 +0100 Subject: indexamajig: Rename --min-gradient to --min-squared-gradient The eventual aim of this is to deprecate the "--min-gradient" option, resolving the long-standing confusion about whether this option is the gradient or the squared gradient. --- src/indexamajig.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/indexamajig.c') diff --git a/src/indexamajig.c b/src/indexamajig.c index f452b033..2d584726 100644 --- a/src/indexamajig.c +++ b/src/indexamajig.c @@ -98,7 +98,8 @@ static void show_help(const char *s) " --filter-noise Apply noise filter to image data\n" " --threshold= Threshold for peak detection\n" " (zaef,peakfinder8 only) Default: 800\n" -" --min-gradient= Minimum squared gradient\n" +" --min-squared-gradient=\n" +" Minimum squared gradient\n" " (zaef only) Default: 100,000\n" " --min-snr= Minimum signal/noise ratio for peaks\n" " (zaef,peakfinder8, peakfinder9 only) Default: 5\n" @@ -350,7 +351,7 @@ int main(int argc, char *argv[]) iargs.tols[2] = 5.0; iargs.tols[3] = 1.5; iargs.threshold = 800.0; - iargs.min_gradient = 100000.0; + iargs.min_sq_gradient = 100000.0; iargs.min_snr = 5.0; iargs.min_pix_count = 2; iargs.max_pix_count = 200; @@ -531,6 +532,8 @@ int main(int argc, char *argv[]) {"xgandalf-max-lvl", 1, NULL, 356}, {"spectrum-file", 1, NULL, 357}, {"wait-for-file", 1, NULL, 358}, + {"min-squared-gradient",1,NULL, 359}, + {"min-sq-gradient", 1, NULL, 359}, /* compat */ {0, 0, NULL, 0} }; @@ -602,7 +605,9 @@ int main(int argc, char *argv[]) return 1; case 304 : - iargs.min_gradient = strtof(optarg, NULL); + iargs.min_sq_gradient = strtof(optarg, NULL); + ERROR("Recommend using --min-squared-gradient instead " + "of --min-gradient.\n"); break; case 305 : @@ -933,6 +938,10 @@ int main(int argc, char *argv[]) } break; + case 359 : + iargs.min_sq_gradient = strtof(optarg, NULL); + break; + case 0 : break; -- cgit v1.2.3