aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-02-26 17:53:44 +0100
committerThomas White <taw@physics.org>2010-02-26 17:53:44 +0100
commita34f668051317f475c64c7aad6143dda76325fd1 (patch)
tree595a36e4395402f5b8a7d1333e81a7ebae45c199 /src
parentc8d022b01819c81489a9d06fe05aaccb7d057a68 (diff)
Separate DQE and detector gain (to make Poisson noise work)
Diffstat (limited to 'src')
-rw-r--r--src/detector.c2
-rw-r--r--src/parameters-lcls.tmp7
2 files changed, 6 insertions, 3 deletions
diff --git a/src/detector.c b/src/detector.c
index 7a7f5942..2a4c6d10 100644
--- a/src/detector.c
+++ b/src/detector.c
@@ -108,7 +108,7 @@ void record_image(struct image *image, int do_poisson)
counts = (int)rounded;
}
- image->data[x + image->width*y] = counts;
+ image->data[x + image->width*y] = counts * DETECTOR_GAIN;
}
progress_bar(x, image->width-1, "Post-processing");
diff --git a/src/parameters-lcls.tmp b/src/parameters-lcls.tmp
index 96b2bc33..50786e03 100644
--- a/src/parameters-lcls.tmp
+++ b/src/parameters-lcls.tmp
@@ -1,8 +1,11 @@
/* Number of photons in pulse */
#define FLUENCE (1.0e13)
-/* Detector's quantum efficiency (ADU per photon, front detector) */
-#define DQE (167.0)
+/* Detector's quantum efficiency */
+#define DQE (0.9)
+
+/* ADU per photon (front detector) */
+#define DETECTOR_GAIN (167.0)
/* Radius of the water column */
#define WATER_RADIUS (3.0e-6 / 2.0)