aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-06-30 12:10:11 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:28 +0100
commit04c451ae1f31a0e2b94017eec86d44fa42f29bc7 (patch)
tree47841f5e87ad81be6704e7d271148e07bfd382df
parent912db4a457ca53b58092948be2767eff3dc6f941 (diff)
Tidy up
-rw-r--r--src/geometry.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/geometry.c b/src/geometry.c
index 253456b7..c5e85b12 100644
--- a/src/geometry.c
+++ b/src/geometry.c
@@ -38,18 +38,15 @@ static signed int locate_peak(double x, double y, double z, double k,
for ( i=0; i<det->n_panels; i++ ) {
- double xd, yd, cl;
+ double xd, yd;
double fs, ss, plx, ply;
struct panel *p;
p = &det->panels[i];
- /* Camera length for this panel */
- cl = p->clen;
-
/* Coordinates of peak relative to central beam, in m */
- xd = cl * x / den;
- yd = cl * y / den;
+ xd = p->clen * x / den;
+ yd = p->clen * y / den;
/* Convert to pixels */
xd *= p->res;
@@ -160,7 +157,6 @@ static int check_reflection(struct image *image, double mres, int output,
xl = h*asx + k*bsx + l*csx;
yl = h*asy + k*bsy + l*csy;
- /* Calculate reciprocal lattice point modulus (and square) */
ds_sq = modulus_squared(xl, yl, zl); /* d*^2 */
ds = sqrt(ds_sq);
if ( ds > mres ) return 0; /* Outside resolution range */