From bcf9b4c9b49e9242146b0384657f3b7c26bc340a Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 4 Jun 2014 17:50:30 +0200 Subject: partialator: Use reciprocal scale factors instead --- src/hrs-scaling.c | 6 +++--- src/post-refinement.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hrs-scaling.c b/src/hrs-scaling.c index cba21b74..23d58e8f 100644 --- a/src/hrs-scaling.c +++ b/src/hrs-scaling.c @@ -125,7 +125,7 @@ static void run_scale_job(void *vwargs, int cookie) Ihl = get_intensity(refl) / corr; num += Ih * Ihl; - den += Ihl * Ihl; + den += Ih * Ih; } @@ -266,7 +266,7 @@ static void run_merge_job(void *vwargs, int cookie) Ihl = get_intensity(refl) / corr; - num += Ihl * G; + num += Ihl / G; den += 1.0; red++; @@ -388,7 +388,7 @@ static void run_esd_job(void *vwargs, int cookie) corr = get_partiality(refl) * get_lorentz(refl); Ih = get_intensity(f); - Ihl = G * get_intensity(refl) / corr; + Ihl = get_intensity(refl) / (G*corr); num += pow(Ihl - Ih, 2.0); diff --git a/src/post-refinement.c b/src/post-refinement.c index 6e9250d0..535f7cff 100644 --- a/src/post-refinement.c +++ b/src/post-refinement.c @@ -513,7 +513,7 @@ static double pr_iterate(Crystal *cr, const RefList *full, I_full = get_intensity(match); /* Actual measurement of this reflection from this pattern? */ - I_partial = get_intensity(refl) * crystal_get_osf(cr); + I_partial = get_intensity(refl) / crystal_get_osf(cr); p = get_partiality(refl); l = get_lorentz(refl); -- cgit v1.2.3