aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-08-20 17:37:08 +0200
committerThomas White <taw@physics.org>2018-08-30 17:18:53 +0200
commit214b23a62b478acddaeb8d52f6d59909fa931c1e (patch)
treec22d90ef2f20b89a3944756522d7d13de746d9d6 /src
parent5447e68a8885e565d53a30fc1c1ad6e358505a8b (diff)
Calculate the DeltaCChalf
Diffstat (limited to 'src')
-rw-r--r--src/rejection.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/rejection.c b/src/rejection.c
index eaf87fb6..8cd4f718 100644
--- a/src/rejection.c
+++ b/src/rejection.c
@@ -216,8 +216,7 @@ static struct contribs *lookup_contribs(struct contributionlist *clist,
}
-static double calculate_cchalf(Crystal **crystals, int n,
- struct contributionlist *clist, Crystal *exclude)
+static double calculate_cchalf(struct contributionlist *clist, Crystal *exclude)
{
int i;
double all_sum_mean = 0.0;
@@ -272,12 +271,19 @@ static void check_deltacchalf(Crystal **crystals, int n, RefList *full)
{
struct contributionlist *clist;
double cchalf;
+ int i;
clist = find_all_contributions(crystals, n, full);
- cchalf = calculate_cchalf(crystals, n, clist, NULL);
+ cchalf = calculate_cchalf(clist, NULL);
STATUS("Overall CChalf = %f\n", cchalf);
+ for ( i=0; i<n; i++ ) {
+ double cchalfi;
+ cchalfi = calculate_cchalf(clist, crystals[i]);
+ STATUS("DeltaCChalf_%i = %e\n", i, cchalfi - cchalf);
+ }
+
free_contributions(clist);
}