From 0cb609aa2c75e5d0e99b355fe176ed682ee0b05d Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 5 Oct 2010 18:54:12 +0200 Subject: compare_hkl: Get denominator correct for resolution shell graph .. I think? --- src/compare_hkl.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) (limited to 'src/compare_hkl.c') diff --git a/src/compare_hkl.c b/src/compare_hkl.c index d918e5cb..eed177c4 100644 --- a/src/compare_hkl.c +++ b/src/compare_hkl.c @@ -54,6 +54,7 @@ static void plot_shells(const double *ref1, const double *ref2, double den[NBINS]; double rmin, rmax, rstep; int i; + double dentot; FILE *fh; if ( cell == NULL ) { @@ -90,6 +91,27 @@ static void plot_shells(const double *ref1, const double *ref2, } rstep = (rmax-rmin) / NBINS; + dentot = 0.0; + for ( i=0; ih; k = it->k; l = it->l; + + i1 = lookup_intensity(ref1, h, k, l); + if ( i1 < 0.0 ) continue; + f1 = sqrt(i1); + i2 = lookup_intensity(ref2, h, k, l); + if ( i2 < 0.0 ) continue; + f2 = sqrt(i2); + + dentot += (f1 + f2) / 2.0; + + } + for ( i=0; i