diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/partialator.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/partialator.c b/src/partialator.c index e152db7c..1d0881f3 100644 --- a/src/partialator.c +++ b/src/partialator.c @@ -322,6 +322,7 @@ static void show_help(const char *s) " --min-measurements=<n> Minimum number of measurements to require.\n" " --no-polarisation Disable polarisation correction.\n" " --max-adu=<n> Saturation value of detector.\n" +" --min-res=<n> Merge only crystals which diffract above <n> A.\n" " --push-res=<n> Merge higher than apparent resolution cutoff.\n" " -j <n> Run <n> analyses in parallel.\n" " --no-free Disable cross-validation (testing only).\n" @@ -875,6 +876,7 @@ int main(int argc, char *argv[]) double force_radius = -1.0; char *audit_info; int scaleflags = 0; + double min_res = 0.0; /* Long options */ const struct option longopts[] = { @@ -901,6 +903,7 @@ int main(int argc, char *argv[]) {"operator", 1, NULL, 9}, {"force-bandwidth", 1, NULL, 10}, {"force-radius", 1, NULL, 11}, + {"min-res", 1, NULL, 12}, {"no-scale", 0, &no_scale, 1}, {"no-Bscale", 0, &no_Bscale, 1}, @@ -1059,6 +1062,16 @@ int main(int argc, char *argv[]) force_radius *= 1e9; break; + case 12 : + errno = 0; + min_res = strtod(optarg, &rval); + if ( *rval != '\0' ) { + ERROR("Invalid value for --min-res.\n"); + return 1; + } + min_res = 1e10/min_res; + break; + case 0 : break; @@ -1251,6 +1264,8 @@ int main(int argc, char *argv[]) n_crystals_seen++; if ( n_crystals_seen <= start_after ) continue; + if ( crystal_get_resolution_limit(cur.crystals[i]) < min_res ) continue; + crystals_new = realloc(crystals, (n_crystals+1)*sizeof(Crystal *)); if ( crystals_new == NULL ) { |