aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;