aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-10-28 16:19:05 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:04 +0100
commit3f14e324e6838bfeab03bbab222e363c8ffc2134 (patch)
treea050ab77b10a4c3504dbf0dd3aa26a6eb588cb50
parent5096158d430c4839b96cd6119342c5b78e16d04d (diff)
Fix beam direction
-rw-r--r--src/detector.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/detector.c b/src/detector.c
index 2a4e3579..d8d385c9 100644
--- a/src/detector.c
+++ b/src/detector.c
@@ -57,7 +57,7 @@ struct rvec get_q(struct image *image, double xs, double ys,
q.u = k * sin(twotheta)*cos(az);
q.v = k * sin(twotheta)*sin(az);
- q.w = k - k * cos(twotheta);
+ q.w = k * (cos(twotheta) - 1.0);
return quat_rot(q, image->orientation);
}