aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-09-04 13:44:29 +0200
committerThomas White <taw@physics.org>2018-09-04 13:44:29 +0200
commit2e50a23bfab56fdfad0ffc5f6c3eef6a65346644 (patch)
treeabd9e95440f203216c5f7279d71f5b44c62e56c8 /src
parent4f1950b8799ed98a82f45d84a7c6ef287fbfbc5c (diff)
Debugging stuff
Diffstat (limited to 'src')
-rw-r--r--src/rejection.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/rejection.c b/src/rejection.c
index fbe631ab..83738657 100644
--- a/src/rejection.c
+++ b/src/rejection.c
@@ -139,6 +139,8 @@ 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;
for ( j=0; j<c->n_contrib; j++ ) {
@@ -152,14 +154,15 @@ 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++;
}
if ( nc < 2 ) continue;
-
refl_mean = refl_sum / nc;
+ STATUS(" refl_mean = %f\n", refl_mean);
/* Variance of contributions */
refl_sumsq = 0.0;
@@ -180,6 +183,7 @@ static double calculate_cchalf(RefList *template, RefList *full,
}
refl_var = refl_sumsq/(nc-1.0);
+ STATUS(" refl_var = %f\n", refl_var);
all_sum_var += refl_var;
n++;
total_contribs += nc;
@@ -194,7 +198,10 @@ 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;