aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/geometry.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcrystfel/src/geometry.c')
-rw-r--r--libcrystfel/src/geometry.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libcrystfel/src/geometry.c b/libcrystfel/src/geometry.c
index 8952486d..250f889c 100644
--- a/libcrystfel/src/geometry.c
+++ b/libcrystfel/src/geometry.c
@@ -151,6 +151,7 @@ static Reflection *check_reflection(struct image *image, Crystal *cryst,
double pr;
double D;
double del;
+ double rlowuc, rhighuc; /* Values before clamping */
/* Don't predict 000 */
if ( abs(h)+abs(k)+abs(l) == 0 ) return NULL;
@@ -197,6 +198,8 @@ static Reflection *check_reflection(struct image *image, Crystal *cryst,
D = rlow - rhigh;
+ rlowuc = rlow; rhighuc = rhigh;
+
/* If the "lower" Ewald sphere is a long way away, use the
* position at which the Ewald sphere would just touch the
* reflection.
@@ -243,7 +246,7 @@ static Reflection *check_reflection(struct image *image, Crystal *cryst,
set_detector_pos(refl, 0.0, xda, yda);
}
- set_partial(refl, rlow, rhigh, part, clamp_low, clamp_high);
+ set_partial(refl, rlowuc, rhighuc, part, clamp_low, clamp_high);
set_lorentz(refl, 1.0);
set_symmetric_indices(refl, h, k, l);
set_redundancy(refl, 1);