From 55bfd90ee7d198b319105068c81d0b7f6bb24f5f Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 25 Nov 2009 11:37:35 +0100 Subject: Proper water intensity calculation Intensity is calculated at the detector stage now --- src/detector.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/detector.c') 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; xwidth; x++ ) { for ( y=0; yheight; 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]); -- cgit v1.2.3