aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-01-20 10:00:23 +0100
committerThomas White <taw@physics.org>2010-01-20 10:00:23 +0100
commit282704c766fa6aefb716f0c09f78a8c46b9f85bb (patch)
tree106bc3102f96958a07a6ed95691b3d2e3cb4e08d
parent4a1380a1edfcaa29ce8658ceecdc8c99d0e02d8f (diff)
theta->twotheta (avoid confusion)
-rw-r--r--src/index.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/index.c b/src/index.c
index b45bd1fc..f4f009bb 100644
--- a/src/index.c
+++ b/src/index.c
@@ -37,7 +37,7 @@ int map_position(struct image *image, double x, double y,
double d;
/* Angular description of reflection */
- double theta, psi, k;
+ double twotheta, psi, k;
k = 1.0 / image->lambda;
@@ -47,7 +47,7 @@ int map_position(struct image *image, double x, double y,
x /= image->resolution;
y /= image->resolution; /* Convert pixels to metres */
d = sqrt((x*x) + (y*y));
- theta = atan2(d, image->camera_len);
+ twotheta = atan2(d, image->camera_len);
} else if (image->fmode == FORMULATION_PIXELSIZE ) {
@@ -55,7 +55,7 @@ int map_position(struct image *image, double x, double y,
x *= image->pixel_size;
y *= image->pixel_size; /* Convert pixels to metres^-1 */
d = sqrt((x*x) + (y*y));
- theta = atan2(d, k);
+ twotheta = atan2(d, k);
} else {
ERROR("Unrecognised formulation mode in mapping_scale.\n");
@@ -64,9 +64,9 @@ int map_position(struct image *image, double x, double y,
psi = atan2(y, x);
- *rx = k*sin(theta)*cos(psi);
- *ry = k*sin(theta)*sin(psi);
- *rz = k - k*cos(theta);
+ *rx = k*sin(twotheta)*cos(psi);
+ *ry = k*sin(twotheta)*sin(psi);
+ *rz = k - k*cos(twotheta);
return 0;
}