Index: src/sas/guiframe/local_perspectives/plotting/Edge.py
===================================================================
--- src/sas/guiframe/local_perspectives/plotting/Edge.py	(revision 794922220f2fb3b23dd08c648aabf87b4850596c)
+++ src/sas/guiframe/local_perspectives/plotting/Edge.py	(revision b5de88e13816ca80c8329096bc22edbab9a36123)
@@ -1,12 +1,5 @@
+import math
+from BaseInteractor import _BaseInteractor
 
-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 RadiusInteractor(_BaseInteractor):
@@ -15,5 +8,5 @@
     """
     def __init__(self, base, axes, color='black', zorder=5, arc1=None,
-                 arc2=None, theta=math.pi/8):
+                 arc2=None, theta=math.pi / 8):
         """
         """
@@ -23,8 +16,6 @@
         self.r1 = arc1.get_radius()
         self.r2 = arc2.get_radius()
-        #print "radius init", self.r1, self.r2
         self.theta = theta
         self.save_theta = theta
-        #self.scale = 10.0
         self.move_stop = False
         self.theta_left = None
@@ -32,5 +23,4 @@
         self.arc1 = arc1
         self.arc2 = arc2
-        #raise "Version error", message
         x1 = self.r1 * math.cos(self.theta)
         y1 = self.r1 * math.sin(self.theta)
@@ -38,7 +28,7 @@
         y2 = self.r2 * math.sin(self.theta)
         self.line = self.axes.plot([x1, x2], [y1, y2],
-                                      linestyle='-', marker='',
-                                      color=self.color,
-                                      visible=True)[0]
+                                   linestyle='-', marker='',
+                                   color=self.color,
+                                   visible=True)[0]
         self.phi = theta
         self.npts = 20
@@ -46,5 +36,5 @@
         self.connect_markers([self.line])
         self.update()
-        
+
     def set_layer(self, n):
         """
@@ -52,5 +42,5 @@
         self.layernum = n
         self.update()
-        
+
     def clear(self):
         """
@@ -63,10 +53,10 @@
             for item in range(len(self.axes.lines)):
                 del self.axes.lines[0]
-    
+
     def get_angle(self):
         """
         """
         return self.theta
-        
+
     def update(self, r1=None, r2=None, theta=None):
         """
@@ -79,11 +69,10 @@
         if theta != None:
             self.theta = theta
-        #print "in the edge r1, r2",self.r1,self.r2,math.degrees(self.theta)
         x1 = self.r1 * math.cos(self.theta)
         y1 = self.r1 * math.sin(self.theta)
         x2 = self.r2 * math.cos(self.theta)
-        y2 = self.r2 * math.sin(self.theta)  
+        y2 = self.r2 * math.sin(self.theta)
         self.line.set(xdata=[x1, x2], ydata=[y1, y2])
-        
+
     def save(self, ev):
         """
@@ -91,8 +80,7 @@
         can restore on Esc.
         """
-        self.save_theta = math.atan2(ev.y,ev.x)
-        #self.save_theta= self.theta
+        self.save_theta = math.atan2(ev.y, ev.x)
         self.base.freeze_axes()
-   
+
     def moveend(self, ev):
         """
@@ -100,5 +88,5 @@
         self.has_move = False
         self.base.moveend(ev)
-            
+
     def restore(self, ev):
         """
@@ -114,5 +102,5 @@
         self.has_move = True
         self.base.base.update()
-        
+
     def set_cursor(self, r_min, r_max, theta):
         """
@@ -122,5 +110,5 @@
         self.r2 = r_max
         self.update()
-        
+
     def get_params(self):
         """
@@ -131,13 +119,10 @@
         params["theta"] = self.theta
         return params
-    
+
     def set_params(self, params):
         """
         """
-        #print "when here set curcor arc"
-        x1 = params["radius1"] 
-        x2 = params["radius2"] 
-        theta= params["theta"]
+        x1 = params["radius1"]
+        x2 = params["radius2"]
+        theta = params["theta"]
         self.set_cursor(x1, x2, theta)
-        
-    
Index: src/sas/guiframe/local_perspectives/plotting/boxMask.py
===================================================================
--- src/sas/guiframe/local_perspectives/plotting/boxMask.py	(revision 794922220f2fb3b23dd08c648aabf87b4850596c)
+++ src/sas/guiframe/local_perspectives/plotting/boxMask.py	(revision b5de88e13816ca80c8329096bc22edbab9a36123)
@@ -1,13 +1,7 @@
-
-
-
 import math
-#import wx
-#from copy import deepcopy
 from BaseInteractor import _BaseInteractor
 from boxSum import PointInteractor
 from boxSum import VerticalDoubleLine
 from boxSum import HorizontalDoubleLine
-#from sas.guiframe.events import SlicerParamUpdateEvent
 
 
@@ -15,8 +9,8 @@
     """
     BoxMask Class: determine 2 rectangular area to find the pixel of
-    a Data inside of box. 
-    
+    a Data inside of box.
+
     Uses PointerInteractor , VerticalDoubleLine,HorizontalDoubleLine.
-    
+
     :param zorder:  Artists with lower zorder values are drawn first.
     :param x_min: the minimum value of the x coordinate
@@ -26,73 +20,73 @@
 
     """
-    def __init__(self, base, axes, color='black', zorder=3, side=None, 
-                   x_min=0.008, x_max=0.008, y_min=0.0025, y_max=0.0025):
+    def __init__(self, base, axes, color='black', zorder=3, side=None,
+                 x_min=0.008, x_max=0.008, y_min=0.0025, y_max=0.0025):
         """
         """
         _BaseInteractor.__init__(self, base, axes, color=color)
-        ## class initialization
-        ## list of Boxmask markers
+        # # class initialization
+        # # list of Boxmask markers
         self.markers = []
         self.axes = axes
         self.mask = None
         self.is_inside = side
-        ## connect the artist for the motion
+        # # connect the artist for the motion
         self.connect = self.base.connect
-        ## when qmax is reached the selected line is reset 
-        #the its previous value
+        # # when qmax is reached the selected line is reset
+        # the its previous value
         self.qmax = min(self.base.data.xmax, self.base.data.xmin)
-        ## Define the box limits
+        # # Define the box limits
         self.xmin = -1 * 0.5 * min(math.fabs(self.base.data.xmax),
-                                 math.fabs(self.base.data.xmin))
+                                   math.fabs(self.base.data.xmin))
         self.ymin = -1 * 0.5 * min(math.fabs(self.base.data.xmax),
                                    math.fabs(self.base.data.xmin))
         self.xmax = 0.5 * min(math.fabs(self.base.data.xmax),
                               math.fabs(self.base.data.xmin))
-        self.ymax =  0.5 * min(math.fabs(self.base.data.xmax),
-                               math.fabs(self.base.data.xmin))
-        ## center of the box
+        self.ymax = 0.5 * min(math.fabs(self.base.data.xmax),
+                              math.fabs(self.base.data.xmin))
+        # # center of the box
         self.center_x = 0.0002
         self.center_y = 0.0003
-        ## Number of points on the plot
+        # # Number of points on the plot
         self.nbins = 20
-        ## Define initial result the summation 
+        # # Define initial result the summation
         self.count = 0
         self.error = 0
         self.data = self.base.data
-        ## Flag to determine if the current figure has moved
-        ## set to False == no motion , set to True== motion
+        # # Flag to determine if the current figure has moved
+        # # set to False == no motion , set to True== motion
         self.has_move = False
-        ## Create Box edges 
+        # # Create Box edges
         self.horizontal_lines = HorizontalDoubleLine(self,
                                                      self.base.subplot,
                                                      color='blue',
-                                                      zorder=zorder,
-                                                      y=self.ymax,
-                                                      x=self.xmax,
-                                                      center_x=self.center_x,
-                                                      center_y=self.center_y)
+                                                     zorder=zorder,
+                                                     y=self.ymax,
+                                                     x=self.xmax,
+                                                     center_x=self.center_x,
+                                                     center_y=self.center_y)
         self.horizontal_lines.qmax = self.qmax
-        
+
         self.vertical_lines = VerticalDoubleLine(self,
-                                                self.base.subplot,
-                                                color='grey',
-                                                zorder=zorder,
-                                                y=self.ymax,
-                                                x=self.xmax,
-                                                center_x=self.center_x,
-                                                center_y=self.center_y)
+                                                 self.base.subplot,
+                                                 color='grey',
+                                                 zorder=zorder,
+                                                 y=self.ymax,
+                                                 x=self.xmax,
+                                                 center_x=self.center_x,
+                                                 center_y=self.center_y)
         self.vertical_lines.qmax = self.qmax
-        
+
         self.center = PointInteractor(self,
-                                      self.base.subplot,color='grey',
-                                    zorder=zorder,
-                                    center_x=self.center_x,
-                                    center_y=self.center_y)
-        ## Save the name of the slicer panel associate with this slicer 
-        self.panel_name = ""    
-        ## Update and post slicer parameters  
+                                      self.base.subplot, color='grey',
+                                      zorder=zorder,
+                                      center_x=self.center_x,
+                                      center_y=self.center_y)
+        # # Save the name of the slicer panel associate with this slicer
+        self.panel_name = ""
+        # # Update and post slicer parameters
         self.update()
         self._post_data()
-    
+
     def clear(self):
         """
@@ -104,6 +98,5 @@
         self.center.clear()
         self.base.connect.clearall()
-        #self.base.Unbind(EVT_SLICER_PARS)
-    
+
     def update(self):
         """
@@ -111,11 +104,11 @@
         resetting the widgets.
         """
-        # check if the center point has moved and update the figure accordingly 
+        # check if the center point has moved and update the figure accordingly
         if self.center.has_move:
             self.center.update()
             self.horizontal_lines.update(center=self.center)
             self.vertical_lines.update(center=self.center)
-        ## check if the horizontal lines have moved and update
-        # the figure accordingly    
+        # # check if the horizontal lines have moved and update
+        # the figure accordingly
         if self.horizontal_lines.has_move:
             self.horizontal_lines.update()
@@ -123,6 +116,6 @@
                                        y2=self.horizontal_lines.y2,
                                        height=self.horizontal_lines.half_height)
-        ## check if the vertical lines have moved and update
-        # the figure accordingly    
+        # # check if the vertical lines have moved and update
+        # the figure accordingly
         if self.vertical_lines.has_move:
             self.vertical_lines.update()
@@ -130,8 +123,8 @@
                                          x2=self.vertical_lines.x2,
                                          width=self.vertical_lines.half_width)
-        #if self.is_inside != None:
+        # if self.is_inside != None:
         out = self._post_data()
         return out
-        
+
     def save(self, ev):
         """
@@ -143,5 +136,5 @@
         self.vertical_lines.save(ev)
         self.center.save(ev)
-        
+
     def _post_data(self):
         """
@@ -150,10 +143,10 @@
         """
         from sas.dataloader.manipulations import Boxcut
-        ## Data 2D for which the pixel will be summed
+        # # Data 2D for which the pixel will be summed
         data = self.base.data
         mask = data.mask
-        ## the region of the summation
-        x_min = self.horizontal_lines.x2 
-        x_max = self.horizontal_lines.x1 
+        # # the region of the summation
+        x_min = self.horizontal_lines.x2
+        x_max = self.horizontal_lines.x1
         y_min = self.vertical_lines.y2
         y_max = self.vertical_lines.y1
@@ -164,17 +157,17 @@
         else:
             out = (mask(data))
-        #self.base.data.mask=out
+        # self.base.data.mask=out
         self.mask = mask
-        return out  
-              
+        return out
+
     def moveend(self, ev):
         """
         After a dragging motion this function is called to compute
-        the error and the sum of pixel of a given data 2D 
+        the error and the sum of pixel of a given data 2D
         """
         self.base.thaw_axes()
-        ## post
+        # # post
         self._post_data()
-            
+
     def restore(self):
         """
@@ -184,5 +177,5 @@
         self.vertical_lines.restore()
         self.center.restore()
-        
+
     def move(self, x, y, ev):
         """
@@ -190,22 +183,22 @@
         """
         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["Width"] = math.fabs(self.vertical_lines.half_width) * 2
-        params["Height"] = math.fabs(self.horizontal_lines.half_height) * 2 
+        params["Height"] = math.fabs(self.horizontal_lines.half_height) * 2
         params["center_x"] = self.center.x
         params["center_y"] = self.center.y
         return params
-    
+
     def get_mask(self):
         """
@@ -214,32 +207,28 @@
         mask = self.mask
         return mask
-    
+
     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_max = math.fabs(params["Width"] )/2
-        y_max = math.fabs(params["Height"])/2
-        
-        self.center_x = params["center_x"] 
+        x_max = math.fabs(params["Width"]) / 2
+        y_max = math.fabs(params["Height"]) / 2
+
+        self.center_x = params["center_x"]
         self.center_y = params["center_y"]
-        #update the slicer given values of params
+        # update the slicer given values of params
         self.center.update(center_x=self.center_x, center_y=self.center_y)
-        self.horizontal_lines.update(center=self.center,
-                                     width=x_max,
-                                     height=y_max)
-        self.vertical_lines.update(center=self.center,
-                                    width=x_max,
-                                    height=y_max)
-        #compute the new error and sum given values of params
+        self.horizontal_lines.update(center=self.center, width=x_max, height=y_max)
+        self.vertical_lines.update(center=self.center, width=x_max, height=y_max)
+        # compute the new error and sum given values of params
         self._post_data()
-               
+
     def freeze_axes(self):
         self.base.freeze_axes()
-        
+
     def thaw_axes(self):
         self.base.thaw_axes()
@@ -248,7 +237,5 @@
         self.base.update()
 
-class inner_BoxMask(BoxMask):   
-    def __call__(self):     
-        self.base.data.mask = (self._post_data()==False)
-      
-   
+class inner_BoxMask(BoxMask):
+    def __call__(self):
+        self.base.data.mask = (self._post_data() == False)
Index: src/sas/guiframe/local_perspectives/plotting/boxSlicer.py
===================================================================
--- src/sas/guiframe/local_perspectives/plotting/boxSlicer.py	(revision 794922220f2fb3b23dd08c648aabf87b4850596c)
+++ src/sas/guiframe/local_perspectives/plotting/boxSlicer.py	(revision b5de88e13816ca80c8329096bc22edbab9a36123)
@@ -1,7 +1,3 @@
-
-
 import wx
-#import copy
-#from copy import deepcopy
 import math
 import numpy
@@ -12,5 +8,4 @@
 from BaseInteractor import _BaseInteractor
 from sas.guiframe.dataFitting import Data1D
-#import SlicerParameters
 
 
@@ -22,47 +17,47 @@
     def __init__(self, base, axes, color='black', zorder=3):
         _BaseInteractor.__init__(self, base, axes, color=color)
-        ## Class initialization
+        # # Class initialization
         self.markers = []
         self.axes = axes
-        ##connecting artist
+        # #connecting artist
         self.connect = self.base.connect
-        ## which direction is the preferred interaction direction
+        # # which direction is the preferred interaction direction
         self.direction = None
-        ## determine x y  values
+        # # determine x y  values
         self.x = 0.5 * min(math.fabs(self.base.data2D.xmax),
                            math.fabs(self.base.data2D.xmin))
         self.y = 0.5 * min(math.fabs(self.base.data2D.xmax),
-                           math.fabs(self.base.data2D.xmin))        
-        ## when reach qmax reset the graph
+                           math.fabs(self.base.data2D.xmin))
+        # # when reach qmax reset the graph
         self.qmax = max(self.base.data2D.xmax, self.base.data2D.xmin,
-                        self.base.data2D.ymax, self.base.data2D.ymin)   
-        ## Number of points on the plot
+                        self.base.data2D.ymax, self.base.data2D.ymin)
+        # # Number of points on the plot
         self.nbins = 30
-        ## If True, I(|Q|) will be return, otherwise,
-        #negative q-values are allowed
-        self.fold = True        
-        ## reference of the current  Slab averaging
+        # # If True, I(|Q|) will be return, otherwise,
+        # negative q-values are allowed
+        self.fold = True
+        # # reference of the current  Slab averaging
         self.averager = None
-        ## Create vertical and horizaontal lines for the rectangle
+        # # Create vertical and horizaontal lines for the rectangle
         self.vertical_lines = VerticalLines(self,
-                                            self.base.subplot, 
-                                            color='blue', 
+                                            self.base.subplot,
+                                            color='blue',
                                             zorder=zorder,
-                                            y=self.y ,
+                                            y=self.y,
                                             x=self.x)
         self.vertical_lines.qmax = self.qmax
-       
+
         self.horizontal_lines = HorizontalLines(self,
-                                               self.base.subplot,
-                                               color='green', 
-                                               zorder=zorder,
-                                               x=self.x,
-                                               y=self.y)
+                                                self.base.subplot,
+                                                color='green',
+                                                zorder=zorder,
+                                                x=self.x,
+                                                y=self.y)
         self.horizontal_lines.qmax = self.qmax
-        ## draw the rectangle and plost the data 1D resulting
-        ## of averaging data2D
+        # # draw the rectangle and plost the data 1D resulting
+        # # of averaging data2D
         self.update()
         self._post_data()
-        ## Bind to slice parameter events
+        # # Bind to slice parameter events
         self.base.Bind(EVT_SLICER_PARS, self._onEVT_SLICER_PARS)
 
@@ -70,6 +65,6 @@
         """
         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
         """
@@ -80,5 +75,5 @@
             self.set_params(event.params)
             self.base.update()
-            
+
     def update_and_post(self):
         """
@@ -87,15 +82,15 @@
         self.update()
         self._post_data()
-        
+
     def set_layer(self, n):
         """
         Allow adding plot to the same panel
-        
+
         :param n: the number of layer
-        
+
         """
         self.layernum = n
         self.update()
-        
+
     def clear(self):
         """
@@ -108,5 +103,5 @@
         self.base.connect.clearall()
         self.base.Unbind(EVT_SLICER_PARS)
-        
+
     def update(self):
         """
@@ -114,13 +109,13 @@
         resetting the widgets.
         """
-        ##Update the slicer if an horizontal line is dragged   
+        # #Update the slicer if an horizontal line is dragged
         if self.horizontal_lines.has_move:
             self.horizontal_lines.update()
             self.vertical_lines.update(y=self.horizontal_lines.y)
-        ##Update the slicer if a vertical line is dragged    
+        # #Update the slicer if a vertical line is dragged
         if self.vertical_lines.has_move:
             self.vertical_lines.update()
             self.horizontal_lines.update(x=self.vertical_lines.x)
-                 
+
     def save(self, ev):
         """
@@ -131,25 +126,25 @@
         self.vertical_lines.save(ev)
         self.horizontal_lines.save(ev)
-    
+
     def _post_data(self):
         pass
-        
+
     def post_data(self, new_slab=None, nbins=None, direction=None):
         """
         post data averaging in Qx or Qy given new_slab type
-        
+
         :param new_slab: slicer that determine with direction to average
         :param nbins: the number of points plotted when averaging
         :param direction: the direction of averaging
-        
+
         """
         if self.direction == None:
             self.direction = direction
-            
+
         x_min = -1 * math.fabs(self.vertical_lines.x)
         x_max = math.fabs(self.vertical_lines.x)
         y_min = -1 * math.fabs(self.horizontal_lines.y)
         y_max = math.fabs(self.horizontal_lines.y)
-        
+
         if nbins != None:
             self.nbins = nbins
@@ -164,5 +159,5 @@
             else:
                 x_low = math.fabs(x_min)
-            bin_width = (x_max + x_low)/self.nbins
+            bin_width = (x_max + x_low) / self.nbins
         elif self.direction == "Y":
             if self.fold:
@@ -170,14 +165,14 @@
             else:
                 y_low = math.fabs(y_min)
-            bin_width = (y_max + y_low)/self.nbins
+            bin_width = (y_max + y_low) / self.nbins
         else:
             msg = "post data:no Box Average direction was supplied"
             raise ValueError, msg
-        ## Average data2D given Qx or Qy
+        # # Average data2D given Qx or Qy
         box = self.averager(x_min=x_min, x_max=x_max, y_min=y_min, y_max=y_max,
-                         bin_width=bin_width)
+                            bin_width=bin_width)
         box.fold = self.fold
         boxavg = box(self.base.data2D)
-        #3 Create Data1D to plot
+        # 3 Create Data1D to plot
         if hasattr(boxavg, "dxl"):
             dxl = boxavg.dxl
@@ -189,6 +184,6 @@
             dxw = None
         new_plot = Data1D(x=boxavg.x, y=boxavg.y, dy=boxavg.dy)
-        new_plot.dxl  = dxl
-        new_plot.dxw  = dxw
+        new_plot.dxl = dxl
+        new_plot.dxw = dxw
         new_plot.name = str(self.averager.__name__) + \
                         "(" + self.base.data2D.name + ")"
@@ -196,5 +191,5 @@
         new_plot.interactive = True
         new_plot.detector = self.base.data2D.detector
-        ## If the data file does not tell us what the axes are, just assume...
+        # # If the data file does not tell us what the axes are, just assume...
         new_plot.xaxis("\\rm{Q}", "A^{-1}")
         new_plot.yaxis("\\rm{Intensity} ", "cm^{-1}")
@@ -205,17 +200,17 @@
             new_plot.ytransform = 'y'
             new_plot.yaxis("\\rm{Residuals} ", "/")
-            
+
         new_plot.group_id = "2daverage" + self.base.data2D.name
         new_plot.id = (self.averager.__name__) + self.base.data2D.name
-        new_plot.is_data= True
+        new_plot.is_data = True
         self.base.parent.update_theory(data_id=self.base.data2D.id, \
                                        theory=new_plot)
-        wx.PostEvent(self.base.parent, NewPlotEvent(plot=new_plot,
-                                title=str(self.averager.__name__)))
-          
+        wx.PostEvent(self.base.parent,
+                     NewPlotEvent(plot=new_plot, title=str(self.averager.__name__)))
+
     def moveend(self, ev):
         """
         Called after a dragging event.
-        Post the slicer new parameters and creates a new Data1D 
+        Post the slicer new parameters and creates a new Data1D
         corresponding to the new average
         """
@@ -228,5 +223,5 @@
         # create the new data1D
         self._post_data()
-            
+
     def restore(self):
         """
@@ -235,5 +230,5 @@
         self.horizontal_lines.restore()
         self.vertical_lines.restore()
-       
+
     def move(self, x, y, ev):
         """
@@ -241,14 +236,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 = {}
@@ -257,26 +252,26 @@
         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.
         """
         self.x = float(math.fabs(params["x_max"]))
-        self.y = float(math.fabs(params["y_max"] ))
+        self.y = float(math.fabs(params["y_max"]))
         self.nbins = params["nbins"]
-        
+
         self.horizontal_lines.update(x=self.x, y=self.y)
         self.vertical_lines.update(x=self.x, y=self.y)
         self.post_data(nbins=None)
-        
+
     def freeze_axes(self):
         """
         """
         self.base.freeze_axes()
-        
+
     def thaw_axes(self):
         """
@@ -292,5 +287,5 @@
 class HorizontalLines(_BaseInteractor):
     """
-    Draw 2 Horizontal lines centered on (0,0) that can move 
+    Draw 2 Horizontal lines centered on (0,0) that can move
     on the x- direction and in opposite direction
     """
@@ -299,44 +294,31 @@
         """
         _BaseInteractor.__init__(self, base, axes, color=color)
-        ##Class initialization
+        # #Class initialization
         self.markers = []
         self.axes = axes
-        ## Saving the end points of two lines
+        # # Saving the end points of two lines
         self.x = x
         self.save_x = x
-        
+
         self.y = y
         self.save_y = y
-        ## Creating a marker
-        try:
-            # Inner circle marker
-            self.inner_marker = self.axes.plot([0], [self.y], linestyle='',
-                                          marker='s', markersize=10,
-                                          color=self.color, alpha=0.6,
-                                          pickradius=5, label="pick", 
-                                          # Prefer this to other lines
-                                          zorder=zorder, 
-                                          visible=True)[0]
-        except:
-            self.inner_marker = self.axes.plot([0], [self.y], linestyle='',
-                                          marker='s', markersize=10,
-                                          color=self.color, alpha=0.6,
-                                          label="pick", visible=True)[0]
-            message  = "\nTHIS PROTOTYPE NEEDS THE LATEST VERSION "
-            message += "OF MATPLOTLIB\n Get the SVN version that"
-            message += " is at least as recent as June 1, 2007"
-            owner = self.base.base.parent
-            wx.PostEvent(owner,
-                         StatusEvent(status="AnnulusSlicer: %s" % message))
-        ## Define 2 horizontal lines
+        # # Creating a marker
+        # Inner circle marker
+        self.inner_marker = self.axes.plot([0], [self.y], linestyle='',
+                                           marker='s', markersize=10,
+                                           color=self.color, alpha=0.6,
+                                           pickradius=5, label="pick",
+                                           zorder=zorder,
+                                           visible=True)[0]
+        # # Define 2 horizontal lines
         self.top_line = self.axes.plot([self.x, -self.x], [self.y, self.y],
-                                      linestyle='-', marker='',
-                                      color=self.color, visible=True)[0]
+                                       linestyle='-', marker='',
+                                       color=self.color, visible=True)[0]
         self.bottom_line = self.axes.plot([self.x, -self.x], [-self.y, -self.y],
-                                      linestyle='-', marker='',
-                                      color=self.color, visible=True)[0]
-        ## Flag to check the motion of the lines
+                                          linestyle='-', marker='',
+                                          color=self.color, visible=True)[0]
+        # # Flag to check the motion of the lines
         self.has_move = False
-        ## Connecting markers to mouse events and draw
+        # # Connecting markers to mouse events and draw
         self.connect_markers([self.top_line, self.inner_marker])
         self.update()
@@ -345,11 +327,11 @@
         """
         Allow adding plot to the same panel
-        
+
         :param n: the number of layer
-        
+
         """
         self.layernum = n
         self.update()
-        
+
     def clear(self):
         """
@@ -359,5 +341,5 @@
         try:
             self.inner_marker.remove()
-            self.top_line.remove() 
+            self.top_line.remove()
             self.bottom_line.remove()
         except:
@@ -365,23 +347,23 @@
             for item in range(len(self.axes.lines)):
                 del self.axes.lines[0]
-   
+
     def update(self, x=None, y=None):
         """
         Draw the new roughness on the graph.
-        
+
         :param x: x-coordinates to reset current class x
         :param y: y-coordinates to reset current class y
-        
-        """
-        ## Reset x, y- coordinates if send as parameters
+
+        """
+        # # Reset x, y- coordinates if send as parameters
         if x != None:
             self.x = numpy.sign(self.x) * math.fabs(x)
         if y != None:
             self.y = numpy.sign(self.y) * math.fabs(y)
-        ## Draw lines and markers
+        # # Draw lines and markers
         self.inner_marker.set(xdata=[0], ydata=[self.y])
         self.top_line.set(xdata=[self.x, -self.x], ydata=[self.y, self.y])
-        self.bottom_line.set(xdata=[self.x,-self.x], ydata=[-self.y, -self.y])
-        
+        self.bottom_line.set(xdata=[self.x, -self.x], ydata=[-self.y, -self.y])
+
     def save(self, ev):
         """
@@ -400,5 +382,5 @@
         self.has_move = False
         self.base.moveend(ev)
-             
+
     def restore(self):
         """
@@ -407,5 +389,5 @@
         self.x = self.save_x
         self.y = self.save_y
-        
+
     def move(self, x, y, ev):
         """
@@ -415,6 +397,6 @@
         self.has_move = True
         self.base.base.update()
-        
-  
+
+
 class VerticalLines(_BaseInteractor):
     """
@@ -431,29 +413,18 @@
         self.y = math.fabs(y)
         self.save_y = y
-        try:
-            # Inner circle marker
-            self.inner_marker = self.axes.plot([self.x], [0], linestyle='',
-                                          marker='s', markersize=10,
-                                          color=self.color, alpha=0.6,
-                                          pickradius=5, label="pick", 
-                                          # Prefer this to other lines
-                                          zorder=zorder, visible=True)[0]
-        except:
-            self.inner_marker = self.axes.plot([self.x], [0], linestyle='',
-                                          marker='s', markersize=10,
-                                          color=self.color, alpha=0.6,
-                                          label="pick", visible=True)[0]
-            message  = "\nTHIS PROTOTYPE NEEDS THE LATEST VERSION"
-            message += " OF MATPLOTLIB\n Get the SVN version that is"
-            message += " at least as recent as June 1, 2007"
-            
+        # Inner circle marker
+        self.inner_marker = self.axes.plot([self.x], [0], linestyle='',
+                                           marker='s', markersize=10,
+                                           color=self.color, alpha=0.6,
+                                           pickradius=5, label="pick",
+                                           zorder=zorder, visible=True)[0]
         self.right_line = self.axes.plot([self.x, self.x],
-                                         [self.y , -self.y],
-                                      linestyle='-', marker='',
-                                      color=self.color, visible=True)[0]
+                                         [self.y, -self.y],
+                                         linestyle='-', marker='',
+                                         color=self.color, visible=True)[0]
         self.left_line = self.axes.plot([-self.x, -self.x],
                                         [self.y, -self.y],
-                                      linestyle='-', marker='',
-                                      color=self.color, visible=True)[0]
+                                        linestyle='-', marker='',
+                                        color=self.color, visible=True)[0]
         self.has_move = False
         self.connect_markers([self.right_line, self.inner_marker])
@@ -463,11 +434,11 @@
         """
         Allow adding plot to the same panel
-        
+
         :param n: the number of layer
-        
+
         """
         self.layernum = n
         self.update()
-        
+
     def clear(self):
         """
@@ -487,19 +458,19 @@
         """
         Draw the new roughness on the graph.
-        
+
         :param x: x-coordinates to reset current class x
         :param y: y-coordinates to reset current class y
-        
-        """
-        ## reset x, y -coordinates if given as parameters
+
+        """
+        # # reset x, y -coordinates if given as parameters
         if x != None:
             self.x = numpy.sign(self.x) * math.fabs(x)
         if y != None:
             self.y = numpy.sign(self.y) * math.fabs(y)
-        ## draw lines and markers  
-        self.inner_marker.set(xdata=[self.x], ydata=[0]) 
-        self.left_line.set(xdata=[-self.x, -self.x], ydata=[self.y, -self.y]) 
-        self.right_line.set(xdata=[self.x, self.x], ydata=[self.y, -self.y]) 
-    
+        # # draw lines and markers
+        self.inner_marker.set(xdata=[self.x], ydata=[0])
+        self.left_line.set(xdata=[-self.x, -self.x], ydata=[self.y, -self.y])
+        self.right_line.set(xdata=[self.x, self.x], ydata=[self.y, -self.y])
+
     def save(self, ev):
         """
@@ -510,5 +481,5 @@
         self.save_y = self.y
         self.base.freeze_axes()
-        
+
     def moveend(self, ev):
         """
@@ -518,5 +489,5 @@
         self.has_move = False
         self.base.moveend(ev)
-               
+
     def restore(self):
         """
@@ -525,5 +496,5 @@
         self.x = self.save_x
         self.y = self.save_y
-      
+
     def move(self, x, y, ev):
         """
@@ -533,6 +504,6 @@
         self.x = x
         self.base.base.update()
-        
-   
+
+
 class BoxInteractorX(BoxInteractor):
     """
@@ -543,5 +514,5 @@
         self.base = base
         self._post_data()
-        
+
     def _post_data(self):
         """
@@ -549,6 +520,6 @@
         """
         from sas.dataloader.manipulations import SlabX
-        self.post_data(SlabX, direction="X")   
-        
+        self.post_data(SlabX, direction="X")
+
 
 class BoxInteractorY(BoxInteractor):
@@ -560,5 +531,5 @@
         self.base = base
         self._post_data()
-        
+
     def _post_data(self):
         """
@@ -566,5 +537,4 @@
         """
         from sas.dataloader.manipulations import SlabY
-        self.post_data(SlabY, direction="Y")   
-        
-        
+        self.post_data(SlabY, direction="Y")
+
Index: src/sas/guiframe/local_perspectives/plotting/boxSum.py
===================================================================
--- src/sas/guiframe/local_perspectives/plotting/boxSum.py	(revision 794922220f2fb3b23dd08c648aabf87b4850596c)
+++ src/sas/guiframe/local_perspectives/plotting/boxSum.py	(revision b5de88e13816ca80c8329096bc22edbab9a36123)
@@ -1,5 +1,5 @@
 """
-    Boxsum Class: determine 2 rectangular area to compute 
-    the sum of pixel of a Data. 
+    Boxsum Class: determine 2 rectangular area to compute
+    the sum of pixel of a Data.
 """
 import math
@@ -13,6 +13,6 @@
 class BoxSum(_BaseInteractor):
     """
-        Boxsum Class: determine 2 rectangular area to compute 
-        the sum of pixel of a Data. 
+        Boxsum Class: determine 2 rectangular area to compute
+        the sum of pixel of a Data.
         Uses PointerInteractor , VerticalDoubleLine,HorizontalDoubleLine.
         @param zorder:  Artists with lower zorder values are drawn first.
@@ -24,31 +24,31 @@
     """
     def __init__(self, base, axes, color='black', zorder=3, x_min=0.008,
-                  x_max=0.008, y_min=0.0025, y_max=0.0025):
+                 x_max=0.008, y_min=0.0025, y_max=0.0025):
         """
         """
         _BaseInteractor.__init__(self, base, axes, color=color)
-        ## class initialization
-        ## list of Boxsmun markers
+        # # class initialization
+        # # list of Boxsmun markers
         self.markers = []
         self.axes = axes
-        ## connect the artist for the motion
+        # # connect the artist for the motion
         self.connect = self.base.connect
-        ## when qmax is reached the selected line is reset the its previous value
+        # # when qmax is reached the selected line is reset the its previous value
         self.qmax = min(self.base.data2D.xmax, self.base.data2D.xmin)
-        ## Define the boxsum limits
+        # # Define the boxsum limits
         self.xmin = -1 * 0.5 * min(math.fabs(self.base.data2D.xmax),
-                                  math.fabs(self.base.data2D.xmin))
+                                   math.fabs(self.base.data2D.xmin))
         self.ymin = -1 * 0.5 * min(math.fabs(self.base.data2D.xmax),
-                                  math.fabs(self.base.data2D.xmin))
+                                   math.fabs(self.base.data2D.xmin))
         self.xmax = 0.5 * min(math.fabs(self.base.data2D.xmax),
                               math.fabs(self.base.data2D.xmin))
         self.ymax = 0.5 * min(math.fabs(self.base.data2D.xmax),
                               math.fabs(self.base.data2D.xmin))
-        ## center of the boxSum
+        # # center of the boxSum
         self.center_x = 0.0002
         self.center_y = 0.0003
-        ## Number of points on the plot
+        # # Number of points on the plot
         self.nbins = 20
-        ## Define initial result the summation 
+        # # Define initial result the summation
         self.count = 0
         self.error = 0
@@ -56,41 +56,41 @@
         self.totalerror = 0
         self.points = 0
-        ## Flag to determine if the current figure has moved
-        ## set to False == no motion , set to True== motion
+        # # Flag to determine if the current figure has moved
+        # # set to False == no motion , set to True== motion
         self.has_move = False
-        ## Create Boxsum edges 
+        # # Create Boxsum edges
         self.horizontal_lines = HorizontalDoubleLine(self,
-                                                    self.base.subplot,
-                                                    color='blue',
-                                                      zorder=zorder,
-                                                      y=self.ymax,
-                                                      x=self.xmax,
-                                                      center_x=self.center_x,
-                                                      center_y=self.center_y)
+                                                     self.base.subplot,
+                                                     color='blue',
+                                                     zorder=zorder,
+                                                     y=self.ymax,
+                                                     x=self.xmax,
+                                                     center_x=self.center_x,
+                                                     center_y=self.center_y)
         self.horizontal_lines.qmax = self.qmax
-        
+
         self.vertical_lines = VerticalDoubleLine(self,
-                                                self.base.subplot,
-                                                color='black',
-                                                zorder=zorder,
-                                                y=self.ymax,
-                                                x=self.xmax,
-                                                center_x=self.center_x,
-                                                center_y=self.center_y)
+                                                 self.base.subplot,
+                                                 color='black',
+                                                 zorder=zorder,
+                                                 y=self.ymax,
+                                                 x=self.xmax,
+                                                 center_x=self.center_x,
+                                                 center_y=self.center_y)
         self.vertical_lines.qmax = self.qmax
-        
+
         self.center = PointInteractor(self,
-                                     self.base.subplot,color='grey',
-                                    zorder=zorder,
-                                    center_x= self.center_x,
-                                    center_y= self.center_y)
-        ## Save the name of the slicer panel associate with this slicer 
-        self.panel_name = ""    
-        ## Update and post slicer parameters  
+                                      self.base.subplot, color='grey',
+                                      zorder=zorder,
+                                      center_x=self.center_x,
+                                      center_y=self.center_y)
+        # # Save the name of the slicer panel associate with this slicer
+        self.panel_name = ""
+        # # Update and post slicer parameters
         self.update()
         self._post_data()
-        ## Bind to slice parameter events
+        # # Bind to slice parameter events
         self.base.Bind(EVT_SLICER_PARS, self._onEVT_SLICER_PARS)
-        
+
     def set_panel_name(self, name):
         """
@@ -99,16 +99,16 @@
         """
         self.panel_name = name
-        
+
     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
         """
-        ## Post e message to declare what kind of event has being received
+        # # Post e message to declare what kind of event has being received
         wx.PostEvent(self.base.parent,
                      StatusEvent(status="Boxsum._onEVT_SLICER_PARS"))
         event.Skip()
-        ## reset the slicer with the values contains the event.params dictionary
+        # # reset the slicer with the values contains the event.params dictionary
         if event.type == self.__class__.__name__:
             self.set_params(event.params)
@@ -122,5 +122,5 @@
         self.layernum = n
         self.update()
-        
+
     def clear(self):
         """
@@ -133,5 +133,5 @@
         self.base.connect.clearall()
         self.base.Unbind(EVT_SLICER_PARS)
-        
+
     def update(self):
         """
@@ -139,11 +139,11 @@
         resetting the widgets.
         """
-        ## check if the center point has moved and update the figure accordingly 
+        # # check if the center point has moved and update the figure accordingly
         if self.center.has_move:
             self.center.update()
-            self.horizontal_lines.update( center= self.center)
-            self.vertical_lines.update( center= self.center)
-        ## check if the horizontal lines have moved and 
-        #update the figure accordingly    
+            self.horizontal_lines.update(center=self.center)
+            self.vertical_lines.update(center=self.center)
+        # # check if the horizontal lines have moved and
+        # update the figure accordingly
         if self.horizontal_lines.has_move:
             self.horizontal_lines.update()
@@ -151,6 +151,6 @@
                                        y2=self.horizontal_lines.y2,
                                        height=self.horizontal_lines.half_height)
-        ## check if the vertical lines have moved and 
-        #update the figure accordingly    
+        # # check if the vertical lines have moved and
+        # update the figure accordingly
         if self.vertical_lines.has_move:
             self.vertical_lines.update()
@@ -158,5 +158,5 @@
                                          x2=self.vertical_lines.x2,
                                          width=self.vertical_lines.half_width)
-            
+
     def save(self, ev):
         """
@@ -168,5 +168,5 @@
         self.vertical_lines.save(ev)
         self.center.save(ev)
-        
+
     def _post_data(self):
         """
@@ -174,30 +174,28 @@
         contained in that region and the error on that sum
         """
-        ## Data 2D for which the pixel will be summed
-        data = self.base.data2D
-        ## the region of the summation
-        x_min = self.horizontal_lines.x2 
-        x_max = self.horizontal_lines.x1 
+        # # the region of the summation
+        x_min = self.horizontal_lines.x2
+        x_max = self.horizontal_lines.x1
         y_min = self.vertical_lines.y2
         y_max = self.vertical_lines.y1
-        ##computation of the sum and its error
+        # #computation of the sum and its error
         from sas.dataloader.manipulations import Boxavg
-        box =  Boxavg(x_min=x_min, x_max=x_max, y_min=y_min, y_max=y_max)
+        box = Boxavg(x_min=x_min, x_max=x_max, y_min=y_min, y_max=y_max)
         self.count, self.error = box(self.base.data2D)
         # Dig out number of points summed, SMK & PDB, 04/03/2013
         from sas.dataloader.manipulations import Boxsum
-        boxtotal =  Boxsum(x_min=x_min, x_max=x_max, y_min=y_min, y_max=y_max)
+        boxtotal = Boxsum(x_min=x_min, x_max=x_max, y_min=y_min, y_max=y_max)
         self.total, self.totalerror, self.points = boxtotal(self.base.data2D)
-        
+
     def moveend(self, ev):
         """
             After a dragging motion this function is called to compute
-            the error and the sum of pixel of a given data 2D 
+            the error and the sum of pixel of a given data 2D
         """
         self.base.thaw_axes()
-        ## compute error an d sum of data's pixel
+        # # compute error an d sum of data's pixel
         self._post_data()
-        ## Create and event ( posted to guiframe)that  set the 
-        ##current slicer parameter to a panel of name self.panel_name
+        # # Create and event ( posted to guiframe)that  set the
+        # #current slicer parameter to a panel of name self.panel_name
         self.type = self.__class__.__name__
         params = self.get_params()
@@ -206,5 +204,5 @@
                                        panel_name=self.panel_name)
         wx.PostEvent(self.base.parent, event)
-        
+
     def restore(self):
         """
@@ -214,5 +212,5 @@
         self.vertical_lines.restore()
         self.center.restore()
-        
+
     def move(self, x, y, ev):
         """
@@ -220,10 +218,10 @@
         """
         pass
-    
+
     def set_cursor(self, x, y):
         """
         """
         pass
-        
+
     def get_params(self):
         """
@@ -233,5 +231,5 @@
         params = {}
         params["Width"] = math.fabs(self.vertical_lines.half_width) * 2
-        params["Height"] = math.fabs(self.horizontal_lines.half_height) * 2 
+        params["Height"] = math.fabs(self.horizontal_lines.half_height) * 2
         params["center_x"] = self.center.x
         params["center_y"] = self.center.y
@@ -242,5 +240,5 @@
         params["sum_error"] = self.totalerror
         return params
-    
+
     def get_result(self):
         """
@@ -251,33 +249,33 @@
         result["avg"] = self.count
         result["avg_error"] = self.error
-        params["sum"] = self.total
-        params["sum_error"] = self.totalerror
+        result["sum"] = self.total
+        result["sum_error"] = self.totalerror
         return result
-        
+
     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 values the user assigned to the slicer.
         """
-        x_max = math.fabs(params["Width"] )/2
-        y_max = math.fabs(params["Height"] )/2
-        
-        self.center_x = params["center_x"] 
+        x_max = math.fabs(params["Width"]) / 2
+        y_max = math.fabs(params["Height"]) / 2
+
+        self.center_x = params["center_x"]
         self.center_y = params["center_y"]
-        #update the slicer given values of params
+        # update the slicer given values of params
         self.center.update(center_x=self.center_x, center_y=self.center_y)
         self.horizontal_lines.update(center=self.center,
                                      width=x_max, height=y_max)
         self.vertical_lines.update(center=self.center,
-                                    width=x_max, height=y_max)
-        #compute the new error and sum given values of params
+                                   width=x_max, height=y_max)
+        # compute the new error and sum given values of params
         self._post_data()
-        
+
     def freeze_axes(self):
         """
         """
         self.base.freeze_axes()
-        
+
     def thaw_axes(self):
         """
@@ -289,11 +287,11 @@
         """
         self.base.draw()
-        
-        
-        
+
+
+
 class PointInteractor(_BaseInteractor):
     """
     Draw a point that can be dragged with the marker.
-    this class controls the motion the center of the BoxSum 
+    this class controls the motion the center of the BoxSum
     """
     def __init__(self, base, axes, color='black', zorder=5, center_x=0.0,
@@ -302,5 +300,5 @@
         """
         _BaseInteractor.__init__(self, base, axes, color=color)
-        ## Initialization the class 
+        # # Initialization the class
         self.markers = []
         self.axes = axes
@@ -308,40 +306,26 @@
         self.x = center_x
         self.y = center_y
-        ## saved value of the center coordinates
+        # # saved value of the center coordinates
         self.save_x = center_x
         self.save_y = center_y
-        ## Create a marker 
-        try:
-            self.center_marker = self.axes.plot([self.x],[self.y], linestyle='',
-                                          marker='s', markersize=10,
-                                          color=self.color, alpha=0.6,
-                                          pickradius=5, label="pick", 
-                                          # Prefer this to other lines
-                                          zorder=zorder, 
-                                          visible=True)[0]
-        except:
-            self.center_marker = self.axes.plot([self.x],[self.y], linestyle='',
-                                          marker='s', markersize=10,
-                                          color=self.color, alpha=0.6,
-                                          label="pick", 
-                                          visible=True)[0]
-            message  = "\nTHIS PROTOTYPE NEEDS THE LATEST VERSION"
-            message += " OF MATPLOTLIB.\n Get the SVN version that is "
-            message += "at least as recent as June 1, 2007"
-            owner = self.base.base.parent
-            wx.PostEvent(owner,
-                         StatusEvent(status="AnnulusSlicer: %s" % message))
-        ## Draw a point
+        # # Create a marker
+        self.center_marker = self.axes.plot([self.x], [self.y], linestyle='',
+                                            marker='s', markersize=10,
+                                            color=self.color, alpha=0.6,
+                                            pickradius=5, label="pick",
+                                            zorder=zorder,
+                                            visible=True)[0]
+        # # Draw a point
         self.center = self.axes.plot([self.x], [self.y],
-                                      linestyle='-', marker='',
-                                      color=self.color,
-                                      visible=True)[0]
-        ## Flag to determine the motion this point 
-        self.has_move = False   
-        ## connecting the marker to allow them to move 
+                                     linestyle='-', marker='',
+                                     color=self.color,
+                                     visible=True)[0]
+        # # Flag to determine the motion this point
+        self.has_move = False
+        # # connecting the marker to allow them to move
         self.connect_markers([self.center_marker])
-        ## Update the figure
-        self.update()
-    
+        # # Update the figure
+        self.update()
+
     def set_layer(self, n):
         """
@@ -351,5 +335,5 @@
         self.layernum = n
         self.update()
-        
+
     def clear(self):
         """
@@ -364,6 +348,6 @@
             for item in range(len(self.axes.lines)):
                 del self.axes.lines[0]
-  
-    def update(self, center_x=None,center_y=None):
+
+    def update(self, center_x=None, center_y=None):
         """
             Draw the new roughness on the graph.
@@ -375,5 +359,5 @@
         self.center_marker.set(xdata=[self.x], ydata=[self.y])
         self.center.set(xdata=[self.x], ydata=[self.y])
-        
+
     def save(self, ev):
         """
@@ -384,11 +368,11 @@
         self.save_y = self.y
         self.base.freeze_axes()
-        
+
     def moveend(self, ev):
         """
         """
-        self.has_move=False
+        self.has_move = False
         self.base.moveend(ev)
-            
+
     def restore(self):
         """
@@ -397,5 +381,5 @@
         self.y = self.save_y
         self.x = self.save_x
-    
+
     def move(self, x, y, ev):
         """
@@ -406,5 +390,5 @@
         self.has_move = True
         self.base.base.update()
-        
+
     def set_cursor(self, x, y):
         """
@@ -412,73 +396,60 @@
         self.move(x, y, None)
         self.update()
-        
+
 class VerticalDoubleLine(_BaseInteractor):
     """
-         Draw 2 vertical lines moving in opposite direction and centered on 
+         Draw 2 vertical lines moving in opposite direction and centered on
          a point (PointInteractor)
     """
-    def __init__(self, base, axes, color='black', zorder=5, x=0.5,y=0.5,
+    def __init__(self, base, axes, color='black', zorder=5, x=0.5, y=0.5,
                  center_x=0.0, center_y=0.0):
         """
         """
         _BaseInteractor.__init__(self, base, axes, color=color)
-        ## Initialization the class 
+        # # Initialization the class
         self.markers = []
         self.axes = axes
-        ## Center coordinates
+        # # Center coordinates
         self.center_x = center_x
         self.center_y = center_y
-        ## defined end points vertical lignes and their saved values
+        # # defined end points vertical lignes and their saved values
         self.y1 = y + self.center_y
-        self.save_y1= self.y1
-        
+        self.save_y1 = self.y1
+
         delta = self.y1 - self.center_y
         self.y2 = self.center_y - delta
         self.save_y2 = self.y2
-        
+
         self.x1 = x + self.center_x
         self.save_x1 = self.x1
-         
+
         delta = self.x1 - self.center_x
         self.x2 = self.center_x - delta
         self.save_x2 = self.x2
-        ## save the color of the line
+        # # save the color of the line
         self.color = color
-        ## the height of the rectangle
+        # # the height of the rectangle
         self.half_height = math.fabs(y)
         self.save_half_height = math.fabs(y)
-        ## the with of the rectangle
-        self.half_width = math.fabs(self.x1- self.x2)/2
-        self.save_half_width = math.fabs(self.x1- self.x2)/2
-        ## Create marker 
-        try:
-            self.right_marker = self.axes.plot([self.x1],[0], linestyle='',
-                                          marker='s', markersize=10,
-                                          color=self.color, alpha=0.6,
-                                          pickradius=5, label="pick", 
-                                          # Prefer this to other lines
-                                          zorder=zorder, visible=True)[0]
-        except:
-            self.right_marker = self.axes.plot([self.x1],[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 Get the SVN version that"
-            message += " is at least as recent as June 1, 2007"
-            owner = self.base.base.parent
-            wx.PostEvent(owner,
-                         StatusEvent(status="AnnulusSlicer: %s" % message))
-            
-        ## define the left and right lines of the rectangle
+        # # the with of the rectangle
+        self.half_width = math.fabs(self.x1 - self.x2) / 2
+        self.save_half_width = math.fabs(self.x1 - self.x2) / 2
+        # # Create marker
+        self.right_marker = self.axes.plot([self.x1], [0], linestyle='',
+                                           marker='s', markersize=10,
+                                           color=self.color, alpha=0.6,
+                                           pickradius=5, label="pick",
+                                           zorder=zorder, visible=True)[0]
+
+        # # define the left and right lines of the rectangle
         self.right_line = self.axes.plot([self.x1, self.x1], [self.y1, self.y2],
-                                      linestyle='-', marker='',
-                                      color=self.color, visible=True)[0]
+                                         linestyle='-', marker='',
+                                         color=self.color, visible=True)[0]
         self.left_line = self.axes.plot([self.x2, self.x2], [self.y1, self.y2],
-                                      linestyle='-', marker='',
-                                      color=self.color, visible=True)[0]
-        ## Flag to determine if the lines have moved
-        self.has_move = False  
-        ## connection the marker and draw the pictures  
+                                        linestyle='-', marker='',
+                                        color=self.color, visible=True)[0]
+        # # Flag to determine if the lines have moved
+        self.has_move = False
+        # # connection the marker and draw the pictures
         self.connect_markers([self.right_marker])
         self.update()
@@ -491,5 +462,5 @@
         self.layernum = n
         self.update()
-        
+
     def clear(self):
         """
@@ -505,7 +476,7 @@
             for item in range(len(self.axes.lines)):
                 del self.axes.lines[0]
-   
-    def update(self, x1=None, x2=None, y1=None, y2=None,width=None,
-                height=None, center=None):
+
+    def update(self, x1=None, x2=None, y1=None, y2=None, width=None,
+               height=None, center=None):
         """
         Draw the new roughness on the graph.
@@ -518,39 +489,39 @@
         :param center: provided x, y  coordinates of the center point
         """
-        ## save the new height, witdh of the rectangle if given as a param
+        # # save the new height, witdh of the rectangle if given as a param
         if width != None:
             self.half_width = width
         if height != None:
             self.half_height = height
-        ## If new  center coordinates are given draw the rectangle 
-        ##given these value 
+        # # If new  center coordinates are given draw the rectangle
+        # #given these value
         if center != None:
             self.center_x = center.x
             self.center_y = center.y
             self.x1 = self.half_width + self.center_x
-            self.x2= -self.half_width + self.center_x
+            self.x2 = -self.half_width + self.center_x
             self.y1 = self.half_height + self.center_y
-            self.y2= -self.half_height + self.center_y
-         
+            self.y2 = -self.half_height + self.center_y
+
             self.right_marker.set(xdata=[self.x1], ydata=[self.center_y])
-            self.right_line.set(xdata=[self.x1, self.x1], 
+            self.right_line.set(xdata=[self.x1, self.x1],
                                 ydata=[self.y1, self.y2])
             self.left_line.set(xdata=[self.x2, self.x2],
                                ydata=[self.y1, self.y2])
-            return 
-        ## if x1, y1, y2, y3 are given draw the rectangle with this value
-        if x1 != None: 
+            return
+        # # if x1, y1, y2, y3 are given draw the rectangle with this value
+        if x1 != None:
             self.x1 = x1
-        if x2 != None: 
+        if x2 != None:
             self.x2 = x2
-        if y1 != None: 
+        if y1 != None:
             self.y1 = y1
-        if y2 != None: 
+        if y2 != None:
             self.y2 = y2
-        ## Draw 2 vertical lines and a marker 
+        # # Draw 2 vertical lines and a marker
         self.right_marker.set(xdata=[self.x1], ydata=[self.center_y])
         self.right_line.set(xdata=[self.x1, self.x1], ydata=[self.y1, self.y2])
         self.left_line.set(xdata=[self.x2, self.x2], ydata=[self.y1, self.y2])
-        
+
     def save(self, ev):
         """
@@ -572,5 +543,5 @@
         self.has_move = False
         self.base.moveend(ev)
-            
+
     def restore(self):
         """
@@ -583,5 +554,5 @@
         self.half_height = self.save_half_height
         self.half_width = self.save_half_width
-       
+
     def move(self, x, y, ev):
         """
@@ -591,15 +562,15 @@
         delta = self.x1 - self.center_x
         self.x2 = self.center_x - delta
-        self.half_width = math.fabs(self.x1 - self.x2)/2
+        self.half_width = math.fabs(self.x1 - self.x2) / 2
         self.has_move = True
         self.base.base.update()
-        
+
     def set_cursor(self, x, y):
         """
-            Update the figure given x and y 
+            Update the figure given x and y
         """
         self.move(x, y, None)
         self.update()
-        
+
 class HorizontalDoubleLine(_BaseInteractor):
     """
@@ -608,10 +579,10 @@
     def __init__(self, base, axes, color='black', zorder=5, x=0.5, y=0.5,
                  center_x=0.0, center_y=0.0):
-        
+
         _BaseInteractor.__init__(self, base, axes, color=color)
-        ## Initialization the class 
+        # # Initialization the class
         self.markers = []
         self.axes = axes
-        ## Center coordinates
+        # # Center coordinates
         self.center_x = center_x
         self.center_y = center_y
@@ -627,38 +598,25 @@
         self.save_x2 = self.x2
         self.color = color
-        self.half_height= math.fabs(y)
+        self.half_height = math.fabs(y)
         self.save_half_height = math.fabs(y)
         self.half_width = math.fabs(x)
         self.save_half_width = math.fabs(x)
-        try:
-            self.top_marker = self.axes.plot([0], [self.y1], linestyle='',
-                                          marker='s', markersize=10,
-                                          color=self.color, alpha=0.6,
-                                          pickradius=5, label="pick",
-                                          # Prefer this to other lines
-                                          zorder=zorder, visible=True)[0]
-        except:
-            self.top_marker = self.axes.plot([0], [self.y1], linestyle='',
-                                          marker='s', markersize=10,
-                                          color=self.color, alpha=0.6,
-                                          label="pick", visible=True)[0]
-            message  = "\nTHIS PROTOTYPE NEEDS THE LATEST VERSION "
-            message += "OF MATPLOTLIB\n Get the SVN version "
-            message += "that is at least as recent as June 1, 2007"
-            owner = self.base.base.parent
-            wx.PostEvent(owner,
-                         StatusEvent(status="AnnulusSlicer: %s" % message))
-            
+        self.top_marker = self.axes.plot([0], [self.y1], linestyle='',
+                                         marker='s', markersize=10,
+                                         color=self.color, alpha=0.6,
+                                         pickradius=5, label="pick",
+                                         zorder=zorder, visible=True)[0]
+
         # Define 2 horizotnal lines
         self.top_line = self.axes.plot([self.x1, -self.x1], [self.y1, self.y1],
-                                      linestyle='-', marker='',
-                                      color=self.color, visible=True)[0]
-        self.bottom_line = self.axes.plot([self.x1, -self.x1], 
+                                       linestyle='-', marker='',
+                                       color=self.color, visible=True)[0]
+        self.bottom_line = self.axes.plot([self.x1, -self.x1],
                                           [self.y2, self.y2],
-                                      linestyle='-', marker='',
-                                      color=self.color, visible=True)[0]
-        ## Flag to determine if the lines have moved
-        self.has_move = False    
-        ## connection the marker and draw the pictures 
+                                          linestyle='-', marker='',
+                                          color=self.color, visible=True)[0]
+        # # Flag to determine if the lines have moved
+        self.has_move = False
+        # # connection the marker and draw the pictures
         self.connect_markers([self.top_marker])
         self.update()
@@ -671,5 +629,5 @@
         self.layernum = n
         self.update()
-        
+
     def clear(self):
         """
@@ -685,5 +643,5 @@
             for item in range(len(self.axes.lines)):
                 del self.axes.lines[0]
-    
+
     def update(self, x1=None, x2=None, y1=None, y2=None,
                width=None, height=None, center=None):
@@ -698,11 +656,11 @@
         :param center: provided x, y  coordinates of the center point
         """
-        ## save the new height, witdh of the rectangle if given as a param
+        # # save the new height, witdh of the rectangle if given as a param
         if width != None:
             self.half_width = width
-        if height!= None:
+        if height != None:
             self.half_height = height
-        ## If new  center coordinates are given draw the rectangle 
-        ##given these value 
+        # # If new  center coordinates are given draw the rectangle
+        # #given these value
         if center != None:
             self.center_x = center.x
@@ -710,8 +668,8 @@
             self.x1 = self.half_width + self.center_x
             self.x2 = -self.half_width + self.center_x
-            
+
             self.y1 = self.half_height + self.center_y
             self.y2 = -self.half_height + self.center_y
-            
+
             self.top_marker.set(xdata=[self.center_x], ydata=[self.y1])
             self.top_line.set(xdata=[self.x1, self.x2],
@@ -719,19 +677,19 @@
             self.bottom_line.set(xdata=[self.x1, self.x2],
                                  ydata=[self.y2, self.y2])
-            return 
-        ## if x1, y1, y2, y3 are given draw the rectangle with this value
-        if x1 != None: 
+            return
+        # # if x1, y1, y2, y3 are given draw the rectangle with this value
+        if x1 != None:
             self.x1 = x1
-        if x2 != None: 
+        if x2 != None:
             self.x2 = x2
-        if y1 != None: 
+        if y1 != None:
             self.y1 = y1
-        if y2 != None: 
+        if y2 != None:
             self.y2 = y2
-        ## Draw 2 vertical lines and a marker 
+        # # Draw 2 vertical lines and a marker
         self.top_marker.set(xdata=[self.center_x], ydata=[self.y1])
         self.top_line.set(xdata=[self.x1, self.x2], ydata=[self.y1, self.y1])
         self.bottom_line.set(xdata=[self.x1, self.x2], ydata=[self.y2, self.y2])
-       
+
     def save(self, ev):
         """
@@ -744,7 +702,7 @@
         self.save_y1 = self.y1
         self.save_half_height = self.half_height
-        self.save_half_width =  self.half_width
+        self.save_half_width = self.half_width
         self.base.freeze_axes()
-        
+
     def moveend(self, ev):
         """
@@ -753,5 +711,5 @@
         self.has_move = False
         self.base.moveend(ev)
-           
+
     def restore(self):
         """
@@ -764,5 +722,5 @@
         self.half_height = self.save_half_height
         self.half_width = self.save_half_width
-        
+
     def move(self, x, y, ev):
         """
@@ -771,14 +729,13 @@
         self.y1 = y
         delta = self.y1 - self.center_y
-        self.y2 =  self.center_y - delta
+        self.y2 = self.center_y - delta
         self.half_height = math.fabs(self.y1) - self.center_y
         self.has_move = True
         self.base.base.update()
-    
+
     def set_cursor(self, x, y):
         """
-            Update the figure given x and y 
+            Update the figure given x and y
         """
         self.move(x, y, None)
         self.update()
-         
Index: src/sas/guiframe/local_perspectives/plotting/detector_dialog.py
===================================================================
--- src/sas/guiframe/local_perspectives/plotting/detector_dialog.py	(revision 794922220f2fb3b23dd08c648aabf87b4850596c)
+++ src/sas/guiframe/local_perspectives/plotting/detector_dialog.py	(revision b5de88e13816ca80c8329096bc22edbab9a36123)
@@ -5,14 +5,14 @@
 import sys
 from sas.guiframe.utils import format_number
-from sas.guiframe.events import StatusEvent 
+from sas.guiframe.events import StatusEvent
 from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as Canvas
 from matplotlib import mpl
 from matplotlib import pylab
-#FONT size 
+# FONT size
 if sys.platform.count("win32") > 0:
     FONT_VARIANT = 0
 else:
     FONT_VARIANT = 1
-    
+
 DEFAULT_CMAP = pylab.cm.get_cmap('jet')
 
@@ -21,8 +21,8 @@
     Dialog box to let the user edit detector settings
     """
-    
+
     def __init__(self, parent, id=1, base=None, dpi=None,
-                 cmap=DEFAULT_CMAP, reset_zmin_ctl = None,
-                 reset_zmax_ctl = None, *args, **kwds):
+                 cmap=DEFAULT_CMAP, reset_zmin_ctl=None,
+                 reset_zmax_ctl=None, *args, **kwds):
         """
         """
@@ -39,7 +39,7 @@
         self.label_qmax = wx.StaticText(self, -1, "Q max")
         self.label_zmin = wx.StaticText(self, -1,
-                                    "Min amplitude for color map (optional)")
+                                        "Min amplitude for color map (optional)")
         self.label_zmax = wx.StaticText(self, -1,
-                                    "Max amplitude for color map (optional)")
+                                        "Max amplitude for color map (optional)")
         self.label_beam = wx.StaticText(self, -1,
                                         "Beam stop radius in units of q")
@@ -53,14 +53,14 @@
         self.zmax_ctl.Bind(wx.EVT_SET_FOCUS, self.onSetFocus)
         self.static_line_3 = wx.StaticLine(self, -1)
-        self.button_Cancel = wx.Button(self, wx.ID_CANCEL, "Cancel")
+        self.button_cancel = wx.Button(self, wx.ID_CANCEL, "Cancel")
         self.button_reset = wx.Button(self, wx.NewId(), "Reset")
         self.Bind(wx.EVT_BUTTON, self.resetValues, self.button_reset)
-        self.button_OK = wx.Button(self, wx.ID_OK, "OK")
-        self.Bind(wx.EVT_BUTTON, self.checkValues, self.button_OK)
+        self.button_ok = wx.Button(self, wx.ID_OK, "OK")
+        self.Bind(wx.EVT_BUTTON, self.checkValues, self.button_ok)
         self.__set_properties()
         self.__do_layout()
         self.Fit()
-        
-    class Event:
+
+    class Event(object):
         """
         """
@@ -73,5 +73,5 @@
         cmap = None
         sym4 = False
-    
+
     def onSetFocus(self, event):
         """
@@ -82,5 +82,5 @@
         # Select the whole control, after this event resolves
         wx.CallAfter(widget.SetSelection, -1, -1)
-        
+
     def resetValues(self, event):
         """
@@ -93,5 +93,5 @@
                 zmin = ""
             if zmax == None:
-                zmax = ""    
+                zmax = ""
             self.zmin_ctl.SetValue(str(zmin))
             self.zmax_ctl.SetValue(str(zmax))
@@ -102,5 +102,5 @@
             msg = "error occurs while resetting Detector: %s" % sys.exc_value
             wx.PostEvent(self.parent, StatusEvent(status=msg))
-        
+
     def checkValues(self, event):
         """
@@ -111,11 +111,4 @@
         try:
             value = self.zmin_ctl.GetValue()
-            #if value and float( value) == 0.0:
-            #    flag = False
-            #    wx.PostEvent(self.parent,
-            #            StatusEvent(status="Enter number greater than zero"))
-            #    self.zmin_ctl.SetBackgroundColour("pink")
-            #    self.zmin_ctl.Refresh()
-            #else:
             self.zmin_ctl.SetBackgroundColour(wx.WHITE)
             self.zmin_ctl.Refresh()
@@ -130,5 +123,5 @@
                 flag = False
                 wx.PostEvent(self.parent,
-                        StatusEvent(status="Enter number greater than zero"))
+                             StatusEvent(status="Enter number greater than zero"))
                 self.zmax_ctl.SetBackgroundColour("pink")
                 self.zmax_ctl.Refresh()
@@ -143,10 +136,10 @@
         if flag:
             event.Skip(True)
-    
+
     def setContent(self, xnpts, ynpts, qmax, beam,
                    zmin=None, zmax=None, sym=False):
         """
         received value and displayed them
-        
+
         :param xnpts: the number of point of the x_bins of data
         :param ynpts: the number of point of the y_bins of data
@@ -156,5 +149,5 @@
         :param zmax:  the value to get the maximum color
         :param sym:
-        
+
         """
         self.xnpts_ctl.SetLabel(str(format_number(xnpts)))
@@ -207,35 +200,35 @@
         sizer_colormap = wx.BoxSizer(wx.VERTICAL)
         sizer_selection = wx.BoxSizer(wx.HORIZONTAL)
-       
+
         iy = 0
         sizer_params.Add(self.label_xnpts, (iy, 0), (1, 1),
-                          wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
-        sizer_params.Add(self.xnpts_ctl,   (iy, 1), (1, 1),
-                         wx.EXPAND|wx.ADJUST_MINSIZE, 0)
+                         wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15)
+        sizer_params.Add(self.xnpts_ctl, (iy, 1), (1, 1),
+                         wx.EXPAND | wx.ADJUST_MINSIZE, 0)
         iy += 1
         sizer_params.Add(self.label_ynpts, (iy, 0), (1, 1),
-                         wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
-        sizer_params.Add(self.ynpts_ctl,   (iy, 1), (1, 1),
-                         wx.EXPAND|wx.ADJUST_MINSIZE, 0)
+                         wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15)
+        sizer_params.Add(self.ynpts_ctl, (iy, 1), (1, 1),
+                         wx.EXPAND | wx.ADJUST_MINSIZE, 0)
         iy += 1
         sizer_params.Add(self.label_qmax, (iy, 0), (1, 1),
-                         wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
-        sizer_params.Add(self.qmax_ctl,   (iy, 1), (1, 1),
-                         wx.EXPAND|wx.ADJUST_MINSIZE, 0)
+                         wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15)
+        sizer_params.Add(self.qmax_ctl, (iy, 1), (1, 1),
+                         wx.EXPAND | wx.ADJUST_MINSIZE, 0)
         iy += 1
         sizer_params.Add(self.label_beam, (iy, 0), (1, 1),
-                         wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
-        sizer_params.Add(self.beam_ctl,   (iy, 1), (1, 1),
-                         wx.EXPAND|wx.ADJUST_MINSIZE, 0)
+                         wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15)
+        sizer_params.Add(self.beam_ctl, (iy, 1), (1, 1),
+                         wx.EXPAND | wx.ADJUST_MINSIZE, 0)
         iy += 1
         sizer_params.Add(self.label_zmin, (iy, 0), (1, 1),
-                         wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
-        sizer_params.Add(self.zmin_ctl,   (iy, 1), (1, 1),
-                         wx.EXPAND|wx.ADJUST_MINSIZE, 0)
+                         wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15)
+        sizer_params.Add(self.zmin_ctl, (iy, 1), (1, 1),
+                         wx.EXPAND | wx.ADJUST_MINSIZE, 0)
         iy += 1
         sizer_params.Add(self.label_zmax, (iy, 0), (1, 1),
-                         wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
-        sizer_params.Add(self.zmax_ctl,   (iy, 1), (1, 1),
-                         wx.EXPAND|wx.ADJUST_MINSIZE, 0)
+                         wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15)
+        sizer_params.Add(self.zmax_ctl, (iy, 1), (1, 1),
+                         wx.EXPAND | wx.ADJUST_MINSIZE, 0)
         iy += 1
         self.fig = mpl.figure.Figure(dpi=self.dpi, figsize=(4, 1))
@@ -243,33 +236,33 @@
         self.norm = mpl.colors.Normalize(vmin=0, vmax=100)
         self.cb1 = mpl.colorbar.ColorbarBase(self.ax1, cmap=self.cmap,
-                                           norm= self.norm,
-                                           orientation='horizontal')
+                                             norm=self.norm,
+                                             orientation='horizontal')
         self.cb1.set_label('Detector Colors')
         self.canvas = Canvas(self, -1, self.fig)
-        sizer_colormap.Add(self.canvas, 0, wx.LEFT | wx.EXPAND,5)
+        sizer_colormap.Add(self.canvas, 0, wx.LEFT | wx.EXPAND, 5)
         self.cmap_selector = wx.ComboBox(self, -1)
         self.cmap_selector.SetValue(str(self.cmap.name))
         maps = sorted(m for m in pylab.cm.datad if not m.endswith("_r"))
-       
+
         for i, m in enumerate(maps):
             self.cmap_selector.Append(str(m), pylab.get_cmap(m))
-        
+
         wx.EVT_COMBOBOX(self.cmap_selector, -1, self._on_select_cmap)
         sizer_selection.Add(wx.StaticText(self, -1, "Select Cmap: "), 0,
-                             wx.LEFT|wx.ADJUST_MINSIZE, 5) 
-        sizer_selection.Add(self.cmap_selector, 0, wx.EXPAND|wx.ALL, 10)
-        sizer_main.Add(sizer_params, 0, wx.EXPAND|wx.ALL, 5)
-        sizer_main.Add(sizer_selection, 0, wx.EXPAND|wx.ALL, 5)
-        note = "   Note: This is one time option. " +\
+                            wx.LEFT | wx.ADJUST_MINSIZE, 5)
+        sizer_selection.Add(self.cmap_selector, 0, wx.EXPAND | wx.ALL, 10)
+        sizer_main.Add(sizer_params, 0, wx.EXPAND | wx.ALL, 5)
+        sizer_main.Add(sizer_selection, 0, wx.EXPAND | wx.ALL, 5)
+        note = "   Note: This is one time option. " + \
                "It will be reset on updating the image."
         note_txt = wx.StaticText(self, -1, note)
-        sizer_main.Add(note_txt, 0, wx.EXPAND|wx.ALL, 5)
-        sizer_main.Add(sizer_colormap, 1, wx.EXPAND|wx.ALL, 5)
+        sizer_main.Add(note_txt, 0, wx.EXPAND | wx.ALL, 5)
+        sizer_main.Add(sizer_colormap, 1, wx.EXPAND | wx.ALL, 5)
         sizer_main.Add(self.static_line_3, 0, wx.EXPAND, 0)
-        sizer_button.Add(self.button_reset, 0, wx.LEFT|wx.ADJUST_MINSIZE, 100)
-        sizer_button.Add(self.button_OK, 0, wx.LEFT|wx.ADJUST_MINSIZE, 10)
-        sizer_button.Add(self.button_Cancel, 0,
-                         wx.LEFT|wx.RIGHT|wx.ADJUST_MINSIZE, 10)
-        sizer_main.Add(sizer_button, 0, wx.EXPAND|wx.BOTTOM|wx.TOP, 10)
+        sizer_button.Add(self.button_reset, 0, wx.LEFT | wx.ADJUST_MINSIZE, 100)
+        sizer_button.Add(self.button_ok, 0, wx.LEFT | wx.ADJUST_MINSIZE, 10)
+        sizer_button.Add(self.button_cancel, 0,
+                         wx.LEFT | wx.RIGHT | wx.ADJUST_MINSIZE, 10)
+        sizer_main.Add(sizer_button, 0, wx.EXPAND | wx.BOTTOM | wx.TOP, 10)
         self.SetAutoLayout(True)
         self.SetSizer(sizer_main)
@@ -277,8 +270,8 @@
         self.Centre()
         # end wxGlade
-        
+
     def _on_select_cmap(self, event):
         """
-        display a new cmap 
+        display a new cmap
         """
         cmap_name = self.cmap_selector.GetCurrentSelection()
@@ -286,4 +279,4 @@
         self.cmap = current_cmap
         self.cb1 = mpl.colorbar.ColorbarBase(self.ax1, cmap=self.cmap,
-                                     norm=self.norm, orientation='horizontal')
+                                             norm=self.norm, orientation='horizontal')
         self.canvas.draw()
Index: src/sas/guiframe/local_perspectives/plotting/graphAppearance.py
===================================================================
--- src/sas/guiframe/local_perspectives/plotting/graphAppearance.py	(revision 794922220f2fb3b23dd08c648aabf87b4850596c)
+++ src/sas/guiframe/local_perspectives/plotting/graphAppearance.py	(revision b5de88e13816ca80c8329096bc22edbab9a36123)
@@ -39,5 +39,4 @@
         self.is_ytick = False
 
-
     def InitUI(self):
 
@@ -53,14 +52,11 @@
         yhbox2 = wx.BoxSizer(wx.HORIZONTAL)
 
-
-
         if self.legend:
             legendLocText = wx.StaticText(panel, label='Legend location: ')
-            self.legend_loc_combo = wx.ComboBox(panel,style = wx.CB_READONLY, size=(180,-1))
+            self.legend_loc_combo = wx.ComboBox(panel, style=wx.CB_READONLY, size=(180, -1))
             self.fillLegendLocs()
         else:
             self.legend_loc_combo = None
 
-
         if self.legend:
             self.toggle_legend = wx.CheckBox(panel, label='Toggle legend on/off')
@@ -70,5 +66,4 @@
         self.toggle_grid = wx.CheckBox(panel, label='Toggle grid on/off')
 
-        
         xstatic_box = wx.StaticBox(panel, -1, 'x-axis label')
         xstatic_box_sizer = wx.StaticBoxSizer(xstatic_box, wx.VERTICAL)
@@ -76,5 +71,4 @@
         ystatic_box_sizer = wx.StaticBoxSizer(ystatic_box, wx.VERTICAL)
 
-
         xaxis_label = wx.StaticText(panel, label='X-axis: ')
         yaxis_label = wx.StaticText(panel, label='Y-axis: ')
@@ -82,11 +76,9 @@
         unitlabel_2 = wx.StaticText(panel, label='Units: ')
 
-        self.xaxis_text = wx.TextCtrl(panel, -1, "",size=(220, -1))
-        self.yaxis_text = wx.TextCtrl(panel, -1, "",size=(220, -1))
-
-        self.xaxis_unit_text = wx.TextCtrl(panel, -1,"",size=(100, -1))
-        self.yaxis_unit_text = wx.TextCtrl(panel, -1,"",size=(100, -1))
-
-
+        self.xaxis_text = wx.TextCtrl(panel, -1, "", size=(220, -1))
+        self.yaxis_text = wx.TextCtrl(panel, -1, "", size=(220, -1))
+
+        self.xaxis_unit_text = wx.TextCtrl(panel, -1, "", size=(100, -1))
+        self.yaxis_unit_text = wx.TextCtrl(panel, -1, "", size=(100, -1))
 
         xcolorLabel = wx.StaticText(panel, label='Font color: ')
@@ -95,31 +87,28 @@
         self.xfont_color.SetSelection(0)
         xfont_button = wx.Button(panel, label='Font')
-        xfont_button.Bind(wx.EVT_BUTTON, self.onxFont)
+        xfont_button.Bind(wx.EVT_BUTTON, self.on_x_font)
 
         ycolorLabel = wx.StaticText(panel, label='Font color: ')
-        self.yfont_color = wx.ComboBox(panel, size=(100, -1),style=wx.CB_READONLY)
+        self.yfont_color = wx.ComboBox(panel, size=(100, -1), style=wx.CB_READONLY)
         self.yfill_colors()
         self.yfont_color.SetSelection(0)
         yfont_button = wx.Button(panel, label='Font')
-        yfont_button.Bind(wx.EVT_BUTTON, self.onyFont)
-
-        
+        yfont_button.Bind(wx.EVT_BUTTON, self.on_y_font)
 
         self.cancel_button = wx.Button(panel, label='Cancel')
         self.ok_button = wx.Button(panel, label='OK')
 
-        self.cancel_button.Bind(wx.EVT_BUTTON, self.onCancel)
+        self.cancel_button.Bind(wx.EVT_BUTTON, self.on_cancel)
         self.ok_button.Bind(wx.EVT_BUTTON, self.on_ok)
 
-
-        xhbox1.Add(xaxis_label, flag= wx.ALL | wx.EXPAND  | wx.ALIGN_LEFT, border=10)
-        xhbox1.Add(self.xaxis_text, flag=wx.ALL | wx.EXPAND  | wx.ALIGN_LEFT, border=10)
-        xhbox1.Add(unitlabel_1, flag=wx.ALL | wx.EXPAND  | wx.ALIGN_RIGHT, border=10)
-        xhbox1.Add(self.xaxis_unit_text, flag=wx.ALL | wx.EXPAND  | wx.ALIGN_RIGHT, border=10)
-
-        yhbox1.Add(yaxis_label, flag= wx.ALL | wx.EXPAND  | wx.ALIGN_LEFT, border=10)
-        yhbox1.Add(self.yaxis_text, flag=wx.ALL | wx.EXPAND  | wx.ALIGN_LEFT, border=10)
-        yhbox1.Add(unitlabel_2, flag=wx.ALL | wx.EXPAND  | wx.ALIGN_RIGHT, border=10)
-        yhbox1.Add(self.yaxis_unit_text, flag=wx.ALL | wx.EXPAND  | wx.ALIGN_RIGHT, border=10)
+        xhbox1.Add(xaxis_label, flag=wx.ALL | wx.EXPAND | wx.ALIGN_LEFT, border=10)
+        xhbox1.Add(self.xaxis_text, flag=wx.ALL | wx.EXPAND | wx.ALIGN_LEFT, border=10)
+        xhbox1.Add(unitlabel_1, flag=wx.ALL | wx.EXPAND | wx.ALIGN_RIGHT, border=10)
+        xhbox1.Add(self.xaxis_unit_text, flag=wx.ALL | wx.EXPAND | wx.ALIGN_RIGHT, border=10)
+
+        yhbox1.Add(yaxis_label, flag=wx.ALL | wx.EXPAND | wx.ALIGN_LEFT, border=10)
+        yhbox1.Add(self.yaxis_text, flag=wx.ALL | wx.EXPAND | wx.ALIGN_LEFT, border=10)
+        yhbox1.Add(unitlabel_2, flag=wx.ALL | wx.EXPAND | wx.ALIGN_RIGHT, border=10)
+        yhbox1.Add(self.yaxis_unit_text, flag=wx.ALL | wx.EXPAND | wx.ALIGN_RIGHT, border=10)
 
         xhbox2.Add(xcolorLabel, flag=wx.ALL | wx.ALIGN_RIGHT, border=10)
@@ -132,28 +121,27 @@
 
         if self.legend:
-            hbox1.Add(legendLocText, flag =  wx.ALL | wx.EXPAND  | wx.ALIGN_LEFT, border=5)
-            hbox1.Add(self.legend_loc_combo, flag =  wx.ALL | wx.EXPAND  | wx.ALIGN_LEFT, border=5)
+            hbox1.Add(legendLocText, flag=wx.ALL | wx.EXPAND | wx.ALIGN_LEFT, border=5)
+            hbox1.Add(self.legend_loc_combo, flag=wx.ALL | wx.EXPAND | wx.ALIGN_LEFT, border=5)
 
         if self.legend:
             hbox1.Add((5, -1))
-            hbox1.Add(self.toggle_legend, flag = wx.ALL | wx.EXPAND  | wx.ALIGN_LEFT, border=5)
-
-        hbox2.Add(self.ok_button, flag = wx.ALL | wx.ALIGN_RIGHT, border=5)
-        hbox2.Add(self.cancel_button, flag = wx.ALL | wx.ALIGN_RIGHT, border=5)
+            hbox1.Add(self.toggle_legend, flag=wx.ALL | wx.EXPAND | wx.ALIGN_LEFT, border=5)
+
+        hbox2.Add(self.ok_button, flag=wx.ALL | wx.ALIGN_RIGHT, border=5)
+        hbox2.Add(self.cancel_button, flag=wx.ALL | wx.ALIGN_RIGHT, border=5)
         hbox2.Add((15, -1))
 
-        xstatic_box_sizer.Add(xhbox1, flag= wx.EXPAND , border=5)
+        xstatic_box_sizer.Add(xhbox1, flag=wx.EXPAND, border=5)
         xstatic_box_sizer.Add(xhbox2, flag=wx.ALL | wx.ALIGN_RIGHT, border=5)
-        ystatic_box_sizer.Add(yhbox1, flag= wx.EXPAND, border=5)
+        ystatic_box_sizer.Add(yhbox1, flag=wx.EXPAND, border=5)
         ystatic_box_sizer.Add(yhbox2, flag=wx.ALL | wx.ALIGN_RIGHT, border=5)
 
         vbox.Add((-1, 20))
-        vbox.Add(hbox1, flag = wx.EXPAND | wx.ALL, border=5)
-        vbox.Add(xstatic_box_sizer, flag = wx.ALL | wx.EXPAND, border=10)
-        vbox.Add(ystatic_box_sizer, flag = wx.ALL | wx.EXPAND, border=10)
-
-        vbox.Add(self.toggle_grid, flag = wx.ALIGN_RIGHT | wx.RIGHT, border=20)
-        vbox.Add(hbox2, flag = wx.ALIGN_RIGHT | wx.ALL , border=5)
-
+        vbox.Add(hbox1, flag=wx.EXPAND | wx.ALL, border=5)
+        vbox.Add(xstatic_box_sizer, flag=wx.ALL | wx.EXPAND, border=10)
+        vbox.Add(ystatic_box_sizer, flag=wx.ALL | wx.EXPAND, border=10)
+
+        vbox.Add(self.toggle_grid, flag=wx.ALIGN_RIGHT | wx.RIGHT, border=20)
+        vbox.Add(hbox2, flag=wx.ALIGN_RIGHT | wx.ALL, border=5)
 
         panel.SetSizer(vbox)
@@ -169,5 +157,5 @@
             self.yfont_color.Append(c_list[idx], idx)
 
-    def onxFont(self, e):
+    def on_x_font(self, e):
         title = 'Modify x axis font'
 
@@ -175,14 +163,14 @@
         fonty.set_default_font(self.xfont)
         fonty.set_ticklabel_check(self.is_xtick)
-        if(fonty.ShowModal() == wx.ID_OK):
+        if fonty.ShowModal() == wx.ID_OK:
             self.xfont = fonty.get_font()
             self.is_xtick = fonty.get_ticklabel_check()
 
-    def onyFont(self, e):
+    def on_y_font(self, e):
         title = 'Modify y axis font'
         fonty = SimpleFont(self, wx.NewId(), title)
         fonty.set_default_font(self.yfont)
         fonty.set_ticklabel_check(self.is_ytick)
-        if(fonty.ShowModal() == wx.ID_OK):
+        if fonty.ShowModal() == wx.ID_OK:
             self.yfont = fonty.get_font()
             self.is_ytick = fonty.get_ticklabel_check()
@@ -191,5 +179,5 @@
         self.Close()
 
-    def onCancel(self, e):
+    def on_cancel(self, e):
         self.Destroy()
 
@@ -237,7 +225,7 @@
 
 
-    def setDefaults(self,grid,legend,xlab,ylab,xunit,yunit,
-                    xaxis_font,yaxis_font,legend_loc,
-                    xcolor,ycolor, is_xtick, is_ytick):
+    def setDefaults(self, grid, legend, xlab, ylab, xunit, yunit,
+                    xaxis_font, yaxis_font, legend_loc,
+                    xcolor, ycolor, is_xtick, is_ytick):
         self.toggle_grid.SetValue(grid)
         if self.legend:
@@ -261,5 +249,5 @@
         else:
             self.yfont_color.SetStringSelection(ycolor)
-            
+
 
         if self.legend:
@@ -310,5 +298,5 @@
     def get_yfont(self):
         return self.yfont
-    
+
     def get_xtick_check(self):
         return self.is_xtick
@@ -316,10 +304,10 @@
     def get_ytick_check(self):
         return self.is_ytick
-    
+
 
 if __name__ == '__main__':
 
     app = wx.App()
-    graphD = graphAppearance(None,title='Modify graph appearance')
+    graphD = graphAppearance(None, title='Modify graph appearance')
     app.MainLoop()
 
Index: src/sas/guiframe/local_perspectives/plotting/masking.py
===================================================================
--- src/sas/guiframe/local_perspectives/plotting/masking.py	(revision 794922220f2fb3b23dd08c648aabf87b4850596c)
+++ src/sas/guiframe/local_perspectives/plotting/masking.py	(revision b5de88e13816ca80c8329096bc22edbab9a36123)
@@ -3,19 +3,19 @@
 """
 ################################################################################
-#This software was developed by the University of Tennessee as part of the
-#Distributed Data Analysis of Neutron Scattering Experiments (DANSE)
-#project funded by the US National Science Foundation. 
+# This software was developed by the University of Tennessee as part of the
+# Distributed Data Analysis of Neutron Scattering Experiments (DANSE)
+# project funded by the US National Science Foundation.
 #
-#If you use DANSE applications to do scientific research that leads to 
-#publication, we ask that you acknowledge the use of the software with the 
-#following sentence:
+# If you use DANSE applications to do scientific research that leads to
+# publication, we ask that you acknowledge the use of the software with the
+# following sentence:
 #
-#This work benefited from DANSE software developed under NSF award DMR-0520547. 
+# This work benefited from DANSE software developed under NSF award DMR-0520547.
 #
-#copyright 2008, University of Tennessee
+# copyright 2008, University of Tennessee
 ################################################################################
 
 
-##Todo: cleaning up, improving the maskplotpanel initialization, and testing.
+# #Todo: cleaning up, improving the maskplotpanel initialization, and testing.
 import wx
 import sys
@@ -39,5 +39,5 @@
 _STATICBOX_WIDTH = 380
 
-#SLD panel size 
+# SLD panel size
 if sys.platform.count("win32") > 0:
     PANEL_SIZE = 350
@@ -46,5 +46,5 @@
     PANEL_SIZE = 300
     FONT_VARIANT = 1
-    
+
 from sas.data_util.calcthread import CalcThread
 
@@ -54,12 +54,12 @@
     """
     def __init__(self,
-                 id = -1,
-                 panel = None,
-                 image = None,
-                 completefn = None,
-                 updatefn   = None,
-                 elapsed = 0,
-                 yieldtime  = 0.01,
-                 worktime   = 0.01
+                 id=-1,
+                 panel=None,
+                 image=None,
+                 completefn=None,
+                 updatefn=None,
+                 elapsed=0,
+                 yieldtime=0.01,
+                 worktime=0.01
                  ):
         """
@@ -70,9 +70,9 @@
                  worktime)
         self.starttime = 0
-        self.id = id 
+        self.id = id
         self.panel = panel
         self.image = image
-        
-        
+
+
     def compute(self):
         """
@@ -80,26 +80,26 @@
         """
         elapsed = time.time() - self.starttime
-       
+
         self.complete(panel=self.panel, image=self.image, elapsed=elapsed)
-        
-        
+
+
 class MaskPanel(wx.Dialog):
     """
     Provides the Mask Editor GUI.
     """
-    ## Internal nickname for the window, used by the AUI manager
+    # # Internal nickname for the window, used by the AUI manager
     window_name = "Mask Editor"
-    ## Name to appear on the window title bar
+    # # Name to appear on the window title bar
     window_caption = "Mask Editor"
-    ## Flag to tell the AUI manager to put this panel in the center pane
+    # # Flag to tell the AUI manager to put this panel in the center pane
     CENTER_PANE = True
-    def __init__(self, parent=None, base=None, 
+    def __init__(self, parent=None, base=None,
                  data=None, id=-1, *args, **kwds):
         kwds["style"] = wx.DEFAULT_DIALOG_STYLE
-        kwds["size"] = wx.Size(_STATICBOX_WIDTH*0.8, PANEL_SIZE) 
-        wx.Dialog.__init__(self, parent, id=id,  *args, **kwds)
-        
+        kwds["size"] = wx.Size(_STATICBOX_WIDTH * 0.8, PANEL_SIZE)
+        wx.Dialog.__init__(self, parent, id=id, *args, **kwds)
+
         if data != None:
-            #Font size 
+            # Font size
             kwds = []
             self.SetWindowVariant(variant=FONT_VARIANT)
@@ -108,13 +108,13 @@
             self.data = data
             self.str = self.data.__str__()
-            ## mask for 2D
+            # # mask for 2D
             self.mask = data.mask
             self.default_mask = copy.deepcopy(data.mask)
-            ## masked data from GUI
+            # # masked data from GUI
             self.slicer_mask = None
             self.slicer = None
             self.slicer_z = 5
             self.data.interactive = True
-            ## when 2 data have the same id override the 1 st plotted
+            # # when 2 data have the same id override the 1 st plotted
             self.name = self.data.name
             # Panel for 2D plot
@@ -122,5 +122,5 @@
                                            style=wx.TRANSPARENT_WINDOW)
             self.cmap = DEFAULT_CMAP
-            ## Create Artist and bind it
+            # # Create Artist and bind it
             self.subplot = self.plotpanel.subplot
             self.connect = BindArtist(self.subplot.figure)
@@ -128,5 +128,5 @@
             self.newplot = Data2D(image=self.data.data)
             self.newplot.setValues(self.data)
-            self.plotpanel.add_image(self.newplot) 
+            self.plotpanel.add_image(self.newplot)
             self._update_mask(self.mask)
             self.Centre()
@@ -134,5 +134,5 @@
             # bind evt_close to _draw in fitpage
             self.Bind(wx.EVT_CLOSE, self.OnClose)
-            
+
     def ShowMessage(self, msg=''):
         """
@@ -143,5 +143,5 @@
         mssg += msg
         wx.MessageBox(mssg, 'Error', wx.OK | wx.ICON_ERROR)
-    
+
     def _setup_layout(self):
         """
@@ -149,5 +149,5 @@
         """
         note = "Note: This masking applies\n     only to %s." % self.data.name
-        note_txt = wx.StaticText(self, -1, note) 
+        note_txt = wx.StaticText(self, -1, note)
         note_txt.SetForegroundColour(wx.RED)
         shape = "Select a Shape for Masking:"
@@ -155,48 +155,48 @@
         sizer = wx.GridBagSizer(10, 10)
         #---------inputs----------------
-        shape_txt = wx.StaticText(self, -1, shape)  
-        sizer.Add(shape_txt, (1, 1), flag=wx.TOP|wx.LEFT|wx.BOTTOM, border=5)
+        shape_txt = wx.StaticText(self, -1, shape)
+        sizer.Add(shape_txt, (1, 1), flag=wx.TOP | wx.LEFT | wx.BOTTOM, border=5)
         self.innersector_rb = wx.RadioButton(self, -1, "Double Wings")
         self.Bind(wx.EVT_RADIOBUTTON, self.onInnerSectorMask,
                   id=self.innersector_rb.GetId())
-        sizer.Add(self.innersector_rb, (2, 1), 
-                  flag=wx.RIGHT|wx.BOTTOM, border=5)
+        sizer.Add(self.innersector_rb, (2, 1),
+                  flag=wx.RIGHT | wx.BOTTOM, border=5)
         self.innercircle_rb = wx.RadioButton(self, -1, "Circular Disk")
         self.Bind(wx.EVT_RADIOBUTTON, self.onInnerRingMask,
                   id=self.innercircle_rb.GetId())
         sizer.Add(self.innercircle_rb, (3, 1),
-                   flag=wx.RIGHT|wx.BOTTOM, border=5)
-        
+                   flag=wx.RIGHT | wx.BOTTOM, border=5)
+
         self.innerbox_rb = wx.RadioButton(self, -1, "Rectangular Disk")
         self.Bind(wx.EVT_RADIOBUTTON, self.onInnerBoxMask,
                   id=self.innerbox_rb.GetId())
-        sizer.Add(self.innerbox_rb, (4, 1), flag=wx.RIGHT|wx.BOTTOM, border=5)
+        sizer.Add(self.innerbox_rb, (4, 1), flag=wx.RIGHT | wx.BOTTOM, border=5)
 
         self.outersector_rb = wx.RadioButton(self, -1, "Double Wing Window")
-        self.Bind(wx.EVT_RADIOBUTTON, self.onOuterSectorMask, 
+        self.Bind(wx.EVT_RADIOBUTTON, self.onOuterSectorMask,
                   id=self.outersector_rb.GetId())
         sizer.Add(self.outersector_rb, (5, 1),
-                  flag=wx.RIGHT|wx.BOTTOM, border=5)
-        
-        #outersector_y_txt = wx.StaticText(self, -1, 'Outer Sector')
+                  flag=wx.RIGHT | wx.BOTTOM, border=5)
+
+        # outersector_y_txt = wx.StaticText(self, -1, 'Outer Sector')
         self.outercircle_rb = wx.RadioButton(self, -1, "Circular Window")
         self.Bind(wx.EVT_RADIOBUTTON, self.onOuterRingMask,
                   id=self.outercircle_rb.GetId())
-        sizer.Add(self.outercircle_rb, (6, 1), 
-                  flag=wx.RIGHT|wx.BOTTOM, border=5)
-        #outerbox_txt = wx.StaticText(self, -1, 'Outer Box')
+        sizer.Add(self.outercircle_rb, (6, 1),
+                  flag=wx.RIGHT | wx.BOTTOM, border=5)
+        # outerbox_txt = wx.StaticText(self, -1, 'Outer Box')
         self.outerbox_rb = wx.RadioButton(self, -1, "Rectangular Window")
-        self.Bind(wx.EVT_RADIOBUTTON, self.onOuterBoxMask, 
+        self.Bind(wx.EVT_RADIOBUTTON, self.onOuterBoxMask,
                   id=self.outerbox_rb.GetId())
-        sizer.Add(self.outerbox_rb, (7, 1), flag=wx.RIGHT|wx.BOTTOM, border=5)
-        sizer.Add(note_txt, (8, 1), flag=wx.RIGHT|wx.BOTTOM, border=5)
+        sizer.Add(self.outerbox_rb, (7, 1), flag=wx.RIGHT | wx.BOTTOM, border=5)
+        sizer.Add(note_txt, (8, 1), flag=wx.RIGHT | wx.BOTTOM, border=5)
         self.innercircle_rb.SetValue(False)
-        self.outercircle_rb.SetValue(False)        
+        self.outercircle_rb.SetValue(False)
         self.innerbox_rb.SetValue(False)
         self.outerbox_rb.SetValue(False)
         self.innersector_rb.SetValue(False)
         self.outersector_rb.SetValue(False)
-        sizer.Add(self.plotpanel, (0, 2), (13, 13), 
-                  wx.EXPAND|wx.LEFT|wx.RIGHT, 15)
+        sizer.Add(self.plotpanel, (0, 2), (13, 13),
+                  wx.EXPAND | wx.LEFT | wx.RIGHT, 15)
 
         #-----Buttons------------1
@@ -204,5 +204,5 @@
         button_add = wx.Button(self, id_button, "Add")
         button_add.SetToolTipString("Add the mask drawn.")
-        button_add.Bind(wx.EVT_BUTTON, self.onAddMask, id=button_add.GetId()) 
+        button_add.Bind(wx.EVT_BUTTON, self.onAddMask, id=button_add.GetId())
         sizer.Add(button_add, (13, 7))
         id_button = wx.NewId()
@@ -210,5 +210,5 @@
         button_erase.SetToolTipString("Erase the mask drawn.")
         button_erase.Bind(wx.EVT_BUTTON, self.onEraseMask,
-                          id=button_erase.GetId()) 
+                          id=button_erase.GetId())
         sizer.Add(button_erase, (13, 8))
         id_button = wx.NewId()
@@ -216,12 +216,12 @@
         button_reset.SetToolTipString("Reset the mask.")
         button_reset.Bind(wx.EVT_BUTTON, self.onResetMask,
-                          id=button_reset.GetId()) 
-        sizer.Add(button_reset, (13, 9), flag=wx.RIGHT|wx.BOTTOM, border=15)
+                          id=button_reset.GetId())
+        sizer.Add(button_reset, (13, 9), flag=wx.RIGHT | wx.BOTTOM, border=15)
         id_button = wx.NewId()
         button_reset = wx.Button(self, id_button, "Clear")
         button_reset.SetToolTipString("Clear all mask.")
         button_reset.Bind(wx.EVT_BUTTON, self.onClearMask,
-                          id=button_reset.GetId()) 
-        sizer.Add(button_reset, (13, 10), flag=wx.RIGHT|wx.BOTTOM, border=15)
+                          id=button_reset.GetId())
+        sizer.Add(button_reset, (13, 10), flag=wx.RIGHT | wx.BOTTOM, border=15)
         sizer.AddGrowableCol(3)
         sizer.AddGrowableRow(2)
@@ -234,11 +234,11 @@
         Call Draw Box Slicer and get mask inside of the box
         """
-        #get ready for next evt
-        event.Skip()        
-        #from boxMask import BoxMask
+        # get ready for next evt
+        event.Skip()
+        # from boxMask import BoxMask
         if event != None:
-            self.onClearSlicer(event)         
+            self.onClearSlicer(event)
         self.slicer_z += 1
-        self.slicer =  BoxMask(self, self.subplot,
+        self.slicer = BoxMask(self, self.subplot,
                                zorder=self.slicer_z, side=True)
         self.subplot.set_ylim(self.data.ymin, self.data.ymax)
@@ -246,15 +246,15 @@
         self.update()
         self.slicer_mask = self.slicer.update()
-        
+
     def onOuterBoxMask(self, event=None):
         """
         Call Draw Box Slicer and get mask outside of the box
         """
-        event.Skip()        
-        #from boxMask import BoxMask
+        event.Skip()
+        # from boxMask import BoxMask
         if event != None:
-            self.onClearSlicer(event)      
+            self.onClearSlicer(event)
         self.slicer_z += 1
-        self.slicer =  BoxMask(self, self.subplot,
+        self.slicer = BoxMask(self, self.subplot,
                                zorder=self.slicer_z, side=False)
         self.subplot.set_ylim(self.data.ymin, self.data.ymax)
@@ -272,10 +272,10 @@
             self.onClearSlicer(event)
         self.slicer_z += 1
-        self.slicer =  SectorMask(self, self.subplot,
+        self.slicer = SectorMask(self, self.subplot,
                                   zorder=self.slicer_z, side=True)
         self.subplot.set_ylim(self.data.ymin, self.data.ymax)
-        self.subplot.set_xlim(self.data.xmin, self.data.xmax)   
+        self.subplot.set_xlim(self.data.xmin, self.data.xmax)
         self.update()
-        self.slicer_mask = self.slicer.update() 
+        self.slicer_mask = self.slicer.update()
 
     def onOuterSectorMask(self, event=None):
@@ -288,10 +288,10 @@
             self.onClearSlicer(event)
         self.slicer_z += 1
-        self.slicer =  SectorMask(self, self.subplot,
+        self.slicer = SectorMask(self, self.subplot,
                                   zorder=self.slicer_z, side=False)
         self.subplot.set_ylim(self.data.ymin, self.data.ymax)
-        self.subplot.set_xlim(self.data.xmin, self.data.xmax)    
-        self.update()     
-        self.slicer_mask = self.slicer.update()   
+        self.subplot.set_xlim(self.data.xmin, self.data.xmax)
+        self.update()
+        self.slicer_mask = self.slicer.update()
 
     def onInnerRingMask(self, event=None):
@@ -307,7 +307,7 @@
                                    zorder=self.slicer_z, side=True)
         self.subplot.set_ylim(self.data.ymin, self.data.ymax)
-        self.subplot.set_xlim(self.data.xmin, self.data.xmax)   
+        self.subplot.set_xlim(self.data.xmin, self.data.xmax)
         self.update()
-        self.slicer_mask = self.slicer.update() 
+        self.slicer_mask = self.slicer.update()
 
     def onOuterRingMask(self, event=None):
@@ -321,13 +321,13 @@
         self.slicer_z += 1
         self.slicer = CircularMask(self, self.subplot,
-                                   zorder=self.slicer_z, side=False)   
+                                   zorder=self.slicer_z, side=False)
         self.subplot.set_ylim(self.data.ymin, self.data.ymax)
         self.subplot.set_xlim(self.data.xmin, self.data.xmax)
         self.update()
-        self.slicer_mask = self.slicer.update()     
-        
+        self.slicer_mask = self.slicer.update()
+
     def onAddMask(self, event):
         """
-        Add new mask to old mask 
+        Add new mask to old mask
         """
         if not self.slicer == None:
@@ -337,12 +337,12 @@
             data.mask = self.data.mask & self.slicer_mask
             self._check_display_mask(data.mask, event)
-            
+
     def _check_display_mask(self, mask, event):
         """
         check if the mask valid and update the plot
-        
+
         :param mask: mask data
         """
-        ## Redraw the current image
+        # # Redraw the current image
         self._update_mask(mask)
 
@@ -356,34 +356,34 @@
             mask[self.slicer_mask == False] = True
             self._check_display_mask(mask, event)
-            
+
     def onResetMask(self, event):
         """
-        Reset mask to the original mask 
-        """        
+        Reset mask to the original mask
+        """
         self.slicer_z += 1
-        self.slicer =  BoxMask(self, self.subplot, 
+        self.slicer = BoxMask(self, self.subplot,
                                zorder=self.slicer_z, side=True)
         self.subplot.set_ylim(self.data.ymin, self.data.ymax)
-        self.subplot.set_xlim(self.data.xmin, self.data.xmax)   
+        self.subplot.set_xlim(self.data.xmin, self.data.xmax)
         mask = copy.deepcopy(self.default_mask)
         self.data.mask = mask
         # update mask plot
         self._check_display_mask(mask, event)
-        
+
     def onClearMask(self, event):
         """
         Clear mask
-        """            
+        """
         self.slicer_z += 1
-        self.slicer =  BoxMask(self, self.subplot,
+        self.slicer = BoxMask(self, self.subplot,
                                zorder=self.slicer_z, side=True)
         self.subplot.set_ylim(self.data.ymin, self.data.ymax)
-        self.subplot.set_xlim(self.data.xmin, self.data.xmax)   
-        #mask = copy.deepcopy(self.default_mask)
+        self.subplot.set_xlim(self.data.xmin, self.data.xmax)
+        # mask = copy.deepcopy(self.default_mask)
         mask = numpy.ones(len(self.data.mask), dtype=bool)
         self.data.mask = mask
         # update mask plot
         self._check_display_mask(mask, event)
-        
+
     def onClearSlicer(self, event):
         """
@@ -397,9 +397,9 @@
     def update(self, draw=True):
         """
-        Respond to changes in the model by recalculating the 
+        Respond to changes in the model by recalculating the
         profiles and resetting the widgets.
         """
         self.plotpanel.draw()
-        
+
     def _set_mask(self, mask):
         """
@@ -407,5 +407,5 @@
         """
         self.data.mask = mask
-        
+
     def set_plot_unfocus(self):
         """
@@ -413,9 +413,9 @@
         """
         pass
-    
+
     def _update_mask(self, mask):
         """
         Respond to changes in masking
-        """ 
+        """
         # the case of liitle numbers of True points
         if (len(mask[mask]) < 10 and self.data != None):
@@ -430,10 +430,10 @@
         # temp_data default is None
         # This method is to distinguish between masked point and data point = 0.
-        temp_mask = temp_mask/temp_mask
+        temp_mask = temp_mask / temp_mask
         temp_mask[mask] = temp_data.data[mask]
-        # set temp_data value for self.mask==True, else still None 
-        #temp_mask[mask] = temp_data[mask]
-        
-        #TODO: refactor this horrible logic 
+        # set temp_data value for self.mask==True, else still None
+        # temp_mask[mask] = temp_data[mask]
+
+        # TODO: refactor this horrible logic
         temp_data.data[mask == False] = temp_mask[mask == False]
         self.plotpanel.clear()
@@ -444,14 +444,14 @@
         event = self._getEmptySlicerEvent()
         wx.PostEvent(self, event)
-       
-        ##use this method
-        #set zmax and zmin to plot: Fix it w/ data.
+
+        # #use this method
+        # set zmax and zmin to plot: Fix it w/ data.
         if self.plotpanel.scale == 'log_{10}':
-            zmax = math.log10(max(self.data.data[self.data.data>0]))
-            zmin = math.log10(min(self.data.data[self.data.data>0]))
+            zmax = math.log10(max(self.data.data[self.data.data > 0]))
+            zmin = math.log10(min(self.data.data[self.data.data > 0]))
         else:
-            zmax = max(self.data.data[self.data.data>0])
-            zmin = min(self.data.data[self.data.data>0])
-        #plot    
+            zmax = max(self.data.data[self.data.data > 0])
+            zmin = min(self.data.data[self.data.data > 0])
+        # plot
         plot = self.plotpanel.image(data=temp_mask,
                        qx_data=self.data.qx_data,
@@ -470,8 +470,8 @@
         self.plotpanel.render()
         self.plotpanel.subplot.figure.canvas.draw_idle()
-        
+
     def _getEmptySlicerEvent(self):
         """
-        create an empty slicervent 
+        create an empty slicervent
         """
         self.innerbox_rb.SetValue(False)
@@ -483,6 +483,6 @@
         return SlicerEvent(type=None,
                            params=None,
-                           obj_class=None) 
-             
+                           obj_class=None)
+
     def _draw_model(self, event):
         """
@@ -490,5 +490,5 @@
         """
         pass
-        
+
     def freeze_axes(self):
         """
@@ -496,11 +496,11 @@
         """
         self.plotpanel.axes_frozen = True
-        
+
     def thaw_axes(self):
         """
         thaw axes
         """
-        self.plotpanel.axes_frozen = False       
-         
+        self.plotpanel.axes_frozen = False
+
     def onMouseMotion(self, event):
         """
@@ -508,11 +508,11 @@
         """
         pass
-    
+
     def onWheel(self, event):
         """
         on wheel event
         """
-        pass  
-    
+        pass
+
     def OnClose(self, event):
         """
@@ -524,5 +524,5 @@
             # when called by data panel
             event.Skip()
-            pass   
+            pass
 
 class FloatPanel(wx.Dialog):
@@ -530,19 +530,19 @@
     Provides the Mask Editor GUI.
     """
-    ## Internal nickname for the window, used by the AUI manager
+    # # Internal nickname for the window, used by the AUI manager
     window_name = "Plot"
-    ## Name to appear on the window title bar
+    # # Name to appear on the window title bar
     window_caption = "Plot"
-    ## Flag to tell the AUI manager to put this panel in the center pane
+    # # Flag to tell the AUI manager to put this panel in the center pane
     CENTER_PANE = False
     ID = wx.NewId()
-    def __init__(self, parent=None, base=None, 
+    def __init__(self, parent=None, base=None,
                  data=None, dimension=1, id=ID, *args, **kwds):
         kwds["style"] = wx.DEFAULT_DIALOG_STYLE
-        kwds["size"] = wx.Size(PANEL_SIZE*1.5, PANEL_SIZE*1.5) 
-        wx.Dialog.__init__(self, parent, id=id,  *args, **kwds)
-        
+        kwds["size"] = wx.Size(PANEL_SIZE * 1.5, PANEL_SIZE * 1.5)
+        wx.Dialog.__init__(self, parent, id=id, *args, **kwds)
+
         if data != None:
-            #Font size 
+            # Font size
             kwds = []
             self.SetWindowVariant(variant=FONT_VARIANT)
@@ -551,5 +551,5 @@
             self.data = data
             self.str = self.data.__str__()
-            ## when 2 data have the same id override the 1 st plotted
+            # # when 2 data have the same id override the 1 st plotted
             self.name = self.data.name
             self.dimension = dimension
@@ -560,39 +560,39 @@
             self.plotpanel.prevXtrans = "x"
             self.plotpanel.prevYtrans = "y"
-            
+
             self.cmap = DEFAULT_CMAP
-            ## Create Artist and bind it
+            # # Create Artist and bind it
             self.subplot = self.plotpanel.subplot
             self._setup_layout()
             if self.dimension == 1:
-                self.newplot = Data1D(x=data.x, y=data.y, 
+                self.newplot = Data1D(x=data.x, y=data.y,
                                       dx=data.dx, dy=data.dy)
                 self.newplot.name = data.name
-            else:    
+            else:
                 self.newplot = Data2D(image=self.data.data)
                 self.newplot.setValues(self.data)
                     # Compute and get the image plot
             self.get_plot()
-            #self.plotpanel.add_image(self.newplot) 
+            # self.plotpanel.add_image(self.newplot)
             self.Centre()
             self.Layout()
-    
+
     def get_plot(self):
         """
         Get Plot panel
         """
-        cal_plot = CalcPlot(panel=self.plotpanel, 
-                                   image=self.newplot, 
+        cal_plot = CalcPlot(panel=self.plotpanel,
+                                   image=self.newplot,
                                    completefn=self.complete)
         cal_plot.queue()
-    
+
     def complete(self, panel, image, elapsed=None):
         """
         Plot image
-        
+
         :param image: newplot [plotpanel]
         """
-        wx.CallAfter(panel.add_image, image) 
-        
+        wx.CallAfter(panel.add_image, image)
+
     def _setup_layout(self):
         """
@@ -605,18 +605,18 @@
             if len(self.data.data) > 3600:
                 note += "Rotation disabled for pixels > 60x60."
-            note_txt = wx.StaticText(self, -1, note) 
+            note_txt = wx.StaticText(self, -1, note)
             note_txt.SetForegroundColour(wx.RED)
-            sizer.Add(note_txt, (0, 2), flag=wx.RIGHT|wx.TOP, border=5)
-        
-        sizer.Add(self.plotpanel, (1, 0), (9, 9), 
-                  wx.EXPAND|wx.ALL, 15)
+            sizer.Add(note_txt, (0, 2), flag=wx.RIGHT | wx.TOP, border=5)
+
+        sizer.Add(self.plotpanel, (1, 0), (9, 9),
+                  wx.EXPAND | wx.ALL, 15)
 
         sizer.AddGrowableCol(3)
         sizer.AddGrowableRow(2)
-        
+
         self.SetSizerAndFit(sizer)
         self.Centre()
         self.Show(True)
-        
+
     def set_plot_unfocus(self):
         """
@@ -624,5 +624,5 @@
         """
         pass
-    
+
 
     def _draw_model(self, event):
@@ -631,5 +631,5 @@
         """
         pass
-        
+
     def freeze_axes(self):
         """
@@ -637,11 +637,11 @@
         """
         self.plotpanel.axes_frozen = True
-        
+
     def thaw_axes(self):
         """
         thaw axes
         """
-        self.plotpanel.axes_frozen = False       
-    
+        self.plotpanel.axes_frozen = False
+
     def OnClose(self, event):
         """
@@ -655,33 +655,33 @@
             pass
 
-                
+
 class Maskplotpanel(PlotPanel):
     """
     PlotPanel for Quick plot and masking plot
     """
-    def __init__(self, parent, id=-1, dimension=2, color=None, 
+    def __init__(self, parent, id=-1, dimension=2, color=None,
                                             dpi=None, **kwargs):
         """
         """
         PlotPanel.__init__(self, parent, id=id, color=color, dpi=dpi, **kwargs)
-        
+
         # Keep track of the parent Frame
         self.parent = parent
-        # Internal list of plottable names (because graph 
+        # Internal list of plottable names (because graph
         # doesn't have a dictionary of handles for the plottables)
         self.dimension = dimension
         self.plots = {}
         self.graph = Graph()
-        #add axis labels
+        # add axis labels
         self.graph.xaxis('\\rm{x} ', '')
         self.graph.yaxis('\\rm{y} ', '')
-        
+
     def add_toolbar(self):
-        """ 
+        """
         Add toolbar
         """
         # Not implemented
         pass
-    
+
     def on_set_focus(self, event):
         """
@@ -691,6 +691,6 @@
             pass
         else:
-            self.draw()   
-         
+            self.draw()
+
     def add_image(self, plot):
         """
@@ -698,9 +698,9 @@
         """
         self.plots[plot.name] = plot
-        #init graph
+        # init graph
         self.graph = Graph()
-        #add plot
+        # add plot
         self.graph.add(plot)
-        #add axes
+        # add axes
         if self.dimension == 1:
             self.xaxis_label = '\\rm{x} '
@@ -708,10 +708,10 @@
             self.yaxis_label = '\\rm{y} '
             self.yaxis_unit = ''
-        #draw
+        # draw
         # message
-        status_type = 'progress' 
+        status_type = 'progress'
         msg = 'Plotting...'
         self._status_info(msg, status_type)
-        status_type = 'stop'           
+        status_type = 'stop'
         self.graph.render(self)
         self.subplot.figure.canvas.resizing = False
@@ -723,5 +723,5 @@
         msg = 'Plotting Completed.'
         self._status_info(msg, status_type)
-        
+
     def onMouseMotion(self, event):
         """
@@ -729,10 +729,10 @@
         """
         pass
-    
+
     def onWheel(self, event):
         """
         """
-        pass 
-     
+        pass
+
     def onLeftDown(self, event):
         """
@@ -740,5 +740,5 @@
         """
         pass
-    
+
     def onPick(self, event):
         """
@@ -746,5 +746,5 @@
         """
         pass
-    
+
     def draw(self):
         """
@@ -752,17 +752,17 @@
         """
         # message
-        status_type = 'progress' 
+        status_type = 'progress'
         msg = 'Plotting...'
         self._status_info(msg, status_type)
-        status_type = 'stop'           
-        
+        status_type = 'stop'
+
         if self.dimension == 3:
             pass
         else:
-            self.subplot.figure.canvas.draw_idle() 
-        
+            self.subplot.figure.canvas.draw_idle()
+
         msg = 'Plotting Completed.'
         self._status_info(msg, status_type)
-       
+
     def onContextMenu(self, event):
         """
@@ -771,5 +771,5 @@
         # Selective Slicer plot popup menu
         slicerpop = wx.Menu()
-        
+
         id = wx.NewId()
         slicerpop.Append(id, '&Print Image', 'Print image')
@@ -779,5 +779,5 @@
         slicerpop.Append(id, '&Copy to Clipboard', 'Copy to the clipboard')
         wx.EVT_MENU(self, id, self.OnCopyFigureMenu)
-        
+
         if self.dimension == 1:
             id = wx.NewId()
@@ -789,10 +789,10 @@
             slicerpop.Append(id_cm, '&Toggle Linear/Log scale')
             wx.EVT_MENU(self, id_cm, self._onToggleScale)
-               
+
         pos = event.GetPosition()
         pos = self.ScreenToClient(pos)
         self.PopupMenu(slicerpop, pos)
-        
-    def _status_info(self, msg = '', type = "update"):
+
+    def _status_info(self, msg='', type="update"):
         """
         Status msg
@@ -801,10 +801,10 @@
             label = "Plotting..."
             able = True
-        else:   
+        else:
             label = "Wait..."
             able = False
         if self.parent.parent.parent != None:
-                wx.PostEvent(self.parent.parent.parent, 
-                             StatusEvent(status = msg, type = type ))
+                wx.PostEvent(self.parent.parent.parent,
+                             StatusEvent(status=msg, type=type))
 
 class ViewerFrame(wx.Frame):
@@ -825,11 +825,11 @@
 class ViewApp(wx.App):
     def OnInit(self):
-        frame = ViewerFrame(None, -1, 'testView')    
+        frame = ViewerFrame(None, -1, 'testView')
         frame.Show(True)
-        #self.SetTopWindow(frame)
-        
+        # self.SetTopWindow(frame)
+
         return True
-               
-if __name__ == "__main__": 
+
+if __name__ == "__main__":
     app = ViewApp(0)
-    app.MainLoop()     
+    app.MainLoop()
