Commit d4873dff authored by Thomas White's avatar Thomas White
Browse files

integrate_rings_once: Handle case where reflection is negative by < 1 photon

parent 118835f8
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment