aboutsummaryrefslogtreecommitdiff
path: root/pixelmappers/GaussianMapper.py
diff options
context:
space:
mode:
Diffstat (limited to 'pixelmappers/GaussianMapper.py')
-rw-r--r--pixelmappers/GaussianMapper.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/pixelmappers/GaussianMapper.py b/pixelmappers/GaussianMapper.py
index 686ebcd..883a95d 100644
--- a/pixelmappers/GaussianMapper.py
+++ b/pixelmappers/GaussianMapper.py
@@ -1,9 +1,19 @@
from operationscore.PixelMapper import *
import util.Geo as Geo
class GaussianMapper(PixelMapper):
+ """GaussianMapper is a PixelMapper which weights pixels around an event proportional to a
+ gaussian surface. Specify:
+ <Height> -- The height of the gaussian surface
+ <Width> -- The width of the gaussian surface
+ <MinWeight> -- the minimum weight event that can be returned
+ <CutoffDist> -- the maximum radius considered
+ """
+
def mappingFunction(self, eventLocation, screen):
- returnPixels = [] #TODO: consider preallocation and trimming
+ returnPixels = []
[x,y] = eventLocation
+ potentialPixels = screen.pixelsInRange(x-self.CutoffDist, \
+ x+self.CutoffDist)
for (x,pixel) in screen.pixelsInRange(x-self.CutoffDist, \
x+self.CutoffDist):
pixelDist = Geo.dist(pixel.location, eventLocation)