Index: fittingview/src/sans/perspectives/fitting/basepage.py
===================================================================
--- fittingview/src/sans/perspectives/fitting/basepage.py	(revision 2e95da448014fce736e91c4eb4535deff8762db4)
+++ fittingview/src/sans/perspectives/fitting/basepage.py	(revision 55bb249cfad78559bfe82310564af7e4a22b6b1a)
@@ -869,5 +869,8 @@
         self.state.qmax_x = self.qmax_x
         self.state.qmin_x = self.qmin_x
-      
+        self.state.dI_noweight = copy.deepcopy(self.dI_noweight.GetValue())
+        self.state.dI_didata = copy.deepcopy(self.dI_didata.GetValue())
+        self.state.dI_sqrdata = copy.deepcopy(self.dI_sqrdata.GetValue())
+        self.state.dI_idata = copy.deepcopy(self.dI_idata.GetValue())
         if hasattr(self,"enable_disp"):
             self.state.enable_disp= self.enable_disp.GetValue()
@@ -950,5 +953,8 @@
                                 copy.deepcopy(self.pinhole_smearer.GetValue())
         self.state.slit_smearer = copy.deepcopy(self.slit_smearer.GetValue())  
-            
+        self.state.dI_noweight = copy.deepcopy(self.dI_noweight.GetValue())
+        self.state.dI_didata = copy.deepcopy(self.dI_didata.GetValue())
+        self.state.dI_sqrdata = copy.deepcopy(self.dI_sqrdata.GetValue())
+        self.state.dI_idata = copy.deepcopy(self.dI_idata.GetValue())  
         if hasattr(self,"disp_box"):
             self.state.disp_box = self.disp_box.GetCurrentSelection()
@@ -1088,4 +1094,10 @@
         self.pinhole_smearer.SetValue(state.pinhole_smearer)
         self.slit_smearer.SetValue(state.slit_smearer)
+        
+        self.dI_noweight.SetValue(state.dI_noweight)
+        self.dI_didata.SetValue(state.dI_didata)
+        self.dI_sqrdata.SetValue(state.dI_sqrdata)
+        self.dI_idata.SetValue(state.dI_idata)
+        
         ## we have two more options for smearing
         if self.pinhole_smearer.GetValue(): self.onPinholeSmear(event=None)
@@ -1205,8 +1217,15 @@
         self.pinhole_smearer.SetValue(state.pinhole_smearer)
         self.slit_smearer.SetValue(state.slit_smearer)
+        
+        self.dI_noweight.SetValue(state.dI_noweight)
+        self.dI_didata.SetValue(state.dI_didata)
+        self.dI_sqrdata.SetValue(state.dI_sqrdata)
+        self.dI_idata.SetValue(state.dI_idata)
+        
+        
         ## we have two more options for smearing
         if self.pinhole_smearer.GetValue(): self.onPinholeSmear(event=None)
         elif self.slit_smearer.GetValue(): self.onSlitSmear(event=None)
-       
+        
         ## reset state of checkbox,textcrtl  and dispersity parameters value
         self._reset_parameters_state(self.fittable_param,state.fittable_param)
@@ -1766,4 +1785,5 @@
                 if not self.disable_smearer.GetValue():
                     temp_smear= self.current_smearer
+            weight = self.get_weight()
             toggle_mode_on = self.model_view.IsEnabled()
             self._manager.draw_model(self.model, 
@@ -1776,5 +1796,6 @@
                                     state = self.state,
                                     enable2D=self.enable2D,
-                                    update_chisqr=update_chisqr)
+                                    update_chisqr=update_chisqr,
+                                    weight=weight)
         
        
Index: fittingview/src/sans/perspectives/fitting/fitpage.py
===================================================================
--- fittingview/src/sans/perspectives/fitting/fitpage.py	(revision 2c60cb69e9aad7131bd17ba60e8de561ec2a7d5d)
+++ fittingview/src/sans/perspectives/fitting/fitpage.py	(revision 55bb249cfad78559bfe82310564af7e4a22b6b1a)
@@ -47,4 +47,5 @@
         self.is_2D = None
         self.fit_started = False
+        self.weightbt_string = None
         # get smear info from data
         self._get_smear_info()
@@ -185,7 +186,10 @@
         smear_message_none  =  "No smearing is selected..."
         smear_message_dqdata  =  "The dQ data is being used for smearing..."
-        smear_message_2d  =  "Higher accuracy is very time-expensive. Use it with care..."
-        smear_message_new_ssmear  =  "Please enter only the value of interest to customize smearing..."
-        smear_message_new_psmear  =  "Please enter both; the dQ will be generated by interpolation..."
+        smear_message_2d  =  \
+              "Higher accuracy is very time-expensive. Use it with care..."
+        smear_message_new_ssmear  = \
+              "Please enter only the value of interest to customize smearing..."
+        smear_message_new_psmear  = \
+              "Please enter both; the dQ will be generated by interpolation..."
         smear_message_2d_x_title = "<dQp>[1/A]:"
         smear_message_2d_y_title = "<dQs>[1/A]:"        
@@ -207,13 +211,51 @@
         smear_set_box= wx.StaticBox(self, -1,'Set Instrumental Smearing')
         sizer_smearer_box = wx.StaticBoxSizer(smear_set_box, wx.HORIZONTAL)
-        sizer_smearer_box.SetMinSize((_DATA_BOX_WIDTH,85))
+        sizer_smearer_box.SetMinSize((_DATA_BOX_WIDTH, 60))
+        
+        weighting_set_box= wx.StaticBox(self, -1,\
+                                'Set Weighting by Selecting dI Source')
+        weighting_box = wx.StaticBoxSizer(weighting_set_box, wx.HORIZONTAL)
+        sizer_weighting = wx.BoxSizer(wx.HORIZONTAL)
+        weighting_box.SetMinSize((_DATA_BOX_WIDTH, 40))
+        #Filling the sizer containing weighting info.
+        self.dI_noweight = wx.RadioButton(self, -1, 'No Weighting', 
+                                          style=wx.RB_GROUP)
+        self.dI_didata = wx.RadioButton(self, -1, 'Use dI Data')
+        self.dI_sqrdata = wx.RadioButton(self, -1, 'Use |sqrt(I Data)|')
+        self.dI_idata = wx.RadioButton(self, -1, 'Use |I Data|')
+        self.Bind(wx.EVT_RADIOBUTTON, self.onWeighting, 
+                  id=self.dI_noweight.GetId())
+        self.Bind(wx.EVT_RADIOBUTTON, self.onWeighting, 
+                  id=self.dI_didata.GetId())
+        self.Bind(wx.EVT_RADIOBUTTON, self.onWeighting, 
+                  id=self.dI_sqrdata.GetId())
+        self.Bind(wx.EVT_RADIOBUTTON, self.onWeighting, 
+                  id=self.dI_idata.GetId())
+        self.dI_didata.SetValue(True)
+        # add 4 types of weighting to the sizer
+        sizer_weighting.Add( self.dI_noweight,0, wx.LEFT, 10)
+        sizer_weighting.Add((14,10))
+        sizer_weighting.Add( self.dI_didata)
+        sizer_weighting.Add((14,10))
+        sizer_weighting.Add( self.dI_sqrdata) 
+        sizer_weighting.Add((14,10))
+        sizer_weighting.Add( self.dI_idata) 
+        sizer_weighting.Add((10,10))  
+        self.dI_noweight.Enable(False)
+        self.dI_didata.Enable(False)
+        self.dI_sqrdata.Enable(False)
+        self.dI_idata.Enable(False)
+        weighting_box.Add(sizer_weighting)
+        
         sizer_fit = wx.GridSizer(2, 4, 2, 6)
         
         # combobox for smear2d accuracy selection
-        self.smear_accuracy = wx.ComboBox(self, -1,size=(50,-1),style=wx.CB_READONLY)
+        self.smear_accuracy = wx.ComboBox(self, -1,size=(50,-1),
+                                          style=wx.CB_READONLY)
         self._set_accuracy_list()
         self.smear_accuracy.SetValue(self.smear2d_accuracy)
         self.smear_accuracy.SetSelection(0)
-        self.smear_accuracy.SetToolTipString("'Higher' uses more Gaussian points for smearing computation.")
+        self.smear_accuracy.SetToolTipString(\
+            "'Higher' uses more Gaussian points for smearing computation.")
                    
         wx.EVT_COMBOBOX(self.smear_accuracy,-1, self._on_select_accuracy)
@@ -226,17 +268,23 @@
         
         #textcntrl for custom resolution
-        self.smear_pinhole_max = self.ModelTextCtrl(self, -1,size=(_BOX_WIDTH-25,20),style=wx.TE_PROCESS_ENTER,
-                                            text_enter_callback = self.onPinholeSmear)
-        self.smear_pinhole_min = self.ModelTextCtrl(self, -1,size=(_BOX_WIDTH-25,20),style=wx.TE_PROCESS_ENTER,
-                                            text_enter_callback = self.onPinholeSmear)
-        self.smear_slit_height= self.ModelTextCtrl(self, -1,size=(_BOX_WIDTH-25,20),style=wx.TE_PROCESS_ENTER,
-                                            text_enter_callback = self.onSlitSmear)
-        self.smear_slit_width = self.ModelTextCtrl(self, -1,size=(_BOX_WIDTH-25,20),style=wx.TE_PROCESS_ENTER,
-                                            text_enter_callback = self.onSlitSmear)
+        self.smear_pinhole_max = self.ModelTextCtrl(self, -1,
+                            size=(_BOX_WIDTH-25,20),style=wx.TE_PROCESS_ENTER,
+                            text_enter_callback = self.onPinholeSmear)
+        self.smear_pinhole_min = self.ModelTextCtrl(self, -1,
+                            size=(_BOX_WIDTH-25,20),style=wx.TE_PROCESS_ENTER,
+                            text_enter_callback = self.onPinholeSmear)
+        self.smear_slit_height= self.ModelTextCtrl(self, -1,
+                            size=(_BOX_WIDTH-25,20),style=wx.TE_PROCESS_ENTER,
+                            text_enter_callback = self.onSlitSmear)
+        self.smear_slit_width = self.ModelTextCtrl(self, -1,
+                            size=(_BOX_WIDTH-25,20),style=wx.TE_PROCESS_ENTER,
+                            text_enter_callback = self.onSlitSmear)
 
         ## smear
-        self.smear_data_left= BGTextCtrl(self, -1, size=(_BOX_WIDTH-25,20), style=0)
+        self.smear_data_left= BGTextCtrl(self, -1, 
+                                        size=(_BOX_WIDTH-25,20), style=0)
         self.smear_data_left.SetValue(str(self.dq_l))
-        self.smear_data_right = BGTextCtrl(self, -1, size=(_BOX_WIDTH-25,20), style=0)
+        self.smear_data_right = BGTextCtrl(self, -1, 
+                                        size=(_BOX_WIDTH-25,20), style=0)
         self.smear_data_right.SetValue(str(self.dq_r))
 
@@ -248,15 +296,25 @@
 
         #Filling the sizer containing instruments smearing info.
-        self.disable_smearer = wx.RadioButton(self, -1, 'None', style=wx.RB_GROUP)
-        self.enable_smearer = wx.RadioButton(self, -1, 'Use dQ Data')
-        #self.enable_smearer.SetToolTipString("Click to use the loaded dQ data for smearing.")
-        self.pinhole_smearer = wx.RadioButton(self, -1, 'Custom Pinhole Smear')
-        #self.pinhole_smearer.SetToolTipString("Click to input custom resolution for pinhole smearing.")
+        self.disable_smearer = wx.RadioButton(self, -1, 
+                                              'None', style=wx.RB_GROUP)
+        self.enable_smearer = wx.RadioButton(self, -1, 
+                                             'Use dQ Data')
+        #self.enable_smearer.SetToolTipString(
+        #"Click to use the loaded dQ data for smearing.")
+        self.pinhole_smearer = wx.RadioButton(self, -1, 
+                                              'Custom Pinhole Smear')
+        #self.pinhole_smearer.SetToolTipString
+        #("Click to input custom resolution for pinhole smearing.")
         self.slit_smearer = wx.RadioButton(self, -1, 'Custom Slit Smear')
-        #self.slit_smearer.SetToolTipString("Click to input custom resolution for slit smearing.")
-        self.Bind(wx.EVT_RADIOBUTTON, self.onSmear, id=self.disable_smearer.GetId())
-        self.Bind(wx.EVT_RADIOBUTTON, self.onSmear, id=self.enable_smearer.GetId())
-        self.Bind(wx.EVT_RADIOBUTTON, self.onPinholeSmear, id=self.pinhole_smearer.GetId())
-        self.Bind(wx.EVT_RADIOBUTTON, self.onSlitSmear, id=self.slit_smearer.GetId())
+        #self.slit_smearer.SetToolTipString
+        #("Click to input custom resolution for slit smearing.")
+        self.Bind(wx.EVT_RADIOBUTTON, self.onSmear, 
+                  id=self.disable_smearer.GetId())
+        self.Bind(wx.EVT_RADIOBUTTON, self.onSmear, 
+                  id=self.enable_smearer.GetId())
+        self.Bind(wx.EVT_RADIOBUTTON, self.onPinholeSmear, 
+                  id=self.pinhole_smearer.GetId())
+        self.Bind(wx.EVT_RADIOBUTTON, self.onSlitSmear, 
+                  id=self.slit_smearer.GetId())
         self.disable_smearer.SetValue(True)
         
@@ -277,5 +335,6 @@
         self.Npts_fit.SetToolTipString(\
                             " Npts : number of points selected for fitting")
-        self.Npts_total  =  self.ModelTextCtrl(self, -1, size=(_BOX_WIDTH, 20), 
+        self.Npts_total  =  self.ModelTextCtrl(self, -1, 
+                        size=(_BOX_WIDTH, 20), 
                         style=wx.TE_PROCESS_ENTER, 
                         text_enter_callback=self._onQrangeEnter)
@@ -326,13 +385,21 @@
                          smear_message_new_ssmear, style=wx.ALIGN_LEFT)
         self.smear_message_new_p = wx.StaticText(self, -1,
-                                 smear_message_new_psmear , style=wx.ALIGN_LEFT)
-        self.smear_description_2d_x     =  wx.StaticText(self, -1, smear_message_2d_x_title  , style=wx.ALIGN_LEFT)
-        self.smear_description_2d_x.SetToolTipString("  dQp(parallel) in q_r direction.")
-        self.smear_description_2d_y     =  wx.StaticText(self, -1, smear_message_2d_y_title  , style=wx.ALIGN_LEFT)
-        self.smear_description_2d_y.SetToolTipString(" dQs(perpendicular) in q_phi direction.")
-        self.smear_description_pin_min     =  wx.StaticText(self, -1, smear_message_pinhole_min_title  , style=wx.ALIGN_LEFT)
-        self.smear_description_pin_max     =  wx.StaticText(self, -1, smear_message_pinhole_max_title  , style=wx.ALIGN_LEFT)
-        self.smear_description_slit_height    =  wx.StaticText(self, -1, smear_message_slit_height_title   , style=wx.ALIGN_LEFT)
-        self.smear_description_slit_width    =  wx.StaticText(self, -1, smear_message_slit_width_title   , style=wx.ALIGN_LEFT)
+                            smear_message_new_psmear , style=wx.ALIGN_LEFT)
+        self.smear_description_2d_x     =  wx.StaticText(self, -1, 
+                            smear_message_2d_x_title  , style=wx.ALIGN_LEFT)
+        self.smear_description_2d_x.SetToolTipString(\
+                                        "  dQp(parallel) in q_r direction.")
+        self.smear_description_2d_y     =  wx.StaticText(self, -1, 
+                            smear_message_2d_y_title  , style=wx.ALIGN_LEFT)
+        self.smear_description_2d_y.SetToolTipString(\
+                                    " dQs(perpendicular) in q_phi direction.")
+        self.smear_description_pin_min     =  wx.StaticText(self, -1, 
+                        smear_message_pinhole_min_title  , style=wx.ALIGN_LEFT)
+        self.smear_description_pin_max     =  wx.StaticText(self, -1, 
+                        smear_message_pinhole_max_title  , style=wx.ALIGN_LEFT)
+        self.smear_description_slit_height    =  wx.StaticText(self, -1, 
+                        smear_message_slit_height_title   , style=wx.ALIGN_LEFT)
+        self.smear_description_slit_width    =  wx.StaticText(self, -1, 
+                        smear_message_slit_width_title   , style=wx.ALIGN_LEFT)
         
         #arrange sizers 
@@ -340,23 +407,38 @@
         self.sizer_set_smearer.Add(sizer_smearer )
         self.sizer_set_smearer.Add((10,10))
-        self.sizer_set_smearer.Add( self.smear_description_none,0, wx.CENTER, 10 ) 
-        self.sizer_set_smearer.Add( self.smear_description_dqdata,0, wx.CENTER, 10 )
-        self.sizer_set_smearer.Add( self.smear_description_2d,0, wx.CENTER, 10 )
-        self.sizer_new_smear.Add( self.smear_description_type,0, wx.CENTER, 10 )
-        self.sizer_new_smear.Add( self.smear_description_accuracy_type,0, wx.CENTER, 10 )
+        self.sizer_set_smearer.Add( self.smear_description_none,
+                                    0, wx.CENTER, 10 ) 
+        self.sizer_set_smearer.Add( self.smear_description_dqdata,
+                                    0, wx.CENTER, 10 )
+        self.sizer_set_smearer.Add( self.smear_description_2d,
+                                    0, wx.CENTER, 10 )
+        self.sizer_new_smear.Add( self.smear_description_type,
+                                  0, wx.CENTER, 10 )
+        self.sizer_new_smear.Add( self.smear_description_accuracy_type,
+                                  0, wx.CENTER, 10 )
         self.sizer_new_smear.Add( self.smear_accuracy )
-        self.sizer_new_smear.Add( self.smear_description_smear_type,0, wx.CENTER, 10 )
+        self.sizer_new_smear.Add( self.smear_description_smear_type,
+                                  0, wx.CENTER, 10 )
         self.sizer_new_smear.Add((15,-1))
-        self.sizer_new_smear.Add( self.smear_description_2d_x,0, wx.CENTER, 10 )
-        self.sizer_new_smear.Add( self.smear_description_pin_min,0, wx.CENTER, 10 )
-        self.sizer_new_smear.Add( self.smear_description_slit_height,0, wx.CENTER, 10 )
-
-        self.sizer_new_smear.Add( self.smear_pinhole_min,0, wx.CENTER, 10 )
-        self.sizer_new_smear.Add( self.smear_slit_height,0, wx.CENTER, 10 )
-        self.sizer_new_smear.Add( self.smear_data_left,0, wx.CENTER, 10 )
+        self.sizer_new_smear.Add( self.smear_description_2d_x,
+                                  0, wx.CENTER, 10 )
+        self.sizer_new_smear.Add( self.smear_description_pin_min,
+                                  0, wx.CENTER, 10 )
+        self.sizer_new_smear.Add( self.smear_description_slit_height,
+                                  0, wx.CENTER, 10 )
+
+        self.sizer_new_smear.Add( self.smear_pinhole_min,
+                                  0, wx.CENTER, 10 )
+        self.sizer_new_smear.Add( self.smear_slit_height,
+                                  0, wx.CENTER, 10 )
+        self.sizer_new_smear.Add( self.smear_data_left,
+                                  0, wx.CENTER, 10 )
         self.sizer_new_smear.Add((20,-1))
-        self.sizer_new_smear.Add( self.smear_description_2d_y,0, wx.CENTER, 10 )
-        self.sizer_new_smear.Add( self.smear_description_pin_max,0, wx.CENTER, 10 )
-        self.sizer_new_smear.Add( self.smear_description_slit_width,0, wx.CENTER, 10 )
+        self.sizer_new_smear.Add( self.smear_description_2d_y,
+                                  0, wx.CENTER, 10 )
+        self.sizer_new_smear.Add( self.smear_description_pin_max,
+                                  0, wx.CENTER, 10 )
+        self.sizer_new_smear.Add( self.smear_description_slit_width,
+                                  0, wx.CENTER, 10 )
 
         self.sizer_new_smear.Add( self.smear_pinhole_max,0, wx.CENTER, 10 )
@@ -370,6 +452,8 @@
         
         # add all to chi2 sizer 
-        sizer_smearer_box.Add(self.sizer_set_smearer)       
+        sizer_smearer_box.Add(self.sizer_set_smearer)    
         sizer_chi2.Add(sizer_smearer_box)
+        sizer_chi2.Add((-1,5))
+        sizer_chi2.Add(weighting_box) 
         sizer_chi2.Add((-1,5))
         
@@ -1024,4 +1108,7 @@
         self._manager._reset_schedule_problem(value=0, uid=self.uid)
         self._manager.schedule_for_fit(uid=self.uid,value=1) 
+        self._manager.set_fit_weight(uid=self.uid, 
+                                     weight=self.get_weight(),
+                                     is2d = self.is_2D)
         self._manager.set_fit_range(uid=self.uid,qmin=self.qmin_x, 
                                    qmax=self.qmax_x)
@@ -1031,5 +1118,32 @@
         self.bind_fit_button()
            
-   
+    def get_weight(self):
+        """
+        Get weighting dI data
+        """
+        button_list = [self.dI_noweight,
+                       self.dI_didata,
+                       self.dI_sqrdata,
+                       self.dI_idata]
+        if self.is_2D:
+            dy_data = self.data.err_data 
+            data = self.data.data
+        else:
+            dy_data = self.data.dy
+            data = self.data.y
+        dy = dy_data
+        for item in button_list:
+            if item.GetValue():
+                if button_list.index(item) == 0:
+                    dy = numpy.ones_like(dy_data)
+                elif button_list.index(item) == 1:
+                    dy = dy_data
+                elif button_list.index(item) == 2:
+                    dy = numpy.sqrt(data)
+                elif button_list.index(item) == 3:
+                    dy = data
+                break
+        return dy
+                
     def bind_fit_button(self):
         """
@@ -1735,8 +1849,32 @@
                 self.pinhole_smearer.Enable(True) 
                 self.default_mask = copy.deepcopy(self.data.mask)
+                if self.data.err_data == None or\
+                        (self.data.err_data == 1).all() or\
+                        (self.data.err_data == 0).all():
+                    self.dI_didata.Enable(False)
+                    self.dI_noweight.SetValue(True)
+                    self.weightbt_string = self.dI_noweight.GetLabelText()
+                else:
+                    self.dI_didata.Enable(True)
+                    self.dI_didata.SetValue(True)
+                    self.weightbt_string = self.dI_didata.GetLabelText()
             else:
                 self.slit_smearer.Enable(True) 
-                self.pinhole_smearer.Enable(True)      
-                
+                self.pinhole_smearer.Enable(True) 
+                if self.data.dy == None or\
+                     (self.data.dy == 1).all() or\
+                     (self.data.dy == 0).all():
+                    self.dI_didata.Enable(False)
+                    self.dI_noweight.SetValue(True)
+                    self.weightbt_string = self.dI_noweight.GetLabelText()
+                else:
+                    self.dI_didata.Enable(True)
+                    self.dI_didata.SetValue(True)
+                    self.weightbt_string = self.dI_didata.GetLabelText()
+            # Enable weighting radio uttons     
+            self.dI_noweight.Enable(True)   
+            self.dI_sqrdata.Enable(True)
+            self.dI_idata.Enable(True)
+              
             self.formfactorbox.Enable()
             self.structurebox.Enable()
@@ -2010,5 +2148,11 @@
         #msg = "Fit completed!dddd "
         #wx.PostEvent(self._manager.parent, StatusEvent(status=msg))
-
+    
+    def onWeighting(self, event):
+        """
+        On Weighting radio button event, sets the weightbt_string
+        """
+        self.weightbt_string = event.GetEventObject().GetLabelText()
+    
     def onPinholeSmear(self, event):
         """
Index: fittingview/src/sans/perspectives/fitting/fitpanel.py
===================================================================
--- fittingview/src/sans/perspectives/fitting/fitpanel.py	(revision aefc09fb73c7b87b9a616ff34ce30b1ad4045519)
+++ fittingview/src/sans/perspectives/fitting/fitpanel.py	(revision 55bb249cfad78559bfe82310564af7e4a22b6b1a)
@@ -326,10 +326,10 @@
         if self.batch_on:
             self.batch_page_index += 1
-            caption = "BatchPage " + str(self.batch_page_index)
+            caption = "BatchPage" + str(self.batch_page_index)
             panel.set_index_model(self.batch_page_index)
         else:
             #Increment index of fit page
             self.fit_page_index += 1
-            caption = "FitPage " + str(self.fit_page_index)
+            caption = "FitPage" + str(self.fit_page_index)
             panel.set_index_model(self.fit_page_index)
         panel.populate_box(dict=self.model_list_box)
Index: fittingview/src/sans/perspectives/fitting/fitproblem.py
===================================================================
--- fittingview/src/sans/perspectives/fitting/fitproblem.py	(revision 3e3ab46e8a8026694117dce4a72941ae4106aad0)
+++ fittingview/src/sans/perspectives/fitting/fitproblem.py	(revision 55bb249cfad78559bfe82310564af7e4a22b6b1a)
@@ -87,4 +87,12 @@
         """
         :return: fitting range
+        """
+    def set_weight(self, weight=None):
+        """
+        set fitting range 
+        """
+    def get_weight(self):
+        """
+        get fitting weight
         """
     def clear_model_param(self):
@@ -257,5 +265,5 @@
                 self[d.id].set_model(self.model)
                 self[d.id].set_range(self.qmin, self.qmax)
-          
+                #self[d.id].set_smearer(self[d.id].get_smearer())
     def get_fit_data(self, fid):
         """
@@ -322,5 +330,22 @@
             return self[fid].get_range()
         
-    
+    def set_weight(self, weight, is2d, fid=None):
+        """
+        fit weight
+        """
+        if fid is None:
+            for value in self.itervalues():
+                value.set_weight(weight, is2d)
+        else:
+            if fid in self.iterkeys():
+                self[fid].value.set_weight(weight, is2d)
+                
+    def get_weight(self, fid=None):
+        """
+        return fit weight
+        """
+        if fid in self.iterkeys():
+            return self[fid].get_weight()
+                 
     def clear_model_param(self, fid=None):
         """
@@ -381,4 +406,6 @@
         self.qmin = None
         self.qmax = None
+        # fit weight
+        self.weight = None
         
         
@@ -459,5 +486,5 @@
         :param data: list of data selected
         """
-        self.fit_data = data
+        self.fit_data = copy.deepcopy(data)
             
     def get_fit_data(self):
@@ -467,4 +494,20 @@
         return self.fit_data
     
+    def set_weight(self, weight, is2d):
+        """
+        Set weight array
+        """
+        self.weight = weight
+        if is2d:
+            self.fit_data.err_data = self.weight
+        else:
+            self.fit_data.dy = self.weight
+
+    def get_weight(self):
+        """
+        returns weight array
+        """
+        return self.weight
+        
     def set_model_param(self,name,value=None):
         """ 
Index: fittingview/src/sans/perspectives/fitting/fitting.py
===================================================================
--- fittingview/src/sans/perspectives/fitting/fitting.py	(revision 53cf669565d119071be47e3aea06357a6e6b9fc9)
+++ fittingview/src/sans/perspectives/fitting/fitting.py	(revision 55bb249cfad78559bfe82310564af7e4a22b6b1a)
@@ -69,4 +69,5 @@
         self.fit_thread_list = {}
         self.residuals = None
+        self.weight = None
         self.fit_panel = None
         # Start with a good default
@@ -430,5 +431,17 @@
         """
         self.state_reader.write(filename=filepath, fitstate=fitstate)
-        
+
+    def set_fit_weight(self, uid, weight, is2d=False, fid=None):
+        """
+        Set the fit weights of a given page for all
+        its data by default. If fid is provide then set the range 
+        only for the data with fid as id
+        :param uid: id corresponding to a fit page
+        :param fid: id corresponding to a fit problem (data, model)
+        :param weight: current dy data
+        """
+        if uid in self.page_finder.keys():
+            self.page_finder[uid].set_weight(weight=weight, is2d=is2d)
+                    
     def set_fit_range(self, uid, qmin, qmax, fid=None):
         """
@@ -582,5 +595,5 @@
             self.draw_model(model=model, data=data, page_id=uid, smearer=smear,
                 enable1D=enable1D, enable2D=enable2D,
-                qmin=qmin, qmax=qmax)
+                qmin=qmin, qmax=qmax, weight=None)
             self._mac_sleep(0.2)
             
@@ -597,5 +610,5 @@
                    toggle_mode_on=False,
                    qmin=None, qmax=None, 
-                   update_chisqr=True):
+                   update_chisqr=True, weight=None):
         """
         Draw model.
@@ -613,4 +626,5 @@
              
         """
+        self.weight = weight
         if issubclass(data.__class__, Data1D) or not enable2D:    
             ## draw model 1D with no loaded data
@@ -1429,4 +1443,6 @@
         instead of calling expansive CalcChisqr in guithread
         """
+        data = deepcopy(data)
+        
         # default chisqr
         chisqr = None
@@ -1440,4 +1456,6 @@
             if index == None: 
                 index = numpy.ones(len(data.data),ntype=bool)
+            if self.weight != None:
+                data.err_data = self.weight
             # get rid of zero error points
             index = index & (data.err_data != 0)  
@@ -1451,4 +1469,6 @@
             if index == None: 
                 index = numpy.ones(len(data.y), ntype=bool)
+            if self.weight != None:
+                data.dy = self.weight
             if data.dy == None or data.dy == []:
                 dy = numpy.ones(len(data.y))
@@ -1468,4 +1488,6 @@
         chisqr = numpy.average(residuals * residuals)
         self._plot_residuals(page_id, data, index)
+        #reset weight
+        self.weight = None
         return chisqr
     
Index: fittingview/src/sans/perspectives/fitting/pagestate.py
===================================================================
--- fittingview/src/sans/perspectives/fitting/pagestate.py	(revision c21e87be6a912c8e96e4efeef7a30d7ef63d91c0)
+++ fittingview/src/sans/perspectives/fitting/pagestate.py	(revision 55bb249cfad78559bfe82310564af7e4a22b6b1a)
@@ -54,12 +54,15 @@
                       ["enable_disp","enable_disp","bool"],
                       ["disable_disp","disable_disp","bool"],
-                      ["slit_smearer","slit_smearer","bool"],
+                      ["dI_noweight","dI_noweight","bool"],
+                      ["dI_didata","dI_didata","bool"],
+                      ["dI_sqrdata","dI_sqrdata","bool"],
+                      ["dI_idata","dI_idata","bool"],
                       ["enable2D","enable2D","bool"],
                       ["cb1","cb1","bool"],
                       ["tcChi","tcChi","float"],
-                     ["smearer", "smearer", "float"],
-                     ["smear_type","smear_type", "string"],
-                     ["dq_l", "dq_l", "string"],
-                     ["dq_r","dq_r", "string"]]
+                      ["smearer", "smearer", "float"],
+                      ["smear_type","smear_type", "string"],
+                      ["dq_l", "dq_l", "string"],
+                      ["dq_r","dq_r", "string"]]
 
 list_of_model_attributes = [["values", "values"],
@@ -242,4 +245,9 @@
         self.pinhole_smearer = False
         self.slit_smearer   = False
+        # weighting options
+        self.dI_noweight = False
+        self.dI_didata = True
+        self.dI_sqrdata = False
+        self.dI_idata   = False
         ## disperity selection
         self.enable_disp = False
@@ -309,4 +317,8 @@
         obj.slit_smearer = copy.deepcopy(self.slit_smearer)
         obj.smear_type = copy.deepcopy(self.smear_type)
+        obj.dI_noweight = copy.deepcopy(self.dI_noweight)
+        obj.dI_didata = copy.deepcopy(self.dI_didata)
+        obj.dI_sqrdata = copy.deepcopy(self.dI_sqrdata)
+        obj.dI_idata = copy.deepcopy(self.dI_idata)
         obj.dq_l = copy.deepcopy(self.dq_l)
         obj.dq_r = copy.deepcopy(self.dq_r)
@@ -373,4 +385,11 @@
         rep += "Dispersity disable : %s\n"%str(self.disable_disp)
         rep += "Slit smearer enable: %s\n"%str(self.slit_smearer)
+        
+        rep += "dI_noweight : %s\n"%str(self.dI_noweight)
+        rep += "dI_didata : %s\n"%str(self.dI_didata)
+        rep += "dI_sqrdata : %s\n"%str(self.dI_sqrdata)
+        rep += "dI_idata : %s\n"%str(self.dI_idata)
+        
+        
         rep += "2D enable : %s\n"%str(self.enable2D)
         rep += "All parameters checkbox selected: %s\n"%(self.cb1)
