aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2014-06-04 17:50:30 +0200
committerThomas White <taw@physics.org>2014-06-05 14:19:29 +0200
commitbcf9b4c9b49e9242146b0384657f3b7c26bc340a (patch)
tree84e0dd812402345568145ab63cb03bf5b6968906
parentcfb9a9979cab8eacc4636a8360502c3d33c66f2a (diff)
partialator: Use reciprocal scale factors instead
-rw-r--r--src/hrs-scaling.c6
-rw-r--r--src/post-refinement.c2
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);