aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2024-06-19 12:01:27 +0200
committerThomas White <taw@physics.org>2024-06-19 12:03:28 +0200
commitc2feb90144e804bda12eba2e7ae7953391c56f38 (patch)
tree7d99b027dbef4d65f472a7effaa973207ace792b
parent6745ff33abbddd903bec2b809920894a0b4664b8 (diff)
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.
-rw-r--r--libcrystfel/src/integration.c5
1 files changed, 0 insertions, 5 deletions
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);