From 69ee7568d425c531991e708f1a0ad9f48bf0b4c9 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 31 Aug 2018 20:31:07 +0200 Subject: Show number of reflections used for CC calculation --- src/rejection.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'src/rejection.c') diff --git a/src/rejection.c b/src/rejection.c index 6ff7265d..47cc9347 100644 --- a/src/rejection.c +++ b/src/rejection.c @@ -95,7 +95,7 @@ void early_rejection(Crystal **crystals, int n) static double calculate_cchalf(RefList *template, RefList *full, - Crystal *exclude) + Crystal *exclude, int *pnref) { Reflection *trefl; RefListIterator *iter; @@ -156,6 +156,9 @@ static double calculate_cchalf(RefList *template, RefList *full, sig2E = all_sum_var / n; sig2Y = (all_sumsq_mean - all_sum_mean*all_sum_mean)*n/(n-1); + if ( pnref != NULL ) { + *pnref = n; + } return (sig2Y - 0.5*sig2E) / (sig2Y + 0.5*sig2E); } @@ -164,17 +167,22 @@ static void check_deltacchalf(Crystal **crystals, int n, RefList *full) { double cchalf; int i; + int nref; - cchalf = calculate_cchalf(full, full, NULL); - STATUS("Overall CChalf = %f\n", cchalf); + cchalf = calculate_cchalf(full, full, NULL, &nref); + STATUS("Overall CChalf = %f (%i reflections)\n", cchalf*100.0, nref); for ( i=0; i