aboutsummaryrefslogtreecommitdiff
path: root/src/detector.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2009-11-25 11:37:35 +0100
committerThomas White <taw@physics.org>2009-11-25 11:37:35 +0100
commit55bfd90ee7d198b319105068c81d0b7f6bb24f5f (patch)
treef780b6e0b82581a2ca7175625cc1342b069e6636 /src/detector.c
parent48477c86c4fae48d581ee6614615152b6e61ee3f (diff)
Proper water intensity calculation
Intensity is calculated at the detector stage now
Diffstat (limited to 'src/detector.c')
-rw-r--r--src/detector.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/detector.c b/src/detector.c
index f4de05ff..dc378480 100644
--- a/src/detector.c
+++ b/src/detector.c
@@ -156,14 +156,16 @@ void record_image(struct image *image)
for ( x=0; x<image->width; x++ ) {
for ( y=0; y<image->height; y++ ) {
- double counts;
- double intensity;
- double sa;
+ double counts, intensity, sa;
double complex val;
val = image->sfacs[x + image->width*y];
intensity = (double)(val * conj(val));
+ /* Add intensity contribution from water */
+ intensity += water_intensity(image->qvecs[x + image->width*y],
+ image->xray_energy);
+
/* What solid angle is subtended by this pixel? */
sa = sa_per_pixel * cos(image->twotheta[x + image->width*y]);