From 5fb3ea060025241105dc8e9a174513c112f9a133 Mon Sep 17 00:00:00 2001 From: rcoh Date: Thu, 27 Jan 2011 16:50:59 -0500 Subject: A metric $#%$-ton of changes. Added doc-strings to EVERYTHING. Phew. Fixed a massive bug that increases performance in by up to a factor of 60. A bunch of new behaviors for the class. --- pixelmappers/GaussianMapper.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'pixelmappers/GaussianMapper.py') diff --git a/pixelmappers/GaussianMapper.py b/pixelmappers/GaussianMapper.py index c82f243..883a95d 100644 --- a/pixelmappers/GaussianMapper.py +++ b/pixelmappers/GaussianMapper.py @@ -1,8 +1,16 @@ 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: + -- The height of the gaussian surface + -- The width of the gaussian surface + -- the minimum weight event that can be returned + -- 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) -- cgit v1.2.3