aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-03-05 15:52:04 +0100
committerThomas White <taw@physics.org>2020-03-05 15:53:18 +0100
commitf504be5b36d2bee62ee5565a510799e4db648826 (patch)
tree867d18fa77b816f7835d33622115a764350cc723
parentb2e7a864fc2dafe97221248b89a951bf827b723e (diff)
partialator: Gracefully handle negative and NaN sigma values
Of course, these should never happen.
-rw-r--r--src/merge.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/merge.c b/src/merge.c
index 817643ed..d0d5b7d6 100644
--- a/src/merge.c
+++ b/src/merge.c
@@ -191,10 +191,11 @@ static void run_merge_job(void *vwargs, int cookie)
struct reflection_contributions *c;
if ( get_partiality(refl) < MIN_PART_MERGE ) continue;
+ if ( isnan(get_esd_intensity(refl)) ) continue;
if ( !wargs->qargs->use_weak || ln_merge ) {
- if (get_intensity(refl) < 3.0*get_esd_intensity(refl)) {
+ if (get_intensity(refl) < 3.0*fabs(get_esd_intensity(refl))) {
continue;
}