diff options
author | Thomas White <taw@physics.org> | 2010-10-06 11:20:48 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:01 +0100 |
commit | e71349f39bf7bdecfc0ecd0112e99342ad2a9b40 (patch) | |
tree | 3992d0f6eace09736ce6cb0b220d7fb3d5b26ff9 /src/compare_hkl.c | |
parent | 3f42fce00b80a8073b3c1d2b7bb24446336dec70 (diff) |
compare_hkl: Don't forget the scaling factor, and do the division properly
Diffstat (limited to 'src/compare_hkl.c')
-rw-r--r-- | src/compare_hkl.c | 3 |
1 files changed, 2 insertions, 1 deletions
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]); } |