diff options
author | Thomas White <taw@physics.org> | 2017-03-08 15:27:07 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2017-03-08 16:52:49 +0100 |
commit | 10c3e04dda4264add6e99cb4763c9dbb31c771c9 (patch) | |
tree | 14849573474f701f3d309205286a264579fe7139 /src | |
parent | 6cbd80653d2c2ddd93ffb3228521b9f801e48a70 (diff) |
compare_hkl: Fix combination of sigma(I) values for d1sig and d2sig
Diffstat (limited to 'src')
-rw-r--r-- | src/compare_hkl.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |