diff options
author | Thomas White <taw@physics.org> | 2012-04-03 15:16:04 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-04-05 15:14:22 +0200 |
commit | 6a694000083fd5d6e0ecb48212cf25396854c60e (patch) | |
tree | bd75193ee329dd9454b763b6d25ba3dcf80d88c3 /libcrystfel/src/geometry.c | |
parent | f556bc88774d44206990557303881e3b3c320248 (diff) |
Fix partiality calculation
Diffstat (limited to 'libcrystfel/src/geometry.c')
-rw-r--r-- | libcrystfel/src/geometry.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libcrystfel/src/geometry.c b/libcrystfel/src/geometry.c index 0f6e4809..a62820b4 100644 --- a/libcrystfel/src/geometry.c +++ b/libcrystfel/src/geometry.c @@ -99,20 +99,20 @@ static signed int locate_peak(double x, double y, double z, double k, } -static double partiality(double r1, double r2, double r) +static double partiality(double rlow, double rhigh, double r) { - double q1, q2; - double p1, p2; + double qlow, qhigh; + double plow, phigh; /* Calculate degrees of penetration */ - q1 = (r1 + r)/(2.0*r); - q2 = (r2 + r)/(2.0*r); + qlow = (rlow + r)/(2.0*r); + qhigh = (rhigh + r)/(2.0*r); /* Convert to partiality */ - p1 = 3.0*pow(q1,2.0) - 2.0*pow(q1,3.0); - p2 = 3.0*pow(q2,2.0) - 2.0*pow(q2,3.0); + plow = 3.0*pow(qlow,2.0) - 2.0*pow(qlow,3.0); + phigh = 3.0*pow(qhigh,2.0) - 2.0*pow(qhigh,3.0); - return p2 - p1; + return plow - phigh; } |