Index: sansview/perspectives/fitting/fitpage1D.py
===================================================================
--- sansview/perspectives/fitting/fitpage1D.py	(revision 3e8e627c2754c11d04b2cc1cb673306e48734f8e)
+++ sansview/perspectives/fitting/fitpage1D.py	(revision 888e62c7c7563fbd40a6aad40263e36508a6b2b7)
@@ -195,7 +195,7 @@
             self.qmin_x= self.data.xmin
             self.qmax_x= self.data.xmax           
-            #print "data2D range",self.qmax_x
-        
-            self.num_points= 100
+            print "data2D range",self.qmax_x
+        
+        self.num_points= 100
          
         
@@ -306,5 +306,5 @@
                             if self.data.y_bins[j]>= self.qmin_x and self.data.y_bins[j]<= self.qmax_x:
                                 res.append( (self.data.data[j][i]- self.model.runXY(\
-                                 [self.data.y_bins[j],self.data.x_bins[i]]))\
+                                 [self.data.x_bins[i],self.data.y_bins[j]]))\
                                     /self.data.err_data[j][i] )
                 sum=0
Index: sansview/perspectives/fitting/fitpanel.py
===================================================================
--- sansview/perspectives/fitting/fitpanel.py	(revision 94999eb62566bdc5b297431509bc8734a75252f5)
+++ sansview/perspectives/fitting/fitpanel.py	(revision 888e62c7c7563fbd40a6aad40263e36508a6b2b7)
@@ -62,8 +62,8 @@
     def onClosePage(self, event):
         self.ToggleWindowStyle(wx.aui.AUI_NB_CLOSE_ON_ACTIVE_TAB)
-        print "went here",self.get_current_page(), self.GetPage(0)
+        #print "went here",self.get_current_page(), self.GetPage(0)
         #event.Skip()
         if self.GetPageCount() <= 2:
-            print "wente here"
+            #print "wente here"
             
             # Prevent last tab from being closed
@@ -133,5 +133,5 @@
         """
         from modelpage import ModelPage
-        print "fitpanel model", model
+        #print "fitpanel model", model
         panel = ModelPage(self,model,page_title, -1)
         panel.set_manager(self.manager)
@@ -184,5 +184,5 @@
              selected on that page. remove its reference into page_finder (fitting module)
         """
-        print "model page", page_number, page
+        #print "model page", page_number, page
         if page!=None and page_number!=None:
             
Index: sansview/perspectives/fitting/fitproblem.py
===================================================================
--- sansview/perspectives/fitting/fitproblem.py	(revision 08b9c6c8ba9d8d6475482f93cc09a6829f108e9a)
+++ sansview/perspectives/fitting/fitproblem.py	(revision 888e62c7c7563fbd40a6aad40263e36508a6b2b7)
@@ -26,5 +26,5 @@
     def set_smearer(self, smearer):
         self.smearer= smearer
-        print "smeaerer in fitproblem",self.smearer
+        #print "smeaerer in fitproblem",self.smearer
     def get_smearer(self):
         return self.smearer
Index: sansview/perspectives/fitting/fitting.py
===================================================================
--- sansview/perspectives/fitting/fitting.py	(revision 17fc6f8aad8b78dda916318a1d702008f40d961f)
+++ sansview/perspectives/fitting/fitting.py	(revision 888e62c7c7563fbd40a6aad40263e36508a6b2b7)
@@ -135,4 +135,5 @@
         self.index_model = 0
         self.parent.Bind(EVT_SLICER_PANEL, self._on_slicer_event)
+       
         
         #create the fitting panel
@@ -141,17 +142,22 @@
         self.mypanels.append(self.fit_panel)
         return self.mypanels
+    
+    
     def _on_model2D_show(self, event ):
         print "model2D get the id ", event.id
+        
+        
     def _on_slicer_event(self, event):
         print "fitting:slicer event ", event.panel
-        new_panel = event.panel
-        # Set group ID if available
-        event_id = self.parent.popup_panel(new_panel)
-        self.menu1.Append(event_id, new_panel.window_caption, 
-                         "Show %s plot panel" % new_panel.window_caption)
-        # Set UID to allow us to reference the panel later
-        new_panel.uid = event_id
-        new_panel
-        self.mypanels.append(new_panel) 
+        if event.panel!=None:
+            new_panel = event.panel
+            # Set group ID if available
+            event_id = self.parent.popup_panel(new_panel)
+            self.menu1.Append(event_id, new_panel.window_caption, 
+                             "Show %s plot panel" % new_panel.window_caption)
+            # Set UID to allow us to reference the panel later
+            new_panel.uid = event_id
+            new_panel
+            self.mypanels.append(new_panel) 
         return        
     def _on_show_panel(self, event):
@@ -375,5 +381,5 @@
                     #Do the single fit
                     self.fitter.set_model(Model(model), self.id, pars) 
-                    print "args...:",metadata,self.id,smearer,qmin,qmax,ymin,ymax
+                    #print "args...:",metadata,self.id,smearer,qmin,qmax,ymin,ymax
                   
                     self.fitter.set_data(data=metadata,Uid=self.id,
@@ -468,5 +474,4 @@
                           
                     self.fitter.set_model(new_model, self.id, pars) 
-                    
                     self.fitter.set_data(metadata,self.id,qmin,qmax,ymin,ymax)
                     self.fitter.select_problem_for_fit(Uid=self.id,value=value.get_scheduled())
@@ -642,9 +647,9 @@
                 xmin=data.xmin
                 xmax=data.xmax
-                print " q range =",    
+                #print " q range =",    
                 theory.data = numpy.zeros((len(data.y_bins),len(data.x_bins)))
-                for j in range(len(data.y_bins)):
-                    if data.y_bins[j]>= ymin and data.y_bins[j]<= ymax:
-                        for i in range(len(data.x_bins)):
+                for i in range(len(data.y_bins)):
+                    if data.y_bins[i]>= ymin and data.y_bins[i]<= ymax:
+                        for j in range(len(data.x_bins)):
                             if data.x_bins[i]>= qmin and data.x_bins[i]<= qmax:
                                 theory.data[j][i]=model.runXY([data.y_bins[j],data.x_bins[i]])
Index: sansview/perspectives/fitting/modelpage.py
===================================================================
--- sansview/perspectives/fitting/modelpage.py	(revision bb1e07a359f1197e91f0b443f01e6e8c88e21922)
+++ sansview/perspectives/fitting/modelpage.py	(revision 888e62c7c7563fbd40a6aad40263e36508a6b2b7)
@@ -269,9 +269,10 @@
             else:
                 if self.data !=None and self.model !=None: # allow to recognize data panel from model panel
+                #if self.data !=None and self.model !=None:
                     self.cb1.SetValue(False)
                     self.select_all_param_helper()
                 
-                    self.populate_disp_box()
-                    self.set_panel_dispers(self.disp_list)
+                self.populate_disp_box()
+                self.set_panel_dispers(self.disp_list)
                 
         else:
Index: sansview/perspectives/fitting/simfitpage.py
===================================================================
--- sansview/perspectives/fitting/simfitpage.py	(revision 6bcdad180ced0a30920cebfc41f2c610d8297ba6)
+++ sansview/perspectives/fitting/simfitpage.py	(revision 888e62c7c7563fbd40a6aad40263e36508a6b2b7)
@@ -146,5 +146,5 @@
              @param delpage: the page removed
         """
-        print "self.model_list",self.model_list
+        #print "self.model_list",self.model_list
        
         self.model_list=[]
@@ -214,5 +214,5 @@
                 model=list[0]
                 param_list=model.getParamList()
-                print "simfitpage: on set_model self.params ",self.params
+                #print "simfitpage: on set_model self.params ",self.params
                 if self.params !=[]:
                     for element in self.params:
@@ -220,7 +220,7 @@
                             for item in param_list:
                                 if item==str(element[1]):
-                                    print "simfitpage: on set_model page 1",param_list
-                                    print "simfitpage: model name",element[0], model.name
-                                    print "simfitpage: param name ,param value",element[1],element[2]
+                                    #print "simfitpage: on set_model page 1",param_list
+                                    #print "simfitpage: model name",element[0], model.name
+                                    #print "simfitpage: param name ,param value",element[1],element[2]
                                     self.manager.set_page_finder(model.name,element[1],\
                                                                  str(element[2]))
@@ -271,5 +271,5 @@
                 param_name=param_names[1]
                 ##### just added
-                print "simfitpage: param name",model_name,param_name
+                #print "simfitpage: param name",model_name,param_name
             
                 param=[str(model_name),param_name,str(param_value)]
