aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/detector.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-12-16 16:41:20 +0100
committerThomas White <taw@physics.org>2012-02-22 15:27:42 +0100
commitfbaaf2485cf5f4c8c249e966c2e2ea2888b23e23 (patch)
tree2531b7eb4ac6f6703668c0801da6c09c5b87b128 /libcrystfel/src/detector.c
parentede65cfcd9df2a379db027ee075ef19c52dbfc57 (diff)
Fix bug in reverse_2d_mapping()
Diffstat (limited to 'libcrystfel/src/detector.c')
-rw-r--r--libcrystfel/src/detector.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libcrystfel/src/detector.c b/libcrystfel/src/detector.c
index 12aaa162..ba2890c8 100644
--- a/libcrystfel/src/detector.c
+++ b/libcrystfel/src/detector.c
@@ -1066,8 +1066,8 @@ int reverse_2d_mapping(double x, double y, double *pfs, double *pss,
/* In range? */
if ( fs < 0 ) continue;
if ( ss < 0 ) continue;
- if ( fs > (p->max_fs-p->min_fs+1) ) continue;
- if ( ss > (p->max_ss-p->min_ss+1) ) continue;
+ if ( fs > p->max_fs-p->min_fs ) continue;
+ if ( ss > p->max_ss-p->min_ss ) continue;
*pfs = fs + p->min_fs;
*pss = ss + p->min_ss;