diff options
author | Thomas White <taw@physics.org> | 2009-11-25 16:19:31 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2009-11-25 16:19:31 +0100 |
commit | 3a895d677389fa4d5048d9ebc0f9c2496ac1faca (patch) | |
tree | 66886f7a08c877ec0dff0c9567dbce2f4fb9b675 /src/detector.c | |
parent | 76cbb192f4abdd5f5c280cee964357c64364c783 (diff) |
Water fixes
Diffstat (limited to 'src/detector.c')
-rw-r--r-- | src/detector.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/detector.c b/src/detector.c index 2d095611..a0b09799 100644 --- a/src/detector.c +++ b/src/detector.c @@ -157,20 +157,25 @@ void record_image(struct image *image) for ( x=0; x<image->width; x++ ) { for ( y=0; y<image->height; y++ ) { - double counts, intensity, sa; + double counts, intensity, sa, water; 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); + water = water_intensity(image->qvecs[x + image->width*y], + image->xray_energy); + + //printf("%e + %e", intensity, water); + intensity += water; + //printf(" = %e\n", intensity); /* What solid angle is subtended by this pixel? */ sa = sa_per_pixel * cos(image->twotheta[x + image->width*y]); counts = intensity * ph_per_e * sa; + //printf("%e counts\n", counts); image->hdr[x + image->width*y] = counts; |