From e71349f39bf7bdecfc0ecd0112e99342ad2a9b40 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 6 Oct 2010 11:20:48 +0200 Subject: compare_hkl: Don't forget the scaling factor, and do the division properly --- src/compare_hkl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/compare_hkl.c') diff --git a/src/compare_hkl.c b/src/compare_hkl.c index 7b5d85fa..d1b1340f 100644 --- a/src/compare_hkl.c +++ b/src/compare_hkl.c @@ -116,6 +116,7 @@ static void plot_shells(const double *ref1, const double *ref2, i2 = lookup_intensity(ref2, h, k, l); if ( i2 < 0.0 ) continue; f2 = sqrt(i2); + f2 *= scale; num[bin] += fabs(f1 - f2); den += (f1 + f2) / 2.0; @@ -128,7 +129,7 @@ static void plot_shells(const double *ref1, const double *ref2, double r, cen; cen = rmin + rstep*i + rstep/2.0; - r = (num[i]/den)*(ctot/cts[i]); + r = (num[i]/den)*((double)ctot/cts[i]); fprintf(fh, "%f %f %i\n", cen*1.0e-9, r*100.0, cts[i]); } -- cgit v1.2.3