aboutsummaryrefslogtreecommitdiff
path: root/src/indexamajig.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-11-16 09:56:24 +0100
committerThomas White <taw@physics.org>2012-02-22 15:27:05 +0100
commit0567569d2f97a5c4aae54d6f8b27f0eeb7539b86 (patch)
tree473b9bf0e5129ac4cedffe775b6696a2de6821fa /src/indexamajig.c
parent5447d802f6c8baedf350c2fe002757b390e7c8da (diff)
indexamajig: Take minimum gradient on command line
Diffstat (limited to 'src/indexamajig.c')
-rw-r--r--src/indexamajig.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c
index 984c1e45..799750f3 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -65,6 +65,7 @@ struct static_index_args
int config_sa;
int config_closer;
float threshold;
+ float min_gradient;
struct detector *det;
IndexingMethod indm;
IndexingPrivate *ipriv;
@@ -183,6 +184,8 @@ static void show_help(const char *s)
" --no-sa Don't correct for the differing solid angles of\n"
" the pixels.\n"
" --threshold=<n> Only accept peaks above <n> ADU. Default: 800.\n"
+" --min-gradient=<n> Minimum gradient for Zaefferer peak search.\n"
+" Default: 100,000.\n"
"\n"
"\nIf you used --simulate, you may also want:\n\n"
" --intensities=<file> Specify file containing reflection intensities\n"
@@ -364,7 +367,8 @@ static void process_image(void *pp, int cookie)
}
break;
case PEAK_ZAEF :
- search_peaks(&image, pargs->static_args.threshold);
+ search_peaks(&image, pargs->static_args.threshold,
+ pargs->static_args.min_gradient);
break;
}
@@ -521,6 +525,7 @@ int main(int argc, char *argv[])
int config_checkprefix = 1;
int config_closer = 1;
float threshold = 800.0;
+ float min_gradient = 100000.0;
struct detector *det;
char *geometry = NULL;
IndexingMethod indm;
@@ -574,6 +579,7 @@ int main(int argc, char *argv[])
{"sat-corr", 0, &config_satcorr, 1}, /* Compat */
{"no-sa", 0, &config_sa, 0},
{"threshold", 1, NULL, 't'},
+ {"min-gradient", 1, NULL, 4},
{"no-check-prefix", 0, &config_checkprefix, 0},
{"no-closer-peak", 0, &config_closer, 0},
{0, 0, NULL, 0}
@@ -641,6 +647,10 @@ int main(int argc, char *argv[])
scellr = strdup(optarg);
break;
+ case 4 :
+ min_gradient = strtof(optarg, NULL);
+ break;
+
case 0 :
break;
@@ -831,6 +841,7 @@ int main(int argc, char *argv[])
qargs.static_args.config_closer = config_closer;
qargs.static_args.cellr = cellr;
qargs.static_args.threshold = threshold;
+ qargs.static_args.min_gradient = min_gradient;
qargs.static_args.det = det;
qargs.static_args.indm = indm;
qargs.static_args.ipriv = ipriv;