From a166b0ae68b99bea3f2e08cc508a863a0f36073b Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 22 Nov 2018 16:19:21 +0100 Subject: Count crystals with no reflections in various FoMs This is the most common cause of NaN residuals, so it seems better to report that there weren't enough reflections than to report a NaN. --- src/partialator.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++--------- src/rejection.c | 16 +++++++++++++--- 2 files changed, 59 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/partialator.c b/src/partialator.c index 86431e4c..10befba8 100644 --- a/src/partialator.c +++ b/src/partialator.c @@ -716,6 +716,10 @@ static void all_residuals(Crystal **crystals, int n_crystals, RefList *full, int n_nan_linear_free = 0; int n_nan_log = 0; int n_nan_log_free = 0; + int n_non_linear = 0; + int n_non_linear_free = 0; + int n_non_log = 0; + int n_non_log_free = 0; *presidual = 0.0; *pfree_residual = 0.0; @@ -725,19 +729,35 @@ static void all_residuals(Crystal **crystals, int n_crystals, RefList *full, for ( i=0; i 0 ) { + STATUS("WARNING: %i patterns had no reflections in deltaCChalf " + "calculation (I set deltaCChalf=zero for them)\n", nnon); + } if ( nnan > 0 ) { STATUS("WARNING: %i NaN or inf deltaCChalf values were " "replaced with zero\n", nnan); -- cgit v1.2.3