aboutsummaryrefslogtreecommitdiff
path: root/src/detector.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2009-11-25 18:11:33 +0100
committerThomas White <taw@physics.org>2009-11-25 18:11:33 +0100
commit0a3ed7206e2bc009ba86a8072530a3f18196cf8f (patch)
tree6262d3e7c5ea609d9d6565638434f3e29591cc2f /src/detector.c
parent2f3f6011e2b90a54909d5f20412c179a0cb6b37e (diff)
Add Poisson noise to image
Diffstat (limited to 'src/detector.c')
-rw-r--r--src/detector.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/detector.c b/src/detector.c
index 1a7d36ee..fae37126 100644
--- a/src/detector.c
+++ b/src/detector.c
@@ -177,6 +177,8 @@ void record_image(struct image *image)
counts = intensity * ph_per_e * sa;
//printf("%e counts\n", counts);
+ counts += poisson_noise(counts);
+
image->hdr[x + image->width*y] = counts;
}