aboutsummaryrefslogtreecommitdiff
path: root/src/rejection.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-09-06 14:53:47 +0200
committerThomas White <taw@physics.org>2018-09-06 14:53:47 +0200
commit6bd3df7ee39b8a8ba46e9709d74d96051a27ca6f (patch)
tree451a79310e506700695d7a268553611acba3c877 /src/rejection.c
parent264abc6b6b72640d78d6c213fc3f25267a7f6c1c (diff)
Working and validated deltaCChalf calculation
Diffstat (limited to 'src/rejection.c')
-rw-r--r--src/rejection.c8
1 files changed, 3 insertions, 5 deletions
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; j<c->n_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<n; i++ ) {
double cchalf, cchalfi;
RefList *template = crystal_get_reflections(crystals[i]);
- //RefList *template = full;
cchalf = calculate_cchalf(template, full, NULL, NULL);
cchalfi = calculate_cchalf(template, full, crystals[i], &nref);
STATUS("Frame %i:", i);