aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/geometry.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-01-08 10:49:17 +0100
committerThomas White <taw@physics.org>2021-01-08 10:49:17 +0100
commit845c338b3032837ce37e02fbed0a82879030537d (patch)
treea2bc56e184f1b9d6942cbe9cd89715c5ac931495 /libcrystfel/src/geometry.c
parent97eb1a231a07777a961efe6a389597989d1b7dc4 (diff)
locate_peak_on_panel: Check sign of 1/mu
Diffstat (limited to 'libcrystfel/src/geometry.c')
-rw-r--r--libcrystfel/src/geometry.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libcrystfel/src/geometry.c b/libcrystfel/src/geometry.c
index 510fa833..e61f6fc8 100644
--- a/libcrystfel/src/geometry.c
+++ b/libcrystfel/src/geometry.c
@@ -103,6 +103,10 @@ static int locate_peak_on_panel(double x, double y, double z, double k,
*pfs = fs; *pss = ss;
+ /* If "mu" is negative, then the reflection is in the
+ * wrong direction */
+ if ( one_over_mu < 0.0 ) return 0;
+
/* Now, is this on this panel? */
if ( fs < 0.0 ) return 0;
if ( fs >= p->w ) return 0;