diff options
author | Thomas White <taw@physics.org> | 2015-11-10 16:59:29 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2015-11-18 11:17:57 +0100 |
commit | af7c721a1c75692ecf9ba9840a5847af90a48b53 (patch) | |
tree | 5cbc78c975e36514557ab9b5167cbdc5945fb1da /src/merge.c | |
parent | c6ac9382f3ec86e1b3e1e558da2f768d7021e470 (diff) |
merge_intensities(): add use_weak option
Diffstat (limited to 'src/merge.c')
-rw-r--r-- | src/merge.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/merge.c b/src/merge.c index 9ff64b57..4f2fa9a9 100644 --- a/src/merge.c +++ b/src/merge.c @@ -61,6 +61,7 @@ struct merge_queue_args int n_started; PartialityModel pmodel; double push_res; + int use_weak; }; @@ -114,6 +115,11 @@ static void run_merge_job(void *vwargs, int cookie) if ( get_partiality(refl) < MIN_PART_MERGE ) continue; + if ( !wargs->qargs->use_weak + && (get_intensity(refl) < 3.0*get_esd_intensity(refl)) ) { + continue; + } + get_indices(refl, &h, &k, &l); pthread_rwlock_rdlock(&wargs->qargs->full_lock); f = find_refl(full, h, k, l); @@ -197,7 +203,7 @@ static void finalise_merge_job(void *vqargs, void *vwargs) RefList *merge_intensities(Crystal **crystals, int n, int n_threads, PartialityModel pmodel, int min_meas, - double push_res) + double push_res, int use_weak) { RefList *full; RefList *full2; @@ -217,6 +223,7 @@ RefList *merge_intensities(Crystal **crystals, int n, int n_threads, qargs.crystals = crystals; qargs.pmodel = pmodel; qargs.push_res = push_res; + qargs.use_weak = use_weak; pthread_rwlock_init(&qargs.full_lock, NULL); run_threads(n_threads, run_merge_job, create_merge_job, |