aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/geometry.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2016-04-07 17:36:57 +0200
committerThomas White <taw@physics.org>2016-07-01 10:17:38 +0200
commit6309221fcc3c573cdb20a7c953b8964fb85f78c5 (patch)
tree73955116d69a4b05490ce33dcee4ab90d765bdfc /libcrystfel/src/geometry.c
parent984ba3a87edddbe223f4597d322d21971c704c1e (diff)
No more slab-relative coordinates in libcrystfel
Diffstat (limited to 'libcrystfel/src/geometry.c')
-rw-r--r--libcrystfel/src/geometry.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/libcrystfel/src/geometry.c b/libcrystfel/src/geometry.c
index 4c24f0bf..0f643ebe 100644
--- a/libcrystfel/src/geometry.c
+++ b/libcrystfel/src/geometry.c
@@ -69,16 +69,13 @@ static int locate_peak_on_panel(double x, double y, double z, double k,
fs = p->xfs*plx + p->yfs*ply;
ss = p->xss*plx + p->yss*ply;
- fs += p->min_fs;
- ss += p->min_ss;
-
*pfs = fs; *pss = ss;
/* Now, is this on this panel? */
- if ( fs < p->min_fs ) return 0;
- if ( fs > p->max_fs ) return 0;
- if ( ss < p->min_ss ) return 0;
- if ( ss > p->max_ss ) return 0;
+ if ( fs < 0 ) return 0;
+ if ( fs > p->w ) return 0;
+ if ( ss < 0 ) return 0;
+ if ( ss > p->h ) return 0;
return 1;
}