diff options
author | Valerio Mariani <valerio.mariani@desy.de> | 2016-10-07 15:49:06 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2016-10-10 15:21:58 +0200 |
commit | 308d39b074a584cd5138206d685075791e7e6c12 (patch) | |
tree | f4ff21d742b31a0f11ecac1af1a7db98c93c36d0 /src/geoptimiser.c | |
parent | 4f17116d29759077a02d80fd410965f848ffc05f (diff) |
New default min peak distance for geoptimiser
Diffstat (limited to 'src/geoptimiser.c')
-rw-r--r-- | src/geoptimiser.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/geoptimiser.c b/src/geoptimiser.c index e85775c2..b17f4138 100644 --- a/src/geoptimiser.c +++ b/src/geoptimiser.c @@ -87,9 +87,9 @@ static void show_help(const char *s) " Default: 3. \n" " --min-num-peaks-per-panel=<num> DEPRECATED. This option has been\n" " renamed to --min-num-pixels-per-conn-group.\n" -" -p, --min-num-pixels-per-conn-group=<num> Minimum number of useful pixels pern" +" -p, --min-num-pixels-per-conn-group=<num> Minimum number of useful pixels per\n" " connected group.\n" -" f Default: 100.\n" +" f Default: 100.\n" " -l, --most-freq-clen Use only the most frequent camera\n" " length.\n" " -s, --individual-dist-offset Use a distance offset for each panel.\n" @@ -98,7 +98,7 @@ static void show_help(const char *s) " Default: distance offset is optimized\n" " -m --max-peak-dist=<num> Maximum distance between predicted and\n" " detected peaks (in pixels)\n" -" Default: 4.0 pixels.\n" +" Default: half of minimal inter-Bragg distance\n" ); } @@ -500,6 +500,13 @@ static double pick_clen_to_use(struct geoptimiser_params *gparams, min_braggp_dist, gparams->max_peak_dist); } + if ( gparams->max_peak_dist==0.0 ) { + gparams->max_peak_dist = 0.5*min_braggp_dist; + STATUS("WARNING: Maximum distance between peaks is " + "set to: %0.1f pixels.\n", + gparams->max_peak_dist); + } + if ( clens_population[i] > clens_population[best_clen] ) { best_clen = i; clen_to_use = clens[best_clen]; @@ -2312,7 +2319,7 @@ int main(int argc, char *argv[]) gparams->individual_coffset = 0; gparams->no_cspad = 0; gparams->error_maps = 1; - gparams->max_peak_dist = 4.0; + gparams->max_peak_dist = 0.0; const struct option longopts[] = { |