diff options
author | Thomas White <taw@physics.org> | 2014-08-13 15:23:59 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2014-08-13 15:23:59 +0200 |
commit | 9ded4081da3f2f315b63914df7bb5fbc903b4516 (patch) | |
tree | f2d63b24ca5e35cdc36a9d1462f4833aabe13701 /src | |
parent | 918316caca74df894193922b1e0bc132afcf6ee5 (diff) |
indexamajig: Add --highres
Diffstat (limited to 'src')
-rw-r--r-- | src/indexamajig.c | 12 | ||||
-rw-r--r-- | src/process_image.c | 2 | ||||
-rw-r--r-- | src/process_image.h | 1 |
3 files changed, 15 insertions, 0 deletions
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; }; |