aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-09-05 16:35:51 +0200
committerThomas White <taw@physics.org>2019-09-05 16:35:51 +0200
commitbf05f19bc1f5ebf9da3fc4252557a1584ed20a28 (patch)
treea04136ff52780ccc8fb02e2d89c11805a98179a7 /src
parentdd9e5a75e115cd5b630d8dac2f6af8fc344f5ad6 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/process_hkl.c15
1 files changed, 15 insertions, 0 deletions
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 ) {