diff options
author | Thomas White <taw@physics.org> | 2018-11-16 16:07:09 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2018-11-22 13:17:05 +0100 |
commit | 7c841071a20020e0dcdeee8460bcc7b2d09ec6e8 (patch) | |
tree | 39f1aae2c22a6d5b0248f45158cc56535b3fb4b4 /src/rejection.c | |
parent | 89bf2f6de2be2a276d8c349a1fa6ff6c63b5e7fe (diff) |
Don't do deltaCChalf with reference data set
Diffstat (limited to 'src/rejection.c')
-rw-r--r-- | src/rejection.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/rejection.c b/src/rejection.c index 05acb0db..b3a3cb67 100644 --- a/src/rejection.c +++ b/src/rejection.c @@ -95,7 +95,7 @@ void early_rejection(Crystal **crystals, int n) } -static void calculate_refl_mean_var(RefList *full) +static int calculate_refl_mean_var(RefList *full) { Reflection *refl; RefListIterator *iter; @@ -129,7 +129,7 @@ static void calculate_refl_mean_var(RefList *full) K = get_intensity(refl); c = get_contributions(refl); - assert(c != NULL); + if ( c == NULL ) return 1; /* Calculate the resolution just once, using the cell from the * first crystal to contribute, otherwise it takes too long */ @@ -160,6 +160,7 @@ static void calculate_refl_mean_var(RefList *full) set_temp2(refl, Ex2); } + return 0; } @@ -289,7 +290,11 @@ static void check_deltacchalf(Crystal **crystals, int n, RefList *full) int nref = 0; int nnan = 0; - calculate_refl_mean_var(full); + if ( calculate_refl_mean_var(full) ) { + STATUS("No reflection contributions for deltaCChalf " + "calculation (using reference reflections?)\n"); + return; + } cchalf = calculate_cchalf(full, full, NULL, &nref); STATUS("Overall CChalf = %f %% (%i reflections)\n", cchalf*100.0, nref); |