diff options
-rw-r--r-- | src/hrs-scaling.c | 4 | ||||
-rw-r--r-- | src/hrs-scaling.h | 3 | ||||
-rw-r--r-- | src/partialator.c | 19 |
3 files changed, 21 insertions, 5 deletions
diff --git a/src/hrs-scaling.c b/src/hrs-scaling.c index 46590f7e..c249ef46 100644 --- a/src/hrs-scaling.c +++ b/src/hrs-scaling.c @@ -493,12 +493,12 @@ static void calculate_esds(Crystal **crystals, int n, RefList *full, /* Scale the stack of images */ RefList *scale_intensities(Crystal **crystals, int n, RefList *gref, - int n_threads, int noscale, PartialityModel pmodel) + int n_threads, int noscale, PartialityModel pmodel, + int min_redundancy) { int i; double max_corr; RefList *full = NULL; - const int min_redundancy = 2; for ( i=0; i<n; i++ ) crystal_set_osf(crystals[i], 1.0); diff --git a/src/hrs-scaling.h b/src/hrs-scaling.h index 8ae12380..0979bb98 100644 --- a/src/hrs-scaling.h +++ b/src/hrs-scaling.h @@ -41,7 +41,8 @@ extern RefList *scale_intensities(Crystal **crystals, int n, RefList *reference, int n_threads, - int noscale, PartialityModel pmodel); + int noscale, PartialityModel pmodel, + int min_redundancy); #endif /* HRS_SCALING_H */ diff --git a/src/partialator.c b/src/partialator.c index 58025b96..cfa3a6ba 100644 --- a/src/partialator.c +++ b/src/partialator.c @@ -80,6 +80,8 @@ static void show_help(const char *s) " instead of taking the mean of the intensity\n" " estimates.\n" " -m, --model=<model> Specify partiality model.\n" +" --min-measurements=<n> Require at least <n> measurements before a\n" +" reflection appears in the output. Default: 2\n" "\n" " -j <n> Run <n> analyses in parallel.\n"); } @@ -323,6 +325,8 @@ int main(int argc, char *argv[]) Crystal **crystals; char *pmodel_str = NULL; PartialityModel pmodel = PMODEL_SPHERE; + int min_measurements = 2; + char *rval; /* Long options */ const struct option longopts[] = { @@ -336,6 +340,7 @@ int main(int argc, char *argv[]) {"no-scale", 0, &noscale, 1}, {"reference", 1, NULL, 'r'}, {"model", 1, NULL, 'm'}, + {"min-measurements", 1, NULL, 2}, {0, 0, NULL, 0} }; @@ -398,6 +403,15 @@ int main(int argc, char *argv[]) reference_file = strdup(optarg); break; + case 2 : + errno = 0; + min_measurements = strtod(optarg, &rval); + if ( *rval != '\0' ) { + ERROR("Invalid value for --min-measurements.\n"); + return 1; + } + break; + case 0 : break; @@ -583,7 +597,7 @@ int main(int argc, char *argv[]) STATUS("Performing initial scaling.\n"); if ( noscale ) STATUS("Scale factors fixed at 1.\n"); full = scale_intensities(crystals, n_crystals, reference, - nthreads, noscale, pmodel); + nthreads, noscale, pmodel, min_measurements); sr = sr_titlepage(crystals, n_crystals, "scaling-report.pdf", infile, cmdline); @@ -621,7 +635,8 @@ int main(int argc, char *argv[]) /* Re-estimate all the full intensities */ reflist_free(full); full = scale_intensities(crystals, n_crystals, - reference, nthreads, noscale, pmodel); + reference, nthreads, noscale, pmodel, + min_measurements); sr_iteration(sr, i+1, crystals, n_crystals, full); |