aboutsummaryrefslogtreecommitdiff
path: root/pixelmappers
diff options
context:
space:
mode:
authorGravatar rcoh <rcoh@mit.edu>2010-12-20 15:42:13 -0500
committerGravatar rcoh <rcoh@mit.edu>2010-12-20 15:42:13 -0500
commita1d9b85320c9b07d62470d78ef0c5f9015baf813 (patch)
tree8df16aec8de793ba0f2e4b330b764a6f6a49f59a /pixelmappers
parent17577b1b19387b2cefb7ac777ed1323dd36be086 (diff)
parent2736307c1d6d67868ca54a3df951f9e959efedd0 (diff)
Merge branch 'master' into pixelregions
Conflicts: Util.py pixelmappers/SimpleMapper.py
Diffstat (limited to 'pixelmappers')
-rw-r--r--pixelmappers/GaussianMapper.py5
-rw-r--r--pixelmappers/SimpleMapper.py1
2 files changed, 4 insertions, 2 deletions
diff --git a/pixelmappers/GaussianMapper.py b/pixelmappers/GaussianMapper.py
index 04bd447..e94235e 100644
--- a/pixelmappers/GaussianMapper.py
+++ b/pixelmappers/GaussianMapper.py
@@ -1,4 +1,5 @@
from operationscore.PixelMapper import *
+import util.Geo as Geo
import Util
class GaussianMapper(PixelMapper):
def mappingFunction(self, eventLocation, screen):
@@ -6,8 +7,8 @@ class GaussianMapper(PixelMapper):
[x,y] = eventLocation
for (x,pixel) in screen.pixelsInRange(x-self['CutoffDist'], \
x+self['CutoffDist']):
- pixelDist = Util.dist(pixel.location, eventLocation)
+ pixelDist = Geo.dist(pixel.location, eventLocation)
if pixelDist < self['CutoffDist']:
- w = Util.gaussian(pixelDist, self['Height'], 0, self['Width'])
+ w = Geo.gaussian(pixelDist, self['Height'], 0, self['Width'])
returnPixels.append((pixel, w))
return returnPixels
diff --git a/pixelmappers/SimpleMapper.py b/pixelmappers/SimpleMapper.py
index 45082b5..fdcf8b9 100644
--- a/pixelmappers/SimpleMapper.py
+++ b/pixelmappers/SimpleMapper.py
@@ -24,3 +24,4 @@ class SimpleMapper(PixelMapper):
except:
raise Exception('Bad event condition')
return ret
+