aboutsummaryrefslogtreecommitdiff
path: root/src/detector.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-09-30 14:09:52 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:00 +0100
commit09ebc1352269ba4e70c399a2c179c7e844314cd8 (patch)
tree6be417776a461f0cf8aae2cea9b39101a99c5984 /src/detector.c
parenta04878fec9a9e76bf6266bc4b4bdfadb77b90441 (diff)
Tidy up get_tt()
Diffstat (limited to 'src/detector.c')
-rw-r--r--src/detector.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/detector.c b/src/detector.c
index be2b3a44..86dbbef2 100644
--- a/src/detector.c
+++ b/src/detector.c
@@ -69,15 +69,11 @@ double get_tt(struct image *image, unsigned int xs, unsigned int ys)
float r, rx, ry;
struct panel *p;
- const unsigned int x = xs;
- const unsigned int y = ys; /* Integer part only */
-
- p = find_panel(image->det, x, y);
+ p = find_panel(image->det, xs, ys);
rx = ((float)xs - p->cx) / p->res;
ry = ((float)ys - p->cy) / p->res;
- /* Calculate q-vector for this sub-pixel */
r = sqrt(pow(rx, 2.0) + pow(ry, 2.0));
return atan2(r, p->clen);