Index: guiframe/local_perspectives/plotting/SectorSlicer.py
===================================================================
--- guiframe/local_perspectives/plotting/SectorSlicer.py	(revision 116da060bbf6f296e38923afa69076c11d586ba6)
+++ guiframe/local_perspectives/plotting/SectorSlicer.py	(revision e23a20c656aab691c36fdf8621b365f0c0ae81e6)
@@ -27,5 +27,5 @@
         self.markers = []
         self.axes = axes
-        self.qmax = self.base.qmax
+        self.qmax = math.sqrt(2)*self.base.qmax
         self.connect = self.base.connect
         
@@ -37,7 +37,7 @@
         #self.theta3= 2*self.theta2 -self.theta1
         # Inner circle
-        self.main_line = LineInteractor(self, self.base.subplot,color='blue', zorder=zorder, r=self.qmax,
+        self.main_line = LineInteractor(self, self.base.subplot,color='green', zorder=zorder, r=self.qmax,
                                            theta= self.theta2)
-        self.main_line.qmax = self.base.qmax
+        self.main_line.qmax = math.sqrt(2)*self.base.qmax
         #self.left_line = SectionInteractor(self, self.base.subplot, zorder=zorder+1, r=self.qmax,
         #                                   theta1= self.theta1, theta2= self.theta2)
@@ -47,10 +47,10 @@
                                            phi= -1*self.phi,
                                            theta2=self.theta2)
-        self.right_line.qmax = self.base.qmax
-        self.left_line= SideInteractor(self, self.base.subplot,color='green', zorder=zorder,
+        self.right_line.qmax = math.sqrt(2)*self.base.qmax
+        self.left_line= SideInteractor(self, self.base.subplot,color='blue', zorder=zorder,
                                      r=self.qmax,
                                            phi= self.phi,
                                            theta2=self.theta2)
-        self.left_line.qmax = self.base.qmax
+        self.left_line.qmax = math.sqrt(2)*self.base.qmax
         #self.outer_circle.set_cursor(self.base.qmax/1.8, 0)
         
@@ -116,14 +116,14 @@
             print "left line has moved --->"
             self.main_line.update()
-            self.left_line.update(phi=None,delta=None, mline=self.main_line,side=True)
+            self.left_line.update(phi=None,delta=None, mline=self.main_line,side=True, left=True)
             #self.right_line.update(-1*delta,linem=self.main_line,linel=self.left_line)
-            self.right_line.update(phi=-1*self.left_line.phi,delta=None, mline=self.main_line,side=True)
+            self.right_line.update(phi=-1*self.left_line.phi,delta=None, mline=self.main_line,side=True, left=True)
         if self.right_line.has_move:
             print "right line has moved --->"
            
             self.main_line.update()
-            self.right_line.update(phi=None,delta=None, mline=self.main_line,side=True)
+            self.right_line.update(phi=None,delta=None, mline=self.main_line,side=True, right=True)
             #self.right_line.update(-1*delta,linem=self.main_line,linel=self.left_line)
-            self.left_line.update(phi=-1*self.right_line.phi,delta=None, mline=self.main_line,side=True)
+            self.left_line.update(phi=-1*self.right_line.phi,delta=None, mline=self.main_line,side=True, left=True)
    
     
@@ -151,6 +151,7 @@
         phimin = self.right_line.theta+math.pi
         phimax = self.left_line.theta+math.pi
-        #sect = SectorQ(r_min=0.000001, r_max= radius , phi_min=phimin, phi_max=phimax)
-        sect = SectorQ(r_min=-1*radius , r_max= radius , phi_min=phimin, phi_max=phimax)
+
+        sect = SectorQ(r_min=0.000001, r_max= radius , phi_min=phimin, phi_max=phimax)
+        #sect = SectorQ(r_min=-1*radius , r_max= radius , phi_min=phimin, phi_max=phimax)
         if nbins!=None:
             sect.nbins = nbins
@@ -179,5 +180,5 @@
         new_plot.detector =self.base.data2D.detector
         # If the data file does not tell us what the axes are, just assume...
-        new_plot.xaxis("\\rm{Q}", 'rad')
+        new_plot.xaxis("\\rm{Q}", 'A^{-1}')
         new_plot.yaxis("\\rm{Intensity} ","cm^{-1}")
         new_plot.group_id = "SectorQ"+self.base.data2D.name
@@ -219,5 +220,5 @@
         if math.fabs(self.left_line.phi) != math.fabs(self.right_line.phi):
             raise ValueError,"Phi left and phi right are different %f, %f"%(self.left_line.phi, self.right_line.phi)
-        params["left_phi"] = self.left_line.phi
+        params["left_phi"] = math.fabs(self.left_line.phi)
         params["nbins"] = self.nbins
         return params
@@ -301,5 +302,5 @@
         return self.theta - self.save_theta
         
-    def update(self,phi=None,delta=None, mline=None,side=False):
+    def update(self,phi=None,delta=None, mline=None,side=False, left= False, right=False):
         """
         Draw the new roughness on the graph.
@@ -311,8 +312,11 @@
         if delta==None:
             delta = 0
-        if side== True:
+        if side:
             self.theta=  mline.theta + self.phi
+            
+            
         if mline!=None:
             self.theta2 = mline.theta
+            #self.phi= math.fabs(self.theta2 - (self.theta+delta))
         #print "U:for line side theta2, phi, theta",math.degrees(self.theta2),math.degrees(self.phi),math.degrees(self.theta) 
         #if self.theta2 >= self.theta and self.theta>=0:
@@ -355,5 +359,6 @@
         
         self.theta= math.atan2(y,x)
-        self.phi= self.theta2 - self.theta
+        
+        self.phi= math.fabs(self.theta2 - self.theta)
         
         print "move left or right phi ---theta--thetaM", self.phi, self.theta, self.theta2
