From 10c3e04dda4264add6e99cb4763c9dbb31c771c9 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 8 Mar 2017 15:27:07 +0100 Subject: compare_hkl: Fix combination of sigma(I) values for d1sig and d2sig --- src/compare_hkl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/compare_hkl.c b/src/compare_hkl.c index 51e51dc9..5ce003fa 100644 --- a/src/compare_hkl.c +++ b/src/compare_hkl.c @@ -286,13 +286,13 @@ static void add_to_fom(struct fom_context *fctx, double i1, double i2, break; case FOM_D1SIG : - if ( fabs(i1-i2) < (sig1+sig2)/2.0 ) { + if ( fabs(i1-i2) < sqrt(sig1*sig1 + sig2*sig2) ) { fctx->n_within[bin]++; } break; case FOM_D2SIG : - if ( fabs(i1-i2) < sig1+sig2 ) { /* = 2 * (sig1+sig2)/2 */ + if ( fabs(i1-i2) < 2.0*sqrt(sig1*sig1 + sig2*sig2) ) { fctx->n_within[bin]++; } break; -- cgit v1.2.3