aboutsummaryrefslogtreecommitdiff
path: root/src/rejection.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-09-05 10:11:34 +0200
committerThomas White <taw@physics.org>2018-09-05 10:13:10 +0200
commit264abc6b6b72640d78d6c213fc3f25267a7f6c1c (patch)
tree372dd771a93ca006338729d6b739ddb93219e5ec /src/rejection.c
parent2e50a23bfab56fdfad0ffc5f6c3eef6a65346644 (diff)
Fix calculation and remove debugging stuff
Diffstat (limited to 'src/rejection.c')
-rw-r--r--src/rejection.c9
1 files changed, 2 insertions, 7 deletions
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;