aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2011-03-29 17:51:18 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:22 +0100
commit966ea33baa2d3fdece830b52b1520d408fac9cf2 (patch)
tree8a2bf226bb4ff645fc35756cbb2b1673987df692 /src
parentfa5e50925ed7059dcc7b31cf406c2db8a6dfa796 (diff)
Fix in_bad_region()
Diffstat (limited to 'src')
-rw-r--r--src/detector.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/detector.c b/src/detector.c
index bbbdcdf7..00eab10a 100644
--- a/src/detector.c
+++ b/src/detector.c
@@ -108,9 +108,7 @@ int in_bad_region(struct detector *det, double fs, double ss)
int i;
/* Determine which panel to use */
- const unsigned int x = fs;
- const unsigned int y = ss;
- p = find_panel(det, x, y);
+ p = find_panel(det, fs, ss);
/* No panel found -> definitely bad! */
if ( p == NULL ) return 1;
@@ -120,8 +118,8 @@ int in_bad_region(struct detector *det, double fs, double ss)
xs = (fs-(double)p->min_fs)*p->fsx + (ss-(double)p->min_ss)*p->ssx;
ys = (fs-(double)p->min_fs)*p->fsy + (ss-(double)p->min_ss)*p->ssy;
- rx = (xs + p->cnx) / p->res;
- ry = (ys + p->cny) / p->res;
+ rx = xs + p->cnx;
+ ry = ys + p->cny;
for ( i=0; i<det->n_bad; i++ ) {
struct badregion *b = &det->bad[i];