aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-09-10 15:57:42 +0200
committerThomas White <taw@physics.org>2019-09-12 16:35:52 +0200
commit8464b6465b57a2ebfedf4f8cc56b37040eb49330 (patch)
treeb937f576a7854cd0f78ae518bd09445f569788ba
parentd8af26290429aa6ffe1ba02c15a5392079edffb9 (diff)
indexamajig: Get rid of --fix-bandwidth / use bandwidth from geometry file
-rw-r--r--doc/man/indexamajig.13
-rw-r--r--src/indexamajig.c12
-rw-r--r--src/process_image.c13
-rw-r--r--src/process_image.h1
4 files changed, 10 insertions, 19 deletions
diff --git a/doc/man/indexamajig.1 b/doc/man/indexamajig.1
index 3d96cf0b..9dfdd70d 100644
--- a/doc/man/indexamajig.1
+++ b/doc/man/indexamajig.1
@@ -482,10 +482,9 @@ Integrate the reflections using \fImethod\fR. See the section titled \fBPEAK IN
.PD 0
.IP \fB--fix-profile-radius=\fIn\fR
-.IP \fB--fix-bandwidth=\fIn\fR
.IP \fB--fix-divergence=\fIn\fR
.PD
-Fix the beam and crystal paramters to the given values. The profile radius is given in m^-1, the bandwidth as a decimal fraction and the divergence in radians (full angle). The default is to set the divergence to zero, the bandwidth to a very small value, and then to automatically determine the profile radius.
+Fix the beam and crystal paramters to the given values. The profile radius is given in m^-1 and the divergence in radians (full angle). The default is to set the divergence to zero, and then to automatically determine the profile radius.
.IP
You do not have to use all three of these options together. For example, if the automatic profile radius determination is not working well for your data set, you could fix that alone and continue using the default values for the other parameters (which might be automatically determined in future versions of CrystFEL, but are not currently).
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 */