Index: sansguiframe/src/sans/guiframe/local_perspectives/plotting/masking.py
===================================================================
--- sansguiframe/src/sans/guiframe/local_perspectives/plotting/masking.py	(revision 046af80876b6b2bcc54f24ba09442f84eee969b4)
+++ sansguiframe/src/sans/guiframe/local_perspectives/plotting/masking.py	(revision bf7ad65fb7f8e9d69d991260cf4bccd57d66161a)
@@ -1,3 +1,5 @@
-
+"""
+    Mask editor
+"""
 ################################################################################
 #This software was developed by the University of Tennessee as part of the
@@ -28,5 +30,4 @@
 from sans.guiframe.dataFitting import Data1D, Data2D
 from boxMask import BoxMask
-from sectorMask import SectorMask
 from sans.guiframe.events import SlicerEvent
 from sans.guiframe.events import StatusEvent
@@ -64,5 +65,5 @@
         """
         """
-        CalcThread.__init__(self,completefn,
+        CalcThread.__init__(self, completefn,
                  updatefn,
                  yieldtime,
@@ -278,5 +279,5 @@
         self.slicer_mask = self.slicer.update() 
 
-    def onOuterSectorMask(self,event=None):
+    def onOuterSectorMask(self, event=None):
         """
         Call Draw Sector Slicer and get mask outside of the sector
@@ -319,5 +320,5 @@
             self.onClearSlicer(event)
         self.slicer_z += 1
-        self.slicer = CircularMask(self,self.subplot,
+        self.slicer = CircularMask(self, self.subplot,
                                    zorder=self.slicer_z, side=False)   
         self.subplot.set_ylim(self.data.ymin, self.data.ymax)
@@ -350,8 +351,8 @@
         Erase new mask from old mask
         """
-        if not self.slicer==None:
+        if not self.slicer == None:
             self.slicer_mask = self.slicer.update()
             mask = self.data.mask
-            mask[self.slicer_mask==False] = True
+            mask[self.slicer_mask == False] = True
             self._check_display_mask(mask, event)
             
@@ -394,31 +395,4 @@
             self.slicer = None
 
-    def _setSlicer(self):
-        """
-        Clear the previous slicer and create a new one.Post an internal
-        event.
-        
-        :param slicer: slicer class to create
-        """
-        ## Clear current slicer
-        if not self.slicer == None:  
-            self.slicer.clear()            
-        ## Create a new slicer    
-        self.slicer_z += 1
-        self.slicer = slicer(self, self.subplot, zorder=self.slicer_z)
-        self.subplot.set_ylim(self.data2D.ymin, self.data2D.ymax)
-        self.subplot.set_xlim(self.data2D.xmin, self.data2D.xmax)
-        ## Draw slicer
-        self.update()
-        self.slicer.update()
-        msg = "Plotter2D._setSlicer  %s"%self.slicer.__class__.__name__
-        wx.PostEvent(self.parent, StatusEvent(status=msg))
-        # Post slicer event
-        event = self._getEmptySlicerEvent()
-        event.type = self.slicer.__class__.__name__
-        event.obj_class = self.slicer.__class__
-        event.params = self.slicer.get_params()
-        wx.PostEvent(self, event)
-   
     def update(self, draw=True):
         """
@@ -440,5 +414,5 @@
         pass
     
-    def _update_mask(self,mask):
+    def _update_mask(self, mask):
         """
         Respond to changes in masking
@@ -460,5 +434,7 @@
         # set temp_data value for self.mask==True, else still None 
         #temp_mask[mask] = temp_data[mask]
-        temp_data.data[mask==False] = temp_mask[mask==False]
+        
+        #TODO: refactor this horrible logic 
+        temp_data.data[mask == False] = temp_mask[mask == False]
         self.plotpanel.clear()
         if self.slicer != None:
@@ -541,4 +517,5 @@
     def OnClose(self, event):
         """
+            Processing close event
         """
         try:
@@ -720,5 +697,5 @@
         self.plots[plot.name] = plot
         #init graph
-        self.gaph = Graph()
+        self.graph = Graph()
         #add plot
         self.graph.add(plot)
@@ -781,5 +758,5 @@
             pass
         else:
-           self.subplot.figure.canvas.draw_idle() 
+            self.subplot.figure.canvas.draw_idle() 
         
         msg = 'Plotting Completed.'
@@ -794,5 +771,5 @@
         
         id = wx.NewId()
-        slicerpop.Append(id,'&Print Image', 'Print image')
+        slicerpop.Append(id, '&Print Image', 'Print image')
         wx.EVT_MENU(self, id, self.onPrint)
 
