aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcrystfel/src/integration.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libcrystfel/src/integration.c b/libcrystfel/src/integration.c
index c922f703..3d8258c1 100644
--- a/libcrystfel/src/integration.c
+++ b/libcrystfel/src/integration.c
@@ -1487,6 +1487,11 @@ static int integrate_rings_once(Reflection *refl, struct image *image,
* 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);