aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/man/indexamajig.15
-rw-r--r--src/indexamajig.c12
-rw-r--r--src/process_image.c2
-rw-r--r--src/process_image.h1
4 files changed, 20 insertions, 0 deletions
diff --git a/doc/man/indexamajig.1 b/doc/man/indexamajig.1
index 01c07330..51c44ded 100644
--- a/doc/man/indexamajig.1
+++ b/doc/man/indexamajig.1
@@ -328,6 +328,11 @@ Show detailed information about reflection integration when \fIcondition\fR is m
.PD
When \fBrescut\fR is in the integration method, integrate \fIn\fR nm^-1 higher than the apparent resolution limit of each individual crystal. If \fBrescut\fR is not used, this option has no effect. \fIn\fR can be negative to integrate \fIlower\fR than the apparent resolution limit. The default is \fB--rescut=0\fR. Note that you can also apply this cutoff at the merging stage using \fBprocess_hkl --push-res\fR.
+.PD 0
+.IP \fB--highres=\fIn\fR
+.PD
+Mark all pixels on the detector higher than \fIn\fR Angstroms as bad. This might be useful when you have noisy patterns and don't expect any signal above a certain resolution.
+
.SH BUGS
ReAx indexing is experimental. It works very nicely for some people, and crashes for others. In a future version, it will be improved and fully supported.
diff --git a/src/indexamajig.c b/src/indexamajig.c
index fcf97dd4..2ef98c2c 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -130,6 +130,7 @@ static void show_help(const char *s)
" Example: /data/data0.\n"
" Default: The first one found.\n"
" --push-res=<n> Integrate higher than apparent resolution cutoff.\n"
+" --highres=<n> Absolute resolution cutoff in Angstroms.\n"
"\n"
"\nFor time-resolved stuff, you might want to use:\n\n"
" --copy-hdf5-field <f> Copy the value of field <f> into the stream. You\n"
@@ -238,6 +239,7 @@ int main(int argc, char *argv[])
iargs.ipriv = NULL; /* No default */
iargs.int_meth = integration_method("rings-nocen", NULL);
iargs.push_res = 0.0;
+ iargs.highres = +INFINITY;
/* Long options */
const struct option longopts[] = {
@@ -292,6 +294,7 @@ int main(int argc, char *argv[])
{"push-res", 1, NULL, 19},
{"res-push", 1, NULL, 19}, /* compat */
{"peak-radius", 1, NULL, 20},
+ {"highres", 1, NULL, 21},
{0, 0, NULL, 0}
};
@@ -442,6 +445,15 @@ int main(int argc, char *argv[])
pkrad = strdup(optarg);
break;
+ case 21 :
+ if ( sscanf(optarg, "%f", &iargs.highres) != 1 ) {
+ ERROR("Invalid value for --highres\n");
+ return 1;
+ }
+ /* A -> m^-1 */
+ iargs.highres = 1.0 / (iargs.highres/1e10);
+ break;
+
case 0 :
break;
diff --git a/src/process_image.c b/src/process_image.c
index 1431a16e..77c5ece7 100644
--- a/src/process_image.c
+++ b/src/process_image.c
@@ -118,6 +118,8 @@ void process_image(const struct index_args *iargs, struct pattern_args *pargs,
filter_noise(&image);
}
+ mark_resolution_range_as_bad(&image, iargs->highres, +INFINITY);
+
switch ( iargs->peaks ) {
case PEAK_HDF5:
diff --git a/src/process_image.h b/src/process_image.h
index 98228f6f..8691cd3f 100644
--- a/src/process_image.h
+++ b/src/process_image.h
@@ -81,6 +81,7 @@ struct index_args
signed int int_diag_k;
signed int int_diag_l;
float push_res;
+ float highres;
};