From c2feb90144e804bda12eba2e7ae7953391c56f38 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 19 Jun 2024 12:01:27 +0200 Subject: Revert "integrate_rings_once: Handle case where reflection is negative by < 1 photon" This special case is not necessary, because the same situation is already handled by the within-one-photon-of-zero check just before. The value assigned to sig2_poisson in this special case is wrong anyway: it should be aduph*aduph. The wrong value leads to a jump in Poisson sigmas at low intensities. However, the overall sigma is usually dominated by the background variance for weak reflections, so it doesn't make a big difference overall. This reverts commit d4873dff09b3cf314fce0019d76e3a4ca64d7221. --- libcrystfel/src/integration.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'libcrystfel/src/integration.c') diff --git a/libcrystfel/src/integration.c b/libcrystfel/src/integration.c index d2c06db7..6d37116b 100644 --- a/libcrystfel/src/integration.c +++ b/libcrystfel/src/integration.c @@ -1467,11 +1467,6 @@ int integrate_rings_once(Reflection *refl, * appropriate size */ if ( intensity < -aduph ) { sig2_poisson = -aduph*intensity; - } else if ( intensity < 0.0 ) { - /* If the intensity is negative (by less than one - * photon), assume the reflection is very weak and - * therefore has a Poisson error of one photon. */ - sig2_poisson = aduph; } sigma = sqrt(sig2_poisson + bx->m*sig2_bg); -- cgit v1.2.3