aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/hrs-scaling.c10
-rw-r--r--src/hrs-scaling.h3
-rw-r--r--src/partialator.c22
3 files changed, 26 insertions, 9 deletions
diff --git a/src/hrs-scaling.c b/src/hrs-scaling.c
index f84f82bb..e8376573 100644
--- a/src/hrs-scaling.c
+++ b/src/hrs-scaling.c
@@ -228,6 +228,7 @@ struct merge_queue_args
Crystal **crystals;
int n_started;
PartialityModel pmodel;
+ double push_res;
};
@@ -323,7 +324,7 @@ static void run_merge_job(void *vwargs, int cookie)
res = resolution(crystal_get_cell(cr), h, k, l);
- if ( 2.0*res > crystal_get_resolution_limit(cr) ) {
+ if ( 2.0*res > crystal_get_resolution_limit(cr)+push_res ) {
unlock_reflection(f);
continue;
}
@@ -355,7 +356,7 @@ static void finalise_merge_job(void *vqargs, void *vwargs)
RefList *lsq_intensities(Crystal **crystals, int n, int n_threads,
- PartialityModel pmodel, int min_meas)
+ PartialityModel pmodel, int min_meas, double push_res)
{
RefList *full;
RefList *full2;
@@ -369,6 +370,7 @@ RefList *lsq_intensities(Crystal **crystals, int n, int n_threads,
qargs.n_started = 0;
qargs.crystals = crystals;
qargs.pmodel = pmodel;
+ qargs.push_res = push_res;
pthread_rwlock_init(&qargs.full_lock, NULL);
run_threads(n_threads, run_merge_job, create_merge_job,
@@ -505,7 +507,7 @@ RefList *scale_intensities(Crystal **crystals, int n, int n_threads,
}
/* Create an initial list to refine against */
- full = lsq_intensities(crystals, n, n_threads, pmodel, min_redundancy);
+ full = lsq_intensities(crystals, n, n_threads, pmodel, min_redundancy, 0.0);
old_osfs = malloc(n*sizeof(double));
old_Bs = malloc(n*sizeof(double));
@@ -557,7 +559,7 @@ RefList *scale_intensities(Crystal **crystals, int n, int n_threads,
/* Generate list for next iteration */
reflist_free(full);
full = lsq_intensities(crystals, n, n_threads, pmodel,
- min_redundancy);
+ min_redundancy, 0.0);
i++;
diff --git a/src/hrs-scaling.h b/src/hrs-scaling.h
index b7954527..42d153b0 100644
--- a/src/hrs-scaling.h
+++ b/src/hrs-scaling.h
@@ -44,6 +44,7 @@ extern RefList *scale_intensities(Crystal **crystals, int n, int n_threads,
extern RefList *lsq_intensities(Crystal **crystals, int n, int n_threads,
- PartialityModel pmodel, int min_meas);
+ PartialityModel pmodel, int min_meas,
+ double push_res);
#endif /* HRS_SCALING_H */
diff --git a/src/partialator.c b/src/partialator.c
index 5ea1a426..572dd719 100644
--- a/src/partialator.c
+++ b/src/partialator.c
@@ -76,6 +76,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"
+" --push-res=<n> Merge higher than apparent resolution cutoff.\n"
" -j <n> Run <n> analyses in parallel.\n");
}
@@ -360,6 +361,7 @@ int main(int argc, char *argv[])
double max_adu = +INFINITY;
char *sparams_fn = NULL;
FILE *sparams_fh;
+ double push_res = 0.0;
/* Long options */
const struct option longopts[] = {
@@ -376,6 +378,8 @@ int main(int argc, char *argv[])
{"min-measurements", 1, NULL, 2},
{"max-adu", 1, NULL, 3},
{"start-params", 1, NULL, 4},
+ {"push-res", 1, NULL, 5},
+ {"res-push", 1, NULL, 5}, /* compat */
{"no-scale", 0, &no_scale, 1},
{"no-polarisation", 0, &polarisation, 0},
@@ -454,6 +458,16 @@ int main(int argc, char *argv[])
sparams_fn = strdup(optarg);
break;
+ case 5 :
+ errno = 0;
+ push_res = strtod(optarg, &rval);
+ if ( *rval != '\0' ) {
+ ERROR("Invalid value for --push-res.\n");
+ return 1;
+ }
+ push_res = push_res*1e9;
+ break;
+
case 0 :
break;
@@ -635,7 +649,7 @@ int main(int argc, char *argv[])
/* Make initial estimates */
full = lsq_intensities(crystals, n_crystals, nthreads, pmodel,
- min_measurements);
+ min_measurements, push_res);
check_rejection(crystals, n_crystals);
@@ -668,7 +682,7 @@ int main(int argc, char *argv[])
/* Re-estimate all the full intensities */
reflist_free(full);
full = lsq_intensities(crystals, n_crystals, nthreads,
- pmodel, min_measurements);
+ pmodel, min_measurements, push_res);
check_rejection(crystals, n_crystals);
@@ -701,12 +715,12 @@ int main(int argc, char *argv[])
}
snprintf(tmp, 1024, "%s1", outfile);
split = lsq_intensities(crystals1, n_crystals1, nthreads,
- pmodel, min_measurements);
+ pmodel, min_measurements, push_res);
write_reflist(tmp, split);
reflist_free(split);
snprintf(tmp, 1024, "%s2", outfile);
split = lsq_intensities(crystals2, n_crystals2, nthreads,
- pmodel, min_measurements);
+ pmodel, min_measurements, push_res);
write_reflist(tmp, split);
reflist_free(split);