diff options
author | Thomas White <taw@physics.org> | 2019-09-10 15:57:42 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2019-09-12 16:35:52 +0200 |
commit | 8464b6465b57a2ebfedf4f8cc56b37040eb49330 (patch) | |
tree | b937f576a7854cd0f78ae518bd09445f569788ba /src | |
parent | d8af26290429aa6ffe1ba02c15a5392079edffb9 (diff) |
indexamajig: Get rid of --fix-bandwidth / use bandwidth from geometry file
Diffstat (limited to 'src')
-rw-r--r-- | src/indexamajig.c | 12 | ||||
-rw-r--r-- | src/process_image.c | 13 | ||||
-rw-r--r-- | src/process_image.h | 1 |
3 files changed, 9 insertions, 17 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c index 13a44471..0077c7fc 100644 --- a/src/indexamajig.c +++ b/src/indexamajig.c @@ -232,8 +232,7 @@ static void show_help(const char *s) " --integration=<meth> Integration method (rings,prof2d)-(cen,nocen)\n" " Default: rings-nocen\n" " --fix-profile-radius Fix the reciprocal space profile radius for spot\n" -" prediction (default: automatically determine\n" -" --fix-bandwidth Set the bandwidth for spot prediction\n" +" prediction (default: automatically determine)\n" " --fix-divergence Set the divergence (full angle) for spot prediction\n" " --int-radius=<r> Set the integration radii. Default: 4,5,7.\n" " --int-diag=<cond> Show debugging information about reflections\n" @@ -370,7 +369,6 @@ int main(int argc, char *argv[]) iargs.push_res = 0.0; iargs.highres = +INFINITY; iargs.fix_profile_r = -1.0; - iargs.fix_bandwidth = -1.0; iargs.fix_divergence = -1.0; iargs.profile = 0; iargs.no_image_data = 0; @@ -699,11 +697,9 @@ int main(int argc, char *argv[]) break; case 323 : - if ( sscanf(optarg, "%f", &iargs.fix_bandwidth) != 1 ) { - ERROR("Invalid value for --fix-bandwidth\n"); - return 1; - } - break; + ERROR("Option --fix-bandwidth is no longer used.\n"); + ERROR("Set the bandwidth in the geometry file instead.\n"); + return 1; case 324 : if ( sscanf(optarg, "%f", &iargs.fix_divergence) != 1 ) { diff --git a/src/process_image.c b/src/process_image.c index 654ffd46..f28952bc 100644 --- a/src/process_image.c +++ b/src/process_image.c @@ -226,6 +226,8 @@ void process_image(const struct index_args *iargs, struct pattern_args *pargs, &imfile) ) return; } + image.bw = iargs->beam->bandwidth; + /* Take snapshot of image before applying horrible noise filters */ time_accounts_set(taccs, TACC_FILTER); set_last_task(last_task, "image filter"); @@ -369,17 +371,12 @@ void process_image(const struct index_args *iargs, struct pattern_args *pargs, } else { image.div = 0.0; } - if ( iargs->fix_bandwidth >= 0.0 ) { - image.bw = iargs->fix_bandwidth; - } else { - image.bw = 0.00000001; - } - - /* Set beam spectrum for pink beam data */ + /* Set beam spectrum */ if ( iargs->spectrum != NULL ) { image.spectrum = iargs->spectrum; } else { - image.spectrum = spectrum_generate_gaussian(image.lambda, image.bw); + image.spectrum = spectrum_generate_gaussian(image.lambda, + image.bw); } if ( image_feature_count(image.features) < iargs->min_peaks ) { diff --git a/src/process_image.h b/src/process_image.h index 5691a0e4..2e03900e 100644 --- a/src/process_image.h +++ b/src/process_image.h @@ -112,7 +112,6 @@ struct index_args float push_res; float highres; float fix_profile_r; - float fix_bandwidth; float fix_divergence; int overpredict; int profile; /* Whether or not to do wall clock profiling */ |