aboutsummaryrefslogtreecommitdiff
path: root/src/detector.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-09-30 14:09:17 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:00 +0100
commita04878fec9a9e76bf6266bc4b4bdfadb77b90441 (patch)
treee67dae00924dbd885b76e3a9334463548a794b88 /src/detector.c
parent7c030ab77c830ab4e7a679f314fa413d126cea27 (diff)
Remove duplicated functionality of map_position() and get_q()
Diffstat (limited to 'src/detector.c')
-rw-r--r--src/detector.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/detector.c b/src/detector.c
index e4c5a83e..be2b3a44 100644
--- a/src/detector.c
+++ b/src/detector.c
@@ -84,40 +84,6 @@ double get_tt(struct image *image, unsigned int xs, unsigned int ys)
}
-/* x,y in pixels relative to image origin */
-int map_position(struct image *image, double dx, double dy,
- double *rx, double *ry, double *rz)
-{
- double d;
- double twotheta, psi;
- const double k = 1.0 / image->lambda;
- struct panel *p;
- double x = 0.0;
- double y = 0.0;
-
- p = find_panel(image->det, dx, dy);
- if ( p == NULL ) return 1;
- if ( p->no_index ) return 1;
-
- x = ((double)dx - p->cx);
- y = ((double)dy - p->cy);
-
- /* Convert pixels to metres */
- x /= p->res;
- y /= p->res; /* Convert pixels to metres */
- d = sqrt((x*x) + (y*y));
- twotheta = atan2(d, p->clen);
-
- psi = atan2(y, x);
-
- *rx = k*sin(twotheta)*cos(psi);
- *ry = k*sin(twotheta)*sin(psi);
- *rz = k - k*cos(twotheta);
-
- return 0;
-}
-
-
void record_image(struct image *image, int do_poisson)
{
int x, y;