Index: src/sas/guiframe/local_perspectives/plotting/AnnulusSlicer.py
===================================================================
--- src/sas/guiframe/local_perspectives/plotting/AnnulusSlicer.py	(revision 400155bab01bdb35b3cf83069f57cf9f47005bca)
+++ src/sas/guiframe/local_perspectives/plotting/AnnulusSlicer.py	(revision 824e488a9a9f8e5e5eaf22c06f7c7d7a0c3af455)
@@ -1,12 +1,12 @@
-#TODO: the line slicer should listen to all 2DREFRESH events, get the data and slice it
+# TODO: the line slicer should listen to all 2DREFRESH events, get the data and slice it
 #      before pushing a new 1D data update.
 
 #
-#TODO: NEED MAJOR REFACTOR
+# TODO: NEED MAJOR REFACTOR
 #
 
 import math
 import wx
-#from copy import deepcopy 
+# from copy import deepcopy
 # Debug printout
 from sas.guiframe.events import NewPlotEvent
@@ -20,10 +20,10 @@
     """
     Select an annulus through a 2D plot.
-    This interactor is used to average 2D data  with the region 
+    This interactor is used to average 2D data  with the region
     defined by 2 radius.
     this class is defined by 2 Ringinterators.
     """
     def __init__(self, base, axes, color='black', zorder=3):
-        
+
         _BaseInteractor.__init__(self, base, axes, color=color)
         self.markers = []
@@ -31,10 +31,10 @@
         self.base = base
         self.qmax = min(math.fabs(self.base.data2D.xmax),
-                        math.fabs(self.base.data2D.xmin))  #must be positive
+                        math.fabs(self.base.data2D.xmin))  # must be positive
         self.connect = self.base.connect
-    
-        ## Number of points on the plot
+
+        # # Number of points on the plot
         self.nbins = 36
-        #Cursor position of Rings (Left(-1) or Right(1))
+        # Cursor position of Rings (Left(-1) or Right(1))
         self.xmaxd = self.base.data2D.xmax
         self.xmind = self.base.data2D.xmin
@@ -46,24 +46,24 @@
         # Inner circle
         self.inner_circle = RingInteractor(self, self.base.subplot,
-                                            zorder=zorder,
-                                            r=self.qmax/2.0, sign=self.sign)
+                                           zorder=zorder,
+                                           r=self.qmax / 2.0, sign=self.sign)
         self.inner_circle.qmax = self.qmax
         self.outer_circle = RingInteractor(self, self.base.subplot,
-                                           zorder=zorder+1, r=self.qmax/1.8,
+                                           zorder=zorder + 1, r=self.qmax / 1.8,
                                            sign=self.sign)
         self.outer_circle.qmax = self.qmax * 1.2
         self.update()
         self._post_data()
-        
+
         # Bind to slice parameter events
         self.base.Bind(EVT_SLICER_PARS, self._onEVT_SLICER_PARS)
-        
+
     def _onEVT_SLICER_PARS(self, event):
         """
         receive an event containing parameters values to reset the slicer
-        
-        :param event: event of type SlicerParameterEvent with params as 
+
+        :param event: event of type SlicerParameterEvent with params as
             attribute
-            
+
         """
         wx.PostEvent(self.base,
@@ -77,11 +77,11 @@
         """
         Allow adding plot to the same panel
-        
+
         :param n: the number of layer
-        
+
         """
         self.layernum = n
         self.update()
-        
+
     def clear(self):
         """
@@ -93,5 +93,5 @@
         self.base.connect.clearall()
         self.base.Unbind(EVT_SLICER_PARS)
-        
+
     def update(self):
         """
@@ -99,8 +99,8 @@
         resetting the widgets.
         """
-        # Update locations        
+        # Update locations
         self.inner_circle.update()
         self.outer_circle.update()
-        
+
     def save(self, ev):
         """
@@ -115,20 +115,20 @@
         """
         Uses annulus parameters to plot averaged data into 1D data.
-        
-        :param nbins: the number of points to plot 
-        
-        """
-        #Data to average
+
+        :param nbins: the number of points to plot
+
+        """
+        # Data to average
         data = self.base.data2D
         # If we have no data, just return
         if data == None:
             return
-        
+
         from sas.dataloader.manipulations import Ring
         rmin = min(math.fabs(self.inner_circle.get_radius()),
-                  math.fabs(self.outer_circle.get_radius()))
+                   math.fabs(self.outer_circle.get_radius()))
         rmax = max(math.fabs(self.inner_circle.get_radius()),
                    math.fabs(self.outer_circle.get_radius()))
-        #if the user does not specify the numbers of points to plot 
+        # if the user does not specify the numbers of points to plot
         # the default number will be nbins= 36
         if nbins == None:
@@ -136,8 +136,8 @@
         else:
             self.nbins = nbins
-        ## create the data1D Q average of data2D    
+        # # create the data1D Q average of data2D
         sect = Ring(r_min=rmin, r_max=rmax, nbins=self.nbins)
         sector = sect(self.base.data2D)
-    
+
         if hasattr(sector, "dxl"):
             dxl = sector.dxl
@@ -148,12 +148,12 @@
         else:
             dxw = None
-        new_plot = Data1D(x=(sector.x - math.pi) * 180/math.pi,
+        new_plot = Data1D(x=(sector.x - math.pi) * 180 / math.pi,
                           y=sector.y, dy=sector.dy)
         new_plot.dxl = dxl
         new_plot.dxw = dxw
-        new_plot.name = "AnnulusPhi" +"("+ self.base.data2D.name+")"
-        
+        new_plot.name = "AnnulusPhi" + "(" + self.base.data2D.name + ")"
+
         new_plot.source = self.base.data2D.source
-        #new_plot.info=self.base.data2D.info
+        # new_plot.info=self.base.data2D.info
         new_plot.interactive = True
         new_plot.detector = self.base.data2D.detector
@@ -168,11 +168,10 @@
         new_plot.group_id = "AnnulusPhi" + self.base.data2D.name
         new_plot.id = "AnnulusPhi" + self.base.data2D.name
-        new_plot.is_data= True
+        new_plot.is_data = True
         new_plot.xtransform = "x"
         new_plot.ytransform = "y"
         self.base.parent.update_theory(data_id=data.id, theory=new_plot)
-        wx.PostEvent(self.base.parent, NewPlotEvent(plot=new_plot,
-                                                 title="AnnulusPhi"))
-        
+        wx.PostEvent(self.base.parent, NewPlotEvent(plot=new_plot, title="AnnulusPhi"))
+
     def moveend(self, ev):
         """
@@ -188,7 +187,5 @@
         event.params = self.get_params()
         wx.PostEvent(self.base, event)
-        # create a 1D data plot
-        #self._post_data()
-            
+
     def restore(self):
         """
@@ -203,14 +200,14 @@
         """
         pass
-        
+
     def set_cursor(self, x, y):
         pass
-        
+
     def get_params(self):
         """
         Store a copy of values of parameters of the slicer into a dictionary.
-        
+
         :return params: the dictionary created
-        
+
         """
         params = {}
@@ -219,28 +216,28 @@
         params["nbins"] = self.nbins
         return params
-    
+
     def set_params(self, params):
         """
-        Receive a dictionary and reset the slicer with values contained 
+        Receive a dictionary and reset the slicer with values contained
         in the values of the dictionary.
-        
-        :param params: a dictionary containing name of slicer parameters and 
+
+        :param params: a dictionary containing name of slicer parameters and
             values the user assigned to the slicer.
-            
+
         """
         inner = math.fabs(params["inner_radius"])
         outer = math.fabs(params["outer_radius"])
         self.nbins = int(params["nbins"])
-        ## Update the picture
+        # # Update the picture
         self.inner_circle.set_cursor(inner, self.inner_circle._inner_mouse_y)
         self.outer_circle.set_cursor(outer, self.outer_circle._inner_mouse_y)
-        ## Post the data given the nbins entered by the user 
+        # # Post the data given the nbins entered by the user
         self._post_data(self.nbins)
-        
+
     def freeze_axes(self):
         """
         """
         self.base.freeze_axes()
-        
+
     def thaw_axes(self):
         """
@@ -253,8 +250,8 @@
         self.base.draw()
 
-        
+
 class RingInteractor(_BaseInteractor):
     """
-     Draw a ring Given a radius 
+     Draw a ring Given a radius
     """
     def __init__(self, base, axes, color='black', zorder=5, r=1.0, sign=1):
@@ -262,6 +259,6 @@
         :param: the color of the line that defined the ring
         :param r: the radius of the ring
-        :param sign: the direction of motion the the marker 
-        
+        :param sign: the direction of motion the the marker
+
         """
         _BaseInteractor.__init__(self, base, axes, color=color)
@@ -270,51 +267,44 @@
         # Current radius of the ring
         self._inner_mouse_x = r
-        #Value of the center of the ring
+        # Value of the center of the ring
         self._inner_mouse_y = 0
         # previous value of that radius
-        self._inner_save_x  = r
-        #Save value of the center of the ring
-        self._inner_save_y  = 0
-        #Class instantiating RingIterator class
+        self._inner_save_x = r
+        # Save value of the center of the ring
+        self._inner_save_y = 0
+        # Class instantiating RingIterator class
         self.base = base
-        #the direction of the motion of the marker
+        # the direction of the motion of the marker
         self.sign = sign
-        ## Create a marker 
+        # # Create a marker
         try:
             # Inner circle marker
             x_value = [self.sign * math.fabs(self._inner_mouse_x)]
-            self.inner_marker = self.axes.plot(x_value,
-                                               [0],
-                                                linestyle='',
-                                          marker='s', markersize=10,
-                                          color=self.color, alpha=0.6,
-                                          pickradius=5, label="pick", 
-                                          zorder=zorder,
-                                          visible=True)[0]
+            self.inner_marker = self.axes.plot(x_value, [0], linestyle='',
+                                               marker='s', markersize=10,
+                                               color=self.color, alpha=0.6,
+                                               pickradius=5, label="pick",
+                                               zorder=zorder,
+                                               visible=True)[0]
         except:
             x_value = [self.sign * math.fabs(self._inner_mouse_x)]
-            self.inner_marker = self.axes.plot(x_value,
-                                               [0], 
-                                               linestyle='',
-                                          marker='s', markersize=10,
-                                          color=self.color, alpha=0.6,
-                                          label="pick", 
-                                          visible=True)[0]
-            message  = "\nTHIS PROTOTYPE NEEDS THE LATEST"
+            self.inner_marker = self.axes.plot(x_value, [0], linestyle='',
+                                               marker='s', markersize=10,
+                                               color=self.color, alpha=0.6,
+                                               label="pick",
+                                               visible=True)[0]
+            message = "\nTHIS PROTOTYPE NEEDS THE LATEST"
             message += " VERSION OF MATPLOTLIB\n"
             message += "Get the SVN version that is at "
             message += " least as recent as June 1, 2007"
-            
+
             owner = self.base.base.parent
-            wx.PostEvent(owner, 
-                         StatusEvent(status="AnnulusSlicer: %s" % message))
-            
-        # Draw a circle 
-        [self.inner_circle] = self.axes.plot([], [],
-                                      linestyle='-', marker='',
-                                      color=self.color)
+            wx.PostEvent(owner, StatusEvent(status="AnnulusSlicer: %s" % message))
+
+        # Draw a circle
+        [self.inner_circle] = self.axes.plot([], [], linestyle='-', marker='', color=self.color)
         # the number of points that make the ring line
         self.npts = 40
-            
+
         self.connect_markers([self.inner_marker])
         self.update()
@@ -323,11 +313,11 @@
         """
         Allow adding plot to the same panel
-         
+
         :param n: the number of layer
-        
+
         """
         self.layernum = n
         self.update()
-        
+
     def clear(self):
         """
@@ -342,5 +332,5 @@
             for item in range(len(self.axes.lines)):
                 del self.axes.lines[0]
-        
+
     def get_radius(self):
         """
@@ -348,5 +338,5 @@
         """
         return self._inner_mouse_x
-        
+
     def update(self):
         """
@@ -358,14 +348,14 @@
         for i in range(self.npts):
             phi = 2.0 * math.pi / (self.npts - 1) * i
-            
-            xval = 1.0 * self._inner_mouse_x * math.cos(phi) 
-            yval = 1.0 * self._inner_mouse_x * math.sin(phi) 
-            
+
+            xval = 1.0 * self._inner_mouse_x * math.cos(phi)
+            yval = 1.0 * self._inner_mouse_x * math.sin(phi)
+
             x.append(xval)
             y.append(yval)
-            
-        self.inner_marker.set(xdata=[self.sign*math.fabs(self._inner_mouse_x)],
+
+        self.inner_marker.set(xdata=[self.sign * math.fabs(self._inner_mouse_x)],
                               ydata=[0])
-        self.inner_circle.set_data(x, y)        
+        self.inner_circle.set_data(x, y)
 
     def save(self, ev):
@@ -383,5 +373,5 @@
         """
         self.base.moveend(ev)
-            
+
     def restore(self):
         """
@@ -398,47 +388,45 @@
         self._inner_mouse_y = y
         self.base.base.update()
-        
+
     def set_cursor(self, x, y):
         """
-        draw the ring given x, y value 
+        draw the ring given x, y value
         """
         self.move(x, y, None)
         self.update()
-        
-        
+
+
     def get_params(self):
         """
         Store a copy of values of parameters of the slicer into a dictionary.
-        
+
         :return params: the dictionary created
-        
+
         """
         params = {}
         params["radius"] = math.fabs(self._inner_mouse_x)
         return params
-    
+
     def set_params(self, params):
         """
-        Receive a dictionary and reset the slicer with values contained 
+        Receive a dictionary and reset the slicer with values contained
         in the values of the dictionary.
-        
-        :param params: a dictionary containing name of slicer parameters and 
+
+        :param params: a dictionary containing name of slicer parameters and
             values the user assigned to the slicer.
-            
-        """
-        x = params["radius"] 
+
+        """
+        x = params["radius"]
         self.set_cursor(x, self._inner_mouse_y)
-        
+
 class CircularMask(_BaseInteractor):
     """
-     Draw a ring Given a radius 
+     Draw a ring Given a radius
     """
     def __init__(self, base, axes, color='grey', zorder=3, side=None):
         """
-        
         :param: the color of the line that defined the ring
         :param r: the radius of the ring
-        :param sign: the direction of motion the the marker 
-        
+        :param sign: the direction of motion the the marker
         """
         _BaseInteractor.__init__(self, base, axes, color=color)
@@ -448,8 +436,8 @@
         self.is_inside = side
         self.qmax = min(math.fabs(self.base.data.xmax),
-                        math.fabs(self.base.data.xmin))  #must be positive
+                        math.fabs(self.base.data.xmin))  # must be positive
         self.connect = self.base.connect
-        
-        #Cursor position of Rings (Left(-1) or Right(1))
+
+        # Cursor position of Rings (Left(-1) or Right(1))
         self.xmaxd = self.base.data.xmax
         self.xmind = self.base.data.xmin
@@ -461,18 +449,18 @@
         # Inner circle
         self.outer_circle = RingInteractor(self, self.base.subplot, 'blue',
-                                            zorder=zorder+1, r=self.qmax/1.8,
-                                            sign=self.sign)
+                                           zorder=zorder + 1, r=self.qmax / 1.8,
+                                           sign=self.sign)
         self.outer_circle.qmax = self.qmax * 1.2
         self.update()
         self._post_data()
-        
+
         # Bind to slice parameter events
-        #self.base.Bind(EVT_SLICER_PARS, self._onEVT_SLICER_PARS)
-        
+        # self.base.Bind(EVT_SLICER_PARS, self._onEVT_SLICER_PARS)
+
     def _onEVT_SLICER_PARS(self, event):
         """
         receive an event containing parameters values to reset the slicer
-        
-        :param event: event of type SlicerParameterEvent with params as 
+
+        :param event: event of type SlicerParameterEvent with params as
             attribute
         """
@@ -487,11 +475,11 @@
         """
         Allow adding plot to the same panel
-         
+
         :param n: the number of layer
-        
+
         """
         self.layernum = n
         self.update()
-        
+
     def clear(self):
         """
@@ -501,6 +489,6 @@
         self.outer_circle.clear()
         self.base.connect.clearall()
-        #self.base.Unbind(EVT_SLICER_PARS)
-        
+        # self.base.Unbind(EVT_SLICER_PARS)
+
     def update(self):
         """
@@ -508,7 +496,7 @@
         resetting the widgets.
         """
-        # Update locations        
+        # Update locations
         self.outer_circle.update()
-        #if self.is_inside != None:
+        # if self.is_inside != None:
         out = self._post_data()
         return out
@@ -525,22 +513,22 @@
         """
         Uses annulus parameters to plot averaged data into 1D data.
-        
-        :param nbins: the number of points to plot 
-        
-        """
-        #Data to average
+
+        :param nbins: the number of points to plot
+
+        """
+        # Data to average
         data = self.base.data
-              
+
         # If we have no data, just return
         if data == None:
             return
-        mask = data.mask  
+        mask = data.mask
         from sas.dataloader.manipulations import Ringcut
-    
+
         rmin = 0
         rmax = math.fabs(self.outer_circle.get_radius())
 
-        ## create the data1D Q average of data2D    
-        mask = Ringcut(r_min=rmin, r_max= rmax)
+        # # create the data1D Q average of data2D
+        mask = Ringcut(r_min=rmin, r_max=rmax)
 
         if self.is_inside:
@@ -548,8 +536,8 @@
         else:
             out = (mask(data))
-        #self.base.data.mask=out
-        return out                    
-
-         
+        # self.base.data.mask=out
+        return out
+
+
     def moveend(self, ev):
         """
@@ -562,5 +550,5 @@
         # create a 1D data plot
         self._post_data()
-            
+
     def restore(self):
         """
@@ -574,36 +562,36 @@
         """
         pass
-        
+
     def set_cursor(self, x, y):
         pass
-        
+
     def get_params(self):
         """
         Store a copy of values of parameters of the slicer into a dictionary.
-        
+
         :return params: the dictionary created
-        
+
         """
         params = {}
         params["outer_radius"] = math.fabs(self.outer_circle._inner_mouse_x)
         return params
-    
+
     def set_params(self, params):
         """
-        Receive a dictionary and reset the slicer with values contained 
+        Receive a dictionary and reset the slicer with values contained
         in the values of the dictionary.
-        
-        :param params: a dictionary containing name of slicer parameters and 
+
+        :param params: a dictionary containing name of slicer parameters and
             values the user assigned to the slicer.
         """
-        outer = math.fabs(params["outer_radius"] )
-        ## Update the picture
+        outer = math.fabs(params["outer_radius"])
+        # # Update the picture
         self.outer_circle.set_cursor(outer, self.outer_circle._inner_mouse_y)
-        ## Post the data given the nbins entered by the user 
+        # # Post the data given the nbins entered by the user
         self._post_data()
-        
+
     def freeze_axes(self):
         self.base.freeze_axes()
-        
+
     def thaw_axes(self):
         self.base.thaw_axes()
@@ -611,3 +599,3 @@
     def draw(self):
         self.base.update()
-              
+
Index: src/sas/guiframe/local_perspectives/plotting/Arc.py
===================================================================
--- src/sas/guiframe/local_perspectives/plotting/Arc.py	(revision 794922220f2fb3b23dd08c648aabf87b4850596c)
+++ src/sas/guiframe/local_perspectives/plotting/Arc.py	(revision 824e488a9a9f8e5e5eaf22c06f7c7d7a0c3af455)
@@ -6,12 +6,11 @@
 from BaseInteractor import _BaseInteractor
 from sas.guiframe.events import SlicerParameterEvent
- 
+
 class ArcInteractor(_BaseInteractor):
     """
     Select an annulus through a 2D plot
     """
-    def __init__(self, base, axes, color='black', zorder=5, r=1.0, 
-                 theta1=math.pi/8, theta2=math.pi/4):
-        
+    def __init__(self, base, axes, color='black', zorder=5, r=1.0,
+                 theta1=math.pi / 8, theta2=math.pi / 4):
         _BaseInteractor.__init__(self, base, axes, color=color)
         self.markers = []
@@ -19,18 +18,13 @@
         self._mouse_x = r
         self._mouse_y = 0
-        
-        self._save_x  = r
-        self._save_y  = 0
-        
+        self._save_x = r
+        self._save_y = 0
         self.scale = 10.0
-        
         self.theta1 = theta1
         self.theta2 = theta2
         self.radius = r
-        [self.arc] = self.axes.plot([], [],
-                                      linestyle='-', marker='',
-                                      color=self.color)
+        [self.arc] = self.axes.plot([], [], linestyle='-', marker='', color=self.color)
         self.npts = 20
-        self.has_move = False    
+        self.has_move = False
         self.connect_markers([self.arc])
         self.update()
@@ -43,5 +37,5 @@
         self.layernum = n
         self.update()
-        
+
     def clear(self):
         """
@@ -57,5 +51,5 @@
             for item in range(len(self.axes.lines)):
                 del self.axes.lines[0]
-        
+
     def get_radius(self):
         """
@@ -65,5 +59,5 @@
                            math.pow(self._mouse_y, 2))
         return radius
-        
+
     def update(self, theta1=None, theta2=None, nbins=None, r=None):
         """
@@ -85,21 +79,21 @@
         while self.theta2 >= (self.theta1 + 2 * math.pi):
             self.theta2 -= (2 * math.pi)
-        npts = int((self.theta2 - self.theta1)/(math.pi/120))  
-             
+        npts = int((self.theta2 - self.theta1) / (math.pi / 120))
+
         if r == None:
-            self.radius =  math.sqrt(math.pow(self._mouse_x, 2) + \
+            self.radius = math.sqrt(math.pow(self._mouse_x, 2) + \
                                      math.pow(self._mouse_y, 2))
         else:
             self.radius = r
         for i in range(self.npts):
-            phi = (self.theta2 - self.theta1)/(self.npts - 1) * i + self.theta1
-            xval = 1.0 * self.radius * math.cos(phi) 
-            yval = 1.0 * self.radius * math.sin(phi) 
-            
+            phi = (self.theta2 - self.theta1) / (self.npts - 1) * i + self.theta1
+            xval = 1.0 * self.radius * math.cos(phi)
+            yval = 1.0 * self.radius * math.sin(phi)
+
             x.append(xval)
             y.append(yval)
-        #self.marker.set(xdata=[self._mouse_x],ydata=[0])
-        self.arc.set_data(x, y) 
-        
+        # self.marker.set(xdata=[self._mouse_x],ydata=[0])
+        self.arc.set_data(x, y)
+
     def save(self, ev):
         """
@@ -109,6 +103,6 @@
         self._save_x = self._mouse_x
         self._save_y = self._mouse_y
-        #self._save_x = ev.xdata
-        #self._save_y = ev.ydata
+        # self._save_x = ev.xdata
+        # self._save_y = ev.ydata
         self.base.freeze_axes()
 
@@ -119,10 +113,10 @@
         """
         self.has_move = False
-        
+
         event = SlicerParameterEvent()
         event.type = self.__class__.__name__
         event.params = self.get_params()
         self.base.moveend(ev)
-            
+
     def restore(self):
         """
@@ -131,15 +125,15 @@
         self._mouse_x = self._save_x
         self._mouse_y = self._save_y
-       
+
     def move(self, x, y, ev):
         """
         Process move to a new position, making sure that the move is allowed.
         """
-        #print "ring move x, y", x,y
+        # print "ring move x, y", x,y
         self._mouse_x = x
         self._mouse_y = y
         self.has_move = True
         self.base.base.update()
-        
+
     def set_cursor(self, radius, phi_min, phi_max, nbins):
         """
@@ -157,12 +151,11 @@
         params["theta2"] = self.theta2
         return params
-    
+
     def set_params(self, params):
         """
         """
-        x = params["radius"] 
+        x = params["radius"]
         phi_max = self.theta2
         nbins = self.npts
         self.set_cursor(x, self._mouse_y, phi_max, nbins)
-        
-    
+
Index: src/sas/guiframe/local_perspectives/plotting/AzimutSlicer.py
===================================================================
--- src/sas/guiframe/local_perspectives/plotting/AzimutSlicer.py	(revision 794922220f2fb3b23dd08c648aabf87b4850596c)
+++ src/sas/guiframe/local_perspectives/plotting/AzimutSlicer.py	(revision 824e488a9a9f8e5e5eaf22c06f7c7d7a0c3af455)
@@ -1,20 +1,12 @@
-#TODO: the line slicer should listen to all 2DREFRESH events, get the data and slice it
-#      before pushing a new 1D data update.
-
+# TODO: the line slicer should listen to all 2DREFRESH events, get the data and slice it
+#       before pushing a new 1D data update.
 #
-#TODO: NEED MAJOR REFACTOR
+# TODO: NEED MAJOR REFACTOR
 #
-
-
-# Debug printout
 import math
 import wx
-from copy import deepcopy
 from BaseInteractor import _BaseInteractor
 from sas.guiframe.events import NewPlotEvent
-from sas.guiframe.events import StatusEvent
-from sas.guiframe.events import SlicerParameterEvent
 from sas.guiframe.events import EVT_SLICER_PARS
-
 
 class SectorInteractor(_BaseInteractor):
@@ -30,40 +22,36 @@
         self.qmax = self.base.data2D.xmax
         self.connect = self.base.connect
-        
-        ## Number of points on the plot
+
+        # # Number of points on the plot
         self.nbins = 20
-        theta1 = math.pi/8
-        theta2 = math.pi/2
-        theta1 = 2 * math.pi/3
-        theta2 = -2 * math.pi/3
-        r1 = self.qmax/2.0
-        r2 = self.qmax/1.8
-       
+        theta1 = 2 * math.pi / 3
+        theta2 = -2 * math.pi / 3
+
         # Inner circle
         from Arc import ArcInteractor
         self.inner_circle = ArcInteractor(self, self.base.subplot,
-                                           zorder=zorder,
-                                           r=self.qmax/2.0,
-                                           theta1=theta1,
-                                           theta2=theta2)
+                                          zorder=zorder,
+                                          r=self.qmax / 2.0,
+                                          theta1=theta1,
+                                          theta2=theta2)
         self.inner_circle.qmax = self.qmax
         self.outer_circle = ArcInteractor(self, self.base.subplot,
-                                          zorder=zorder+1,
-                                          r=self.qmax/1.8,
+                                          zorder=zorder + 1,
+                                          r=self.qmax / 1.8,
                                           theta1=theta1,
-                                           theta2=theta2)
+                                          theta2=theta2)
         self.outer_circle.qmax = self.qmax * 1.2
-        #self.outer_circle.set_cursor(self.base.qmax/1.8, 0)
+        # self.outer_circle.set_cursor(self.base.qmax/1.8, 0)
         from Edge import RadiusInteractor
-        self.right_edge= RadiusInteractor(self, self.base.subplot,
-                                          zorder=zorder+1,
-                                             arc1=self.inner_circle,
-                                             arc2=self.outer_circle,
-                                            theta=theta1)
-        self.left_edge= RadiusInteractor(self, self.base.subplot,
-                                         zorder=zorder+1,
-                                             arc1=self.inner_circle,
-                                             arc2=self.outer_circle,
-                                            theta=theta2)
+        self.right_edge = RadiusInteractor(self, self.base.subplot,
+                                           zorder=zorder + 1,
+                                           arc1=self.inner_circle,
+                                           arc2=self.outer_circle,
+                                           theta=theta1)
+        self.left_edge = RadiusInteractor(self, self.base.subplot,
+                                          zorder=zorder + 1,
+                                          arc1=self.inner_circle,
+                                          arc2=self.outer_circle,
+                                          theta=theta2)
         self.update()
         self._post_data()
@@ -74,5 +62,5 @@
         """
         """
-        #printEVT("AnnulusSlicer._onEVT_SLICER_PARS")
+        # printEVT("AnnulusSlicer._onEVT_SLICER_PARS")
         event.Skip()
         if event.type == self.__class__.__name__:
@@ -85,5 +73,5 @@
         self.layernum = n
         self.update()
-        
+
     def clear(self):
         """
@@ -94,7 +82,7 @@
         self.right_edge.clear()
         self.left_edge.clear()
-        #self.base.connect.disconnect()
+        # self.base.connect.disconnect()
         self.base.parent.Unbind(EVT_SLICER_PARS)
-        
+
     def update(self):
         """
@@ -102,7 +90,7 @@
         resetting the widgets.
         """
-        # Update locations   
-        if self.inner_circle.has_move:    
-            #print "inner circle has moved" 
+        # Update locations
+        if self.inner_circle.has_move:
+            # print "inner circle has moved"
             self.inner_circle.update()
             r1 = self.inner_circle.get_radius()
@@ -110,6 +98,6 @@
             self.right_edge.update(r1, r2)
             self.left_edge.update(r1, r2)
-        if self.outer_circle.has_move:    
-            #print "outer circle has moved" 
+        if self.outer_circle.has_move:
+            # print "outer circle has moved"
             self.outer_circle.update()
             r1 = self.inner_circle.get_radius()
@@ -118,5 +106,5 @@
             self.right_edge.update(r1, r2)
         if self.right_edge.has_move:
-            #print "right edge has moved"
+            # print "right edge has moved"
             self.right_edge.update()
             self.inner_circle.update(theta1=self.right_edge.get_angle(),
@@ -125,5 +113,5 @@
                                      theta2=None)
         if  self.left_edge.has_move:
-            #print "left Edge has moved"
+            # print "left Edge has moved"
             self.left_edge.update()
             self.inner_circle.update(theta1=None,
@@ -131,5 +119,5 @@
             self.outer_circle.update(theta1=None,
                                      theta2=self.left_edge.get_angle())
-             
+
     def save(self, ev):
         """
@@ -142,9 +130,9 @@
         self.right_edge.save(ev)
         self.left_edge.save(ev)
-        
+
     def _post_data(self):
         pass
-    
-    def post_data(self,new_sector ):
+
+    def post_data(self, new_sector):
         """ post data averaging in Q"""
         if self.inner_circle.get_radius() < self.outer_circle.get_radius():
@@ -159,13 +147,13 @@
         else:
             phimin = self.left_edge.get_angle()
-            phimax = self.right_edge.get_angle()   
-        #print "phimin, phimax, rmin ,rmax",math.degrees(phimin),
+            phimax = self.right_edge.get_angle()
+        # print "phimin, phimax, rmin ,rmax",math.degrees(phimin),
         # math.degrees(phimax), rmin ,rmax
-        #from sas.dataloader.manipulations import SectorQ
-        
+        # from sas.dataloader.manipulations import SectorQ
+
         sect = new_sector(r_min=rmin, r_max=rmax,
                           phi_min=phimin, phi_max=phimax)
         sector = sect(self.base.data2D)
-        
+
         from sas.guiframe.dataFitting import Data1D
         if hasattr(sector, "dxl"):
@@ -180,8 +168,8 @@
                           dxl=dxl, dxw=dxw)
         new_plot.name = str(new_sector.__name__) + \
-                        "("+ self.base.data2D.name+")"
+                        "(" + self.base.data2D.name + ")"
         new_plot.source = self.base.data2D.source
         new_plot.interactive = True
-        #print "loader output.detector",output.source
+        # print "loader output.detector",output.source
         new_plot.detector = self.base.data2D.detector
         # If the data file does not tell us what the axes are, just assume...
@@ -192,18 +180,10 @@
                                        theory=new_plot)
         wx.PostEvent(self.base.parent,
-                    NewPlotEvent(plot=new_plot, title=str(new_sector.__name__)))
-        
+                     NewPlotEvent(plot=new_plot, title=str(new_sector.__name__)))
+
     def moveend(self, ev):
-        #self.base.thaw_axes()
-        
-        # Post paramters
-        #event = SlicerParameterEvent()
-        #event.type = self.__class__.__name__
-        #event.params = self.get_params()
-        #print "main moveend ", event.params
-        #wx.PostEvent(self.base.parent, event)
-        #self._post_data()
-        pass
-            
+        #TODO: why is this empty?
+        pass
+
     def restore(self):
         """
@@ -220,10 +200,10 @@
         """
         pass
-        
+
     def set_cursor(self, x, y):
         """
         """
         pass
-        
+
     def get_params(self):
         """
@@ -236,26 +216,26 @@
         params["nbins"] = self.nbins
         return params
-    
+
     def set_params(self, params):
         """
         """
-        #print "setparams on main slicer ",params
-        inner = params["r_min"] 
-        outer = params["r_max"] 
-        phi_min= params["phi_min"]
-        phi_max=params["phi_max"]
+        # print "setparams on main slicer ",params
+        inner = params["r_min"]
+        outer = params["r_max"]
+        phi_min = params["phi_min"]
+        phi_max = params["phi_max"]
         self.nbins = int(params["nbins"])
-        
-        self.inner_circle.set_cursor(inner, phi_min, phi_max,self.nbins)
-        self.outer_circle.set_cursor(outer,  phi_min, phi_max, self.nbins)
+
+        self.inner_circle.set_cursor(inner, phi_min, phi_max, self.nbins)
+        self.outer_circle.set_cursor(outer, phi_min, phi_max, self.nbins)
         self.right_edge.set_cursor(inner, outer, phi_min)
         self.left_edge.set_cursor(inner, outer, phi_max)
         self._post_data()
-        
+
     def freeze_axes(self):
         """
         """
         self.base.freeze_axes()
-        
+
     def thaw_axes(self):
         """
@@ -275,13 +255,13 @@
         """
         SectorInteractor.__init__(self, base, axes, color=color)
-        self.base=base
-        self._post_data()
-        
+        self.base = base
+        self._post_data()
+
     def _post_data(self):
         """
         """
         from sas.dataloader.manipulations import SectorQ
-        self.post_data(SectorQ)   
-        
+        self.post_data(SectorQ)
+
 
 class SectorInteractorPhi(SectorInteractor):
@@ -292,12 +272,11 @@
         """
         SectorInteractor.__init__(self, base, axes, color=color)
-        self.base=base
-        self._post_data()
-        
+        self.base = base
+        self._post_data()
+
     def _post_data(self):
         """
         """
         from sas.dataloader.manipulations import SectorPhi
-        self.post_data(SectorPhi )   
-        
-        
+        self.post_data(SectorPhi)
+
Index: src/sas/guiframe/local_perspectives/plotting/BaseInteractor.py
===================================================================
--- src/sas/guiframe/local_perspectives/plotting/BaseInteractor.py	(revision 794922220f2fb3b23dd08c648aabf87b4850596c)
+++ src/sas/guiframe/local_perspectives/plotting/BaseInteractor.py	(revision 824e488a9a9f8e5e5eaf22c06f7c7d7a0c3af455)
@@ -8,11 +8,11 @@
 profile_colors = [rho_color, mu_color, P_color, theta_color]
 
-class _BaseInteractor:
+class _BaseInteractor(object):
     """
     Share some functions between the interface interactor and various layer
     interactors.
-    
+
     Individual interactors need the following functions:
-    
+
         save(ev)  - save the current state for later restore
         restore() - restore the old state
@@ -20,7 +20,7 @@
         moveend(ev) - end the drag event
         update() - draw the interactors
-        
+
     The following are provided by the base class:
-    
+
         connect_markers(markers) - register callbacks for all markers
         clear_markers() - remove all items in self.markers
@@ -31,12 +31,12 @@
         onDrag(ev) - mouse move: calls move() or restore()
         onKey(ev) - keyboard move: calls move() or restore()
-        
+
     Interactor attributes:
-    
+
         base  - model we are operating on
         axes  - axes holding the interactor
         color - color of the interactor in non-active state
         markers - list of handles for the interactor
-        
+
     """
     def __init__(self, base, axes, color='black'):
@@ -49,5 +49,5 @@
         self.clicky = None
         self.markers = []
-        
+
     def clear_markers(self):
         """
@@ -63,15 +63,15 @@
         """
         pass
-    
+
     def restore(self, ev):
         """
         """
         pass
-    
+
     def move(self, x, y, ev):
         """
         """
         pass
-    
+
     def moveend(self, ev):
         """
@@ -83,5 +83,5 @@
         Connect markers to callbacks
         """
-       
+
         for h in markers:
             connect = self.base.connect
@@ -109,5 +109,5 @@
         self.base.draw()
         return True
-            
+
     def onClick(self, ev):
         """
@@ -138,10 +138,10 @@
         self.base.update()
         return True
-    
+
     def onKey(self, ev):
         """
         Respond to keyboard events.  Arrow keys move the widget.  Escape
         restores it to the position before the last click.
-        
+
         Calls move() to update the state.  Calls restore() on escape.
         """
@@ -173,8 +173,8 @@
         px, py = ax.transData.inverse_xy_tup((x, y))
         if nudge:
-            nx, ny = ax.transData.xy_tup((px+0.2, py+0.2))
+            nx, ny = ax.transData.xy_tup((px + 0.2, py + 0.2))
         else:
-            nx, ny = ax.transData.xy_tup((px+1.0, py+1.0))
-        dx, dy = nx-x, ny-y
+            nx, ny = ax.transData.xy_tup((px + 1.0, py + 1.0))
+        dx, dy = nx - x, ny - y
         return dx, dy
 
Index: src/sas/guiframe/local_perspectives/plotting/appearanceDialog.py
===================================================================
--- src/sas/guiframe/local_perspectives/plotting/appearanceDialog.py	(revision 794922220f2fb3b23dd08c648aabf87b4850596c)
+++ src/sas/guiframe/local_perspectives/plotting/appearanceDialog.py	(revision 824e488a9a9f8e5e5eaf22c06f7c7d7a0c3af455)
@@ -19,7 +19,7 @@
         Initialization of the Panel
         """
-        super(appearanceDialog, self).__init__(parent, title=title, 
-                        size=(570,450), 
-                        style=wx.DEFAULT_FRAME_STYLE|wx.FRAME_FLOAT_ON_PARENT)
+        super(appearanceDialog,
+              self).__init__(parent, title=title, size=(570, 450),
+                             style=wx.DEFAULT_FRAME_STYLE | wx.FRAME_FLOAT_ON_PARENT)
 
         self.okay_clicked = False
@@ -45,5 +45,5 @@
         ivbox1 = wx.BoxSizer(wx.VERTICAL)
         ivbox2 = wx.BoxSizer(wx.VERTICAL)
- 
+
         ihbox1 = wx.BoxSizer(wx.HORIZONTAL)
         ihbox2 = wx.BoxSizer(wx.HORIZONTAL)
@@ -61,12 +61,12 @@
         # selection widgets
         self.symbollistbox = wx.ListBox(panel, -1, size=(200, 200))
-        self.colorlistbox = wx.ComboBox(panel, style=wx.CB_READONLY, 
+        self.colorlistbox = wx.ComboBox(panel, style=wx.CB_READONLY,
                                         size=(185, -1))
-        self.sizecombobox = wx.ComboBox(panel, style=wx.CB_READONLY, 
+        self.sizecombobox = wx.ComboBox(panel, style=wx.CB_READONLY,
                                         size=(90, -1))
         self.sizecombobox.Bind(wx.EVT_COMBOBOX, self.combo_click)
         self.sizecustombutton = wx.Button(panel, label='Custom...')
         self.sizecustombutton.Bind(wx.EVT_BUTTON, self.custom_size)
-        self.labeltextbox = wx.TextCtrl(panel, -1, "",  size=(440, -1))
+        self.labeltextbox = wx.TextCtrl(panel, -1, "", size=(440, -1))
 
         # buttons
@@ -77,15 +77,15 @@
 
         # now Add all the widgets to relevant spacer - tricky
-        ivbox1.Add(symboltext, flag=wx.ALL|wx.ALIGN_LEFT, border=10)
-        ivbox1.Add(self.symbollistbox, flag=wx.ALL|wx.ALIGN_LEFT, border=10)
-
-        ihbox1.Add(sizetext, flag=wx.ALL|wx.ALIGN_LEFT, border=10)
-        ihbox1.Add(self.sizecombobox, 
-                   flag= wx.ALL|wx.RIGHT|wx.ALIGN_LEFT, border=10)
-        ihbox1.Add(self.sizecustombutton, 
-                   flag=wx.ALIGN_LEFT|wx.ALL, border=10)
-
-        ihbox2.Add(colortext, flag=wx.ALL|wx.ALIGN_LEFT, border=10)
-        ihbox2.Add(self.colorlistbox, flag=wx.ALL|wx.ALIGN_LEFT, border=10)
+        ivbox1.Add(symboltext, flag=wx.ALL | wx.ALIGN_LEFT, border=10)
+        ivbox1.Add(self.symbollistbox, flag=wx.ALL | wx.ALIGN_LEFT, border=10)
+
+        ihbox1.Add(sizetext, flag=wx.ALL | wx.ALIGN_LEFT, border=10)
+        ihbox1.Add(self.sizecombobox,
+                   flag=wx.ALL | wx.RIGHT | wx.ALIGN_LEFT, border=10)
+        ihbox1.Add(self.sizecustombutton,
+                   flag=wx.ALIGN_LEFT | wx.ALL, border=10)
+
+        ihbox2.Add(colortext, flag=wx.ALL | wx.ALIGN_LEFT, border=10)
+        ihbox2.Add(self.colorlistbox, flag=wx.ALL | wx.ALIGN_LEFT, border=10)
 
         ivbox2.Add(ihbox1, flag=wx.ALIGN_LEFT, border=10)
@@ -95,15 +95,15 @@
         hbox1.Add(ivbox2, flag=wx.ALIGN_LEFT, border=10)
 
-        hbox2.Add(okbutton, flag=wx.ALL| wx.ALIGN_RIGHT, border=10)
-        hbox2.Add(cancelbutton, flag=wx.ALL|wx.ALIGN_RIGHT, border=10)
-
-        hbox3.Add(labeltext, flag=wx.EXPAND|wx.ALL|wx.ALIGN_LEFT, border=10)
-        hbox3.Add(self.labeltextbox, flag=wx.EXPAND|wx.ALL|wx.ALIGN_LEFT, border=10)
-  
-        symbolstaticboxsizer.Add(hbox1, flag=wx.ALL|wx.EXPAND, border=10)
-        vbox.Add(symbolstaticboxsizer, flag=wx.ALL|wx.EXPAND, border=10)
-        vbox.Add(hbox3, flag=wx.EXPAND|wx.RIGHT, border=10)
-        vbox.Add(wx.StaticLine(panel), 0, wx.ALL|wx.EXPAND, 5)
-        vbox.Add(hbox2, flag=wx.RIGHT|wx.ALIGN_RIGHT, border=10)
+        hbox2.Add(okbutton, flag=wx.ALL | wx.ALIGN_RIGHT, border=10)
+        hbox2.Add(cancelbutton, flag=wx.ALL | wx.ALIGN_RIGHT, border=10)
+
+        hbox3.Add(labeltext, flag=wx.EXPAND | wx.ALL | wx.ALIGN_LEFT, border=10)
+        hbox3.Add(self.labeltextbox, flag=wx.EXPAND | wx.ALL | wx.ALIGN_LEFT, border=10)
+
+        symbolstaticboxsizer.Add(hbox1, flag=wx.ALL | wx.EXPAND, border=10)
+        vbox.Add(symbolstaticboxsizer, flag=wx.ALL | wx.EXPAND, border=10)
+        vbox.Add(hbox3, flag=wx.EXPAND | wx.RIGHT, border=10)
+        vbox.Add(wx.StaticLine(panel), 0, wx.ALL | wx.EXPAND, 5)
+        vbox.Add(hbox2, flag=wx.RIGHT | wx.ALIGN_RIGHT, border=10)
 
         panel.SetSizer(vbox)
@@ -119,14 +119,10 @@
         On custom size
         """
-        dlg = wx.TextEntryDialog(self, 
-                                 'Enter custom size', 
-                                 'Custom size', 
-                                 str(self.final_size))
-        if(dlg.ShowModal() == wx.ID_OK):
-            if(float(dlg.GetValue()) < 0):
+        dlg = wx.TextEntryDialog(self, 'Enter custom size', 'Custom size', str(self.final_size))
+        if dlg.ShowModal() == wx.ID_OK:
+            if float(dlg.GetValue()) < 0:
                 msg = "Unfortunately imaginary icons are not yet supported."
                 msg += "Please enter a positive value"
-                dial = wx.MessageDialog(None, msg, 'Error',
-                                         wx.OK|wx.ICON_ERROR)
+                dial = wx.MessageDialog(None, msg, 'Error', wx.OK | wx.ICON_ERROR)
                 dial.ShowModal()
                 dlg.Destroy()
@@ -145,11 +141,10 @@
         # set up gui values
         self.labeltextbox.SetValue(label)
-        if(size % 1 == 0 and size > 1 and size < 11):
+        if size % 1 == 0 and size > 1 and size < 11:
             self.sizecombobox.SetSelection(int(size) - 1)
         else:
             self.sizecombobox.SetSelection(4)
         self.symbollistbox.SetSelection(self.sorted_sym_dic[symbol])
-        colorname = appearanceDialog.find_key(self.parent.get_color_label(), 
-                                              color)
+        colorname = appearanceDialog.find_key(self.parent.get_color_label(), color)
         self.colorlistbox.SetStringSelection(colorname)
 
@@ -158,5 +153,5 @@
         Populate Symbols
         """
-        self.sorted_symbo_labels = sorted(self.symbo_labels.iteritems(), 
+        self.sorted_symbo_labels = sorted(self.symbo_labels.iteritems(),
                                           key=operator.itemgetter(1))
         self.sorted_sym_dic = {}
@@ -171,9 +166,9 @@
         Populate Colors
         """
-        sortedcolor_labels = sorted(self.color_labels.iteritems(), 
-                                   key=operator.itemgetter(1))
+        sortedcolor_labels = sorted(self.color_labels.iteritems(),
+                                    key=operator.itemgetter(1))
         for color in sortedcolor_labels:
             self.colorlistbox.Append(str(color[0]))
- 
+
     def populate_size(self):
         """
@@ -203,6 +198,6 @@
         """
         return [k for k, v in dic.iteritems() if v == val][0]
-        
-    def get_current_values(self): 
+
+    def get_current_values(self):
         """
         Get Current Values
@@ -212,7 +207,7 @@
         name = str(self.labeltextbox.GetValue())
         seltuple = self.symbollistbox.GetSelections()
-        symbol = appearanceDialog.find_key(self.sorted_sym_dic, 
+        symbol = appearanceDialog.find_key(self.sorted_sym_dic,
                                            int(seltuple[0]))
-        color = str(self.colorlistbox.GetValue()) 
+        color = str(self.colorlistbox.GetValue())
         return(size, color, symbol, name)
 
Index: src/sas/guiframe/local_perspectives/plotting/binder.py
===================================================================
--- src/sas/guiframe/local_perspectives/plotting/binder.py	(revision 794922220f2fb3b23dd08c648aabf87b4850596c)
+++ src/sas/guiframe/local_perspectives/plotting/binder.py	(revision 824e488a9a9f8e5e5eaf22c06f7c7d7a0c3af455)
@@ -2,6 +2,8 @@
 Extension to MPL to support the binding of artists to key/mouse events.
 """
-
-class Selection:
+import logging
+import sys
+
+class Selection(object):
     """
     Store and compare selections.
@@ -9,26 +11,27 @@
     # TODO: We need some way to check in prop matches, preferably
     # TODO: without imposing structure on prop.
-        
+
     artist = None
     prop = {}
     def __init__(self, artist=None, prop={}):
         self.artist, self.prop = artist, self.prop
-        
+
     def __eq__(self, other):
         return self.artist is other.artist
-    
+
     def __ne__(self, other):
         return self.artist is not other.artist
-    
+
     def __nonzero__(self):
         return self.artist is not None
 
-class BindArtist:
-
-    # Track keyboard modifiers for events.
-    # TODO: Move keyboard modifier support into the backend.  We cannot
-    # TODO: properly support it from outside the windowing system since there
-    # TODO: is no way to recognized whether shift is held down when the mouse
-    # TODO: first clicks on the the application window.
+class BindArtist(object):
+    """
+        Track keyboard modifiers for events.
+        TODO: Move keyboard modifier support into the backend.  We cannot
+        TODO: properly support it from outside the windowing system since there
+        TODO: is no way to recognized whether shift is held down when the mouse
+        TODO: first clicks on the the application window.
+    """
     control, shift, alt, meta = False, False, False, False
 
@@ -36,8 +39,8 @@
     dclick_threshhold = 0.25
     _last_button, _last_time = None, 0
-    
+
     # Mouse/keyboard events we can bind to
     events = ['enter', 'leave', 'motion', 'click', 'dclick', 'drag', 'release',
-             'scroll', 'key', 'keyup']
+              'scroll', 'key', 'keyup']
     # TODO: Need our own event structure
     def __init__(self, figure):
@@ -54,5 +57,5 @@
             ]
         except:
-            #print "bypassing scroll_event: wrong matplotlib version"
+            # print "bypassing scroll_event: wrong matplotlib version"
             self._connections = [
                 canvas.mpl_connect('motion_notify_event', self._onMotion),
@@ -66,17 +69,17 @@
             canvas.mpl_disconnect(canvas.button_pick_id)
             canvas.mpl_disconnect(canvas.scroll_pick_id)
-        except: 
-            pass
+        except:
+            logging.error(sys.exc_value)
         self.canvas = canvas
         self.figure = figure
         self.clearall()
-        
+
     def clear(self, *artists):
         """
         self.clear(h1,h2,...)
             Remove connections for artists h1, h2, ...
-            
+
         Use clearall() to reset all connections.
-        
+
         """
         for h in artists:
@@ -92,9 +95,9 @@
         if self._haskey.artist in artists:
             self._haskey = Selection()
-        
+
     def clearall(self):
         """
         Clear connections to all artists.
-        
+
         Use clear(h1,h2,...) to reset specific artists.
         """
@@ -113,8 +116,8 @@
         In case we need to disconnect from the canvas...
         """
-        try: 
+        try:
             for cid in self._connections:
                 self.canvas.mpl_disconnect(cid)
-        except: 
+        except:
             pass
         self._connections = []
@@ -125,8 +128,8 @@
     def __call__(self, trigger, artist, action):
         """Register a callback for an artist to a particular trigger event.
-        
+
         usage:
             self.connect(eventname,artist,action)
-    
+
         where:
             eventname is a string
@@ -148,5 +151,5 @@
             key: key pressed when mouse is on the artist
             keyrelease: key released for the artist
-    
+
         The event received by action has a number of attributes:
             name is the event name which was triggered
@@ -158,7 +161,7 @@
             shift,control,alt,meta are flags which are true if the
                 corresponding key is pressed at the time of the event.
-            details is a dictionary of artist specific details, such as the 
+            details is a dictionary of artist specific details, such as the
                 id(s) of the point that were clicked.
-                
+
         When receiving an event, first check the modifier state to be
         sure it applies.  E.g., the callback for 'press' might be:
@@ -175,8 +178,8 @@
         :TODO: Attach multiple callbacks to the same event?
         :TODO: Clean up interaction with toolbar modes
-        :TODO: push/pushclear/pop context so that binding changes 
+        :TODO: push/pushclear/pop context so that binding changes
             for the duration
         :TODO:   e.g., to support ? context sensitive help
-        
+
         """
         # Check that the trigger is valid
@@ -186,8 +189,8 @@
         # Register the trigger callback
         self._actions[trigger][artist] = action
-        #print "==> added",artist,[artist],"to",trigger,":",
-        #self._actions[trigger].keys()
+        # print "==> added",artist,[artist],"to",trigger,":",
+        # self._actions[trigger].keys()
         # Maintain a list of all artists
-        if artist not in self._artists: 
+        if artist not in self._artists:
             self._artists.append(artist)
 
@@ -231,12 +234,12 @@
         # print "search"," ".join([str(h) for h in self._artists])
         found = Selection()
-        #print "searching in",self._artists
+        # print "searching in",self._artists
         for artist in self._artists:
             # TODO: should contains() return false if invisible?
-            if not artist.get_visible(): 
+            if not artist.get_visible():
                 continue
             # TODO: optimization - exclude artists not inaxes
             try:
-                inside,prop = artist.contains(event)
+                inside, prop = artist.contains(event)
             except:
                 # Probably an old version of matplotlib
@@ -245,6 +248,6 @@
                 found.artist, found.prop = artist, prop
                 break
-        #print "found",found.artist
-        
+        # print "found",found.artist
+
         # TODO: how to check if prop is equal?
         if found != self._current:
@@ -253,5 +256,5 @@
         self._current = found
         return found
-        
+
     def _onMotion(self, event):
         """
@@ -259,15 +262,15 @@
         other artists are invisible.
         """
-        ## Can't kill double-click on motion since Windows produces
-        ## spurious motion events.
-        #self._last_button = None
-        
+        # # Can't kill double-click on motion since Windows produces
+        # # spurious motion events.
+        # self._last_button = None
+
         # Dibs on the motion event for the clicked artist
         if self._hasclick:
             # Make sure the x,y data use the coordinate system of the
             # artist rather than the default axes coordinates.
-            
+
             transform = self._hasclick.artist.get_transform()
-            #x,y = event.xdata,event.ydata
+            # x,y = event.xdata,event.ydata
             x, y = event.x, event.y
             try:
@@ -280,5 +283,5 @@
         else:
             found = self._find_current(event)
-            #print "found",found.artist
+            # print "found",found.artist
             self.trigger(found, 'motion', event)
 
@@ -288,10 +291,10 @@
         """
         import time
-        
+
         # Check for double-click
         event_time = time.time()
-        #print event_time,self._last_time,self.dclick_threshhold
-        #print (event_time > self._last_time + self.dclick_threshhold)
-        #print event.button,self._last_button
+        # print event_time,self._last_time,self.dclick_threshhold
+        # print (event_time > self._last_time + self.dclick_threshhold)
+        # print event.button,self._last_button
         if (event.button != self._last_button) or \
                 (event_time > self._last_time + self.dclick_threshhold):
@@ -301,5 +304,5 @@
         self._last_button = event.button
         self._last_time = event_time
-        
+
         # If an artist is already dragging, feed any additional button
         # presses to that artist.
@@ -311,5 +314,5 @@
         else:
             found = self._find_current(event)
-        #print "button %d pressed"%event.button
+        # print "button %d pressed"%event.button
         # Note: it seems like if "click" returns False then hasclick should
         # not be set.  The problem is that there are two reasons it can
@@ -346,5 +349,5 @@
         self.trigger(self._hasclick, 'release', event)
         self._hasclick = Selection()
-            
+
     def _onKey(self, event):
         """
@@ -355,5 +358,5 @@
         # TODO: Can we tab between items?
         # TODO: How do unhandled events get propogated to axes, figure and
-        # TODO: finally to application?  Do we need to implement a full tags 
+        # TODO: finally to application?  Do we need to implement a full tags
         # TODO: architecture a la Tk?
         # TODO: Do modifiers cause a grab?  Does the artist see the modifiers?
@@ -368,5 +371,5 @@
         self.trigger(found, 'key', event)
         self._haskey = found
-    
+
     def _onKeyRelease(self, event):
         """
Index: src/sas/perspectives/calculator/gen_scatter_panel.py
===================================================================
--- src/sas/perspectives/calculator/gen_scatter_panel.py	(revision 49ab5d718dd7743a6a296e666dfb643183bc969d)
+++ src/sas/perspectives/calculator/gen_scatter_panel.py	(revision 824e488a9a9f8e5e5eaf22c06f7c7d7a0c3af455)
@@ -2036,30 +2036,4 @@
         self.Destroy()
 
-#    def on_help(self, event):    
-#        """
-#       Gen scatter angle help panel
-#        """
-#        from sas.perspectives.calculator.help_panel import  HelpWindow
-#        # Get models help model_function path
-#        import sas.perspectives.calculator as calmedia
-#
-#        media = calmedia.get_data_path(media='media')
-#        path = os.path.join(media,"gen_sas_help.html") 
-#        name = "Generic Scattering Calculator"
-#        frame = HelpWindow(self, -1, 
-#                           title=' Help: GenSAS',  
-#                           pageToOpen=path, size=(865, 450))   
-#        try: 
-#            frame.splitter.DetachWindow(frame.lpanel)
-#            # Display only the right side one
-#            frame.lpanel.Hide() 
-#            frame.Show(True)
-#            add_icon(self.parent, frame)
-#        except:
-#            frame.Destroy() 
-#            msg = 'Display Error\n'
-#            info = "Info"
-#            wx.MessageBox(msg, info)
-
 if __name__ == "__main__":
     app = wx.PySimpleApp()
Index: src/sas/perspectives/fitting/fitting.py
===================================================================
--- src/sas/perspectives/fitting/fitting.py	(revision 2f4b43041eaa7b7f496750f223a299cb33cd268e)
+++ src/sas/perspectives/fitting/fitting.py	(revision 824e488a9a9f8e5e5eaf22c06f7c7d7a0c3af455)
@@ -424,19 +424,4 @@
         else:
             self.batch_page = self.fit_panel.add_sim_page(caption=caption)
-
-    def help(self, evt):
-        """
-        Show a general help dialog.
-        """
-        from help_panel import  HelpWindow
-        frame = HelpWindow(None, -1, 'HelpWindow')
-        if hasattr(frame, "IsIconized"):
-            if not frame.IsIconized():
-                try:
-                    icon = self.parent.GetIcon()
-                    frame.SetIcon(icon)
-                except:
-                    pass
-        frame.Show(True)
 
     def get_context_menu(self, plotpanel=None):
Index: c/sas/perspectives/invariant/help_panel.py
===================================================================
--- src/sas/perspectives/invariant/help_panel.py	(revision 78a205ad60ae50caaa91008f0d11b7bb5353d84d)
+++ 	(revision )
@@ -1,143 +1,0 @@
-"""
-    Help panel for Invariant perspective
-"""
-import wx
-import wx.html as html
-from wx.lib.splitter import MultiSplitterWindow
-import os
-
-
-class HelpDialog(wx.Dialog):
-    """
-        Dialog box showing invariant panel help
-    """
-    def __init__(self, parent, id):
-        """
-        """
-        wx.Dialog.__init__(self, parent, id, size=(400, 420))
-        self.SetTitle("Invariant help")
-
-        vbox = wx.BoxSizer(wx.VERTICAL)
-
-        explanation = help()
-
-        label_explain = wx.StaticText(self, -1, explanation, size=(350, 320))
-
-        vbox.Add(label_explain, 0, wx.ALL | wx.EXPAND, 15)
-
-
-        static_line = wx.StaticLine(self, -1)
-        vbox.Add(static_line, 0, wx.EXPAND, 0)
-
-        button_OK = wx.Button(self, wx.ID_OK, "OK")
-
-        sizer_button = wx.BoxSizer(wx.HORIZONTAL)
-        sizer_button.Add((20, 20), 1, wx.EXPAND | wx.ADJUST_MINSIZE, 0)
-        sizer_button.Add(button_OK, 0, wx.LEFT | wx.RIGHT | wx.ADJUST_MINSIZE, 10)
-        vbox.Add(sizer_button, 0, wx.EXPAND | wx.BOTTOM | wx.TOP, 10)
-
-        self.SetSizer(vbox)
-        self.SetAutoLayout(True)
-
-        self.Layout()
-        self.Centre()
-
-class HelpWindow(wx.Frame):
-    """
-        Help window for invariant perspective
-    """
-    def __init__(self, parent, id, title='HelpWindow', pageToOpen=None):
-        wx.Frame.__init__(self, parent, id, title, size=(820, 450))
-        """
-        contains help info
-        """
-        self.SetTitle("Invariant Help")
-        splitter = MultiSplitterWindow(self, style=wx.SP_LIVE_UPDATE)
-        rpanel = wx.Panel(splitter, -1)
-        lpanel = wx.Panel(splitter, -1, style=wx.BORDER_SUNKEN)
-
-        vbox = wx.BoxSizer(wx.VERTICAL)
-        header = wx.Panel(rpanel, -1)
-        header.SetBackgroundColour('#6666FF')
-        header.SetForegroundColour('WHITE')
-        hbox = wx.BoxSizer(wx.HORIZONTAL)
-        st = wx.StaticText(header, -1, 'Contents', (5, 5))
-        font = st.GetFont()
-        font.SetPointSize(10)
-        st.SetFont(font)
-        hbox.Add(st, 1, wx.TOP | wx.BOTTOM | wx.LEFT, 5)
-        header.SetSizer(hbox)
-        vbox.Add(header, 0, wx.EXPAND)
-
-        vboxl = wx.BoxSizer(wx.VERTICAL)
-        headerl = wx.Panel(lpanel, -1, size=(-1, 20))
-
-        headerl.SetBackgroundColour('#6666FF')
-        headerl.SetForegroundColour('WHITE')
-        hboxl = wx.BoxSizer(wx.HORIZONTAL)
-        lst = wx.StaticText(headerl, -1, 'Menu', (5, 5))
-        fontl = lst.GetFont()
-        fontl.SetPointSize(10)
-        lst.SetFont(fontl)
-        hboxl.Add(lst, 1, wx.TOP | wx.BOTTOM | wx.LEFT, 5)
-        headerl.SetSizer(hboxl)
-        vboxl.Add(headerl, 0, wx.EXPAND)
-        self.lhelp = html.HtmlWindow(lpanel, -1, style=wx.NO_BORDER)
-        self.rhelp = html.HtmlWindow(rpanel, -1, style=wx.NO_BORDER,
-                                     size=(500, -1))
-        import sas.perspectives.invariant as invariant
-        path = invariant.get_data_path(media='media')
-        self.path = os.path.join(path, "invariant_help.html")
-
-        self.rhelp.LoadPage(self.path)
-        page = """<html>
-            <body>
-            <ul>
-            <li><a href ="%s" target ="showframe">Invariant</a><br></li>
-            </ul>
-            </body>
-            </html>""" % self.path
-
-        self.lhelp.SetPage(page)
-        self.lhelp.Bind(wx.html.EVT_HTML_LINK_CLICKED, self.OnLinkClicked)
-
-        vbox.Add(self.rhelp, 1, wx.EXPAND)
-        vboxl.Add(self.lhelp, 1, wx.EXPAND)
-        rpanel.SetSizer(vbox)
-        lpanel.SetSizer(vboxl)
-        lpanel.SetFocus()
-
-        vbox1 = wx.BoxSizer(wx.HORIZONTAL)
-        vbox1.Add(splitter, 1, wx.EXPAND)
-        splitter.AppendWindow(lpanel, 200)
-        splitter.AppendWindow(rpanel)
-        self.SetSizer(vbox1)
-
-        self.Centre()
-        self.Show(True)
-
-
-    def OnLinkClicked(self, event):
-        """
-        Function to diplay html page related to the hyperlinktext selected
-        """
-        self.rhelp.LoadPage(self.path)
-
-class ViewApp(wx.App):
-    """
-        Test application
-    """
-    def OnInit(self):
-        """
-            Initialization for test application
-        """
-        frame = HelpWindow(None, -1, 'HelpWindow')
-        frame.Show(True)
-        self.SetTopWindow(frame)
-
-        return True
-
-
-if __name__ == "__main__":
-    app = ViewApp(0)
-    app.MainLoop()
Index: src/sas/perspectives/invariant/invariant.py
===================================================================
--- src/sas/perspectives/invariant/invariant.py	(revision 78a205ad60ae50caaa91008f0d11b7bb5353d84d)
+++ src/sas/perspectives/invariant/invariant.py	(revision 824e488a9a9f8e5e5eaf22c06f7c7d7a0c3af455)
@@ -47,19 +47,4 @@
         # Log startup
         logging.info("Invariant plug-in started")
-
-    def help(self, evt):
-        """
-        Show a general help dialog.
-        """
-        from help_panel import  HelpWindow
-        frame = HelpWindow(None, -1)
-        if hasattr(frame, "IsIconized"):
-            if not frame.IsIconized():
-                try:
-                    icon = self.parent.GetIcon()
-                    frame.SetIcon(icon)
-                except:
-                    logging.error(sys.exc_value)
-        frame.Show(True)
 
     def get_data(self):
