diff options
author | Thomas White <taw@bitwiz.org.uk> | 2009-11-17 12:03:48 +0100 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2009-11-17 12:03:48 +0100 |
commit | d3459eb9d394ebebeed58141843748c2d69eb284 (patch) | |
tree | e9632578aa58f04d31fb1634c166529e3bd994d3 /src/detector.c | |
parent | 3dabacbf8b897ced68418504e9fc9511c09119a9 (diff) |
Add Henke table lookup
Diffstat (limited to 'src/detector.c')
-rw-r--r-- | src/detector.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/detector.c b/src/detector.c index 9afe2cf3..bfc78b6e 100644 --- a/src/detector.c +++ b/src/detector.c @@ -44,15 +44,16 @@ void record_image(struct image *image) for ( y=0; y<image->height; y++ ) { double counts; - double val, intensity; + double intensity; double sa; - + double complex val; + val = image->sfacs[x + image->width*y]; - + intensity = val * conj(val); + /* What solid angle is subtended by this pixel? */ sa = sa_per_pixel * cos(image->twotheta[x + image->width*y]); - - intensity = pow(val, 2.0); + counts = intensity * ph_per_e * sa; image->data[x + image->width*y] = counts; |