From bf05f19bc1f5ebf9da3fc4252557a1584ed20a28 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 5 Sep 2019 16:35:51 +0200 Subject: process_hkl: Set kpred for all reflections to image value Since the prediction calculation isn't called by process_hkl (in contrast to partialator), a value must still be provided. --- src/process_hkl.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src') diff --git a/src/process_hkl.c b/src/process_hkl.c index 4e31e303..3c5ee15f 100644 --- a/src/process_hkl.c +++ b/src/process_hkl.c @@ -255,6 +255,20 @@ static double *check_hist_size(int n, double *hist_vals) } +static void apply_kpred(double k, RefList *list) +{ + Reflection *refl; + RefListIterator *iter; + + for ( refl = first_refl(list, &iter); + refl != NULL; + refl = next_refl(refl, iter) ) + { + set_kpred(refl, k); + } +} + + static int merge_crystal(RefList *model, struct image *image, Crystal *cr, RefList *reference, const SymOpList *sym, double **hist_vals, signed int hist_h, @@ -271,6 +285,7 @@ static int merge_crystal(RefList *model, struct image *image, Crystal *cr, new_refl = crystal_get_reflections(cr); /* First, correct for polarisation */ + apply_kpred(1.0/image->lambda, new_refl); polarisation_correction(new_refl, crystal_get_cell(cr), p); if ( reference != NULL ) { -- cgit v1.2.3