From 6bd3df7ee39b8a8ba46e9709d74d96051a27ca6f Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 6 Sep 2018 14:53:47 +0200 Subject: Working and validated deltaCChalf calculation --- src/rejection.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/rejection.c') diff --git a/src/rejection.c b/src/rejection.c index 5ead8703..5a82a940 100644 --- a/src/rejection.c +++ b/src/rejection.c @@ -99,7 +99,7 @@ static double calculate_cchalf(RefList *template, RefList *full, { Reflection *trefl; RefListIterator *iter; - double hsig2E, sig2Y; + double sig2E, sig2Y; int n = 0; signed int oh = 0; signed int ok = 0; @@ -139,7 +139,6 @@ static double calculate_cchalf(RefList *template, RefList *full, c = get_contributions(refl); assert(c != NULL); - /* Mean of contributions */ refl_sum = 0.0; for ( j=0; jn_contrib; j++ ) { @@ -195,13 +194,13 @@ static double calculate_cchalf(RefList *template, RefList *full, } - hsig2E = all_sum_var / n; + sig2E = all_sum_var / n; sig2Y = S / (wSum - 1.0); if ( pnref != NULL ) { *pnref = n; } - return (sig2Y - hsig2E) / (sig2Y + hsig2E); + return (sig2Y - 0.5*sig2E) / (sig2Y + 0.5*sig2E); } @@ -217,7 +216,6 @@ static void check_deltacchalf(Crystal **crystals, int n, RefList *full) for ( i=0; i