aboutsummaryrefslogtreecommitdiff
path: root/src/detector.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/detector.c')
-rw-r--r--src/detector.c11
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;