From 264abc6b6b72640d78d6c213fc3f25267a7f6c1c Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 5 Sep 2018 10:11:34 +0200 Subject: Fix calculation and remove debugging stuff --- src/rejection.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/rejection.c') diff --git a/src/rejection.c b/src/rejection.c index 83738657..5ead8703 100644 --- a/src/rejection.c +++ b/src/rejection.c @@ -139,7 +139,6 @@ static double calculate_cchalf(RefList *template, RefList *full, c = get_contributions(refl); assert(c != NULL); - STATUS("reflection %4i %4i %4i\n", h, k, l); /* Mean of contributions */ refl_sum = 0.0; @@ -154,7 +153,6 @@ static double calculate_cchalf(RefList *template, RefList *full, /* FIXME: Apply corrections */ Ii = get_intensity(c->contribs[j]); - STATUS("contrib %f (crystal %p)\n", Ii, c->contrib_crystals[j]); refl_sum += Ii; nc++; @@ -162,7 +160,6 @@ static double calculate_cchalf(RefList *template, RefList *full, if ( nc < 2 ) continue; refl_mean = refl_sum / nc; - STATUS(" refl_mean = %f\n", refl_mean); /* Variance of contributions */ refl_sumsq = 0.0; @@ -183,7 +180,8 @@ static double calculate_cchalf(RefList *template, RefList *full, } refl_var = refl_sumsq/(nc-1.0); - STATUS(" refl_var = %f\n", refl_var); + refl_var /= (nc/2.0); + all_sum_var += refl_var; n++; total_contribs += nc; @@ -198,10 +196,7 @@ static double calculate_cchalf(RefList *template, RefList *full, } hsig2E = all_sum_var / n; - STATUS("mean of reflection variances = %f = 0.5*sig2E\n", hsig2E); sig2Y = S / (wSum - 1.0); - STATUS("variance of reflection means = %f = sig2Y\n", sig2Y); - STATUS("%lli total contribs\n", hsig2E, sig2Y, total_contribs); if ( pnref != NULL ) { *pnref = n; -- cgit v1.2.3