Changeset 6e4c9fe in sasview for fittingview/src/sans/perspectives/fitting
- Timestamp:
- Aug 26, 2011 3:20:47 PM (13 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- f3242cf
- Parents:
- 5d2e4c1
- Location:
- fittingview/src/sans/perspectives/fitting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
fittingview/src/sans/perspectives/fitting/basepage.py
r32cd80c r6e4c9fe 90 90 self.engine_type = 'scipy' 91 91 ## smear default 92 self.smearer = None93 92 self.current_smearer = None 94 93 ## 2D smear accuracy default … … 111 110 ## selected parameters to apply dispersion 112 111 self.disp_cb_dict ={} 113 114 112 ## smearer object 115 self.smearer = None116 113 self.enable2D = False 117 114 self.is_mac = ON_MAC … … 155 152 ## dictionary of saved state 156 153 self.saved_states = {} 157 #create a default data for an empty panel158 self.create_default_data()159 154 ## Create context menu for page 160 155 self.popUpMenu = wx.Menu() … … 198 193 Only when the page is on theory mode. 199 194 """ 200 if self.enable2D and not check_data_validity(self.data): 201 self._create_default_2d_data() 202 else: 203 self._create_default_1d_data() 204 205 195 if not hasattr(self, "model_view"): 196 return 197 toggle_mode_on = self.model_view.IsEnabled() 198 if toggle_mode_on: 199 if self.enable2D and not check_data_validity(self.data): 200 self._create_default_2d_data() 201 else: 202 self._create_default_1d_data() 203 206 204 def _create_default_1d_data(self): 207 205 """ … … 875 873 self.state.disable_disp = self.disable_disp.GetValue() 876 874 877 self.state.smearer = copy.deepcopy(self. smearer)875 self.state.smearer = copy.deepcopy(self.current_smearer) 878 876 if hasattr(self,"enable_smearer"): 879 877 self.state.enable_smearer = \ … … 941 939 self.state.disable_disp = self.disable_disp.GetValue() 942 940 943 self.state.smearer = copy.deepcopy(self. smearer)941 self.state.smearer = copy.deepcopy(self.current_smearer) 944 942 if hasattr(self,"enable_smearer"): 945 943 self.state.enable_smearer = \ -
fittingview/src/sans/perspectives/fitting/fitpage.py
r6ff97c5 r6e4c9fe 64 64 self.enable_fit_button() 65 65 self.fill_data_combobox(data_list=self.data_list) 66 #create a default data for an empty panel 67 self.create_default_data() 66 68 67 69 def enable_fit_button(self): … … 1118 1120 if not self.disable_smearer.GetValue(): 1119 1121 # Set the smearer environments 1120 temp_smear = self. smearer1122 temp_smear = self.current_smearer 1121 1123 except: 1122 1124 raise … … 1417 1419 if data.dqx_data == None or data.dqy_data ==None: 1418 1420 return 1419 elif self. smearer != None and (data.dqx_data.any()!=0) and \1421 elif self.current_smearer != None and (data.dqx_data.any()!=0) and \ 1420 1422 (data.dqx_data.any()!=0): 1421 1423 self.smear_type = "Pinhole2d" … … 1635 1637 if data is None: 1636 1638 return 1637 self. smearer = smear_selection(data, self.model)1639 self.current_smearer = smear_selection(data, self.model) 1638 1640 self.disable_smearer.SetValue(True) 1639 if self. smearer == None:1641 if self.current_smearer == None: 1640 1642 self.enable_smearer.Disable() 1641 1643 else: … … 1736 1738 self.structurebox.Enable() 1737 1739 data_name = self.data.name 1738 #data_min, data_max, npts = self.compute_data_range(self.data)1739 1740 data_min, data_max = self.qmin_data_set, self.qmax_data_set 1740 1741 npts = self.npts_data_set 1741 1742 #set maximum range for x in linear scale 1742 if not hasattr(self.data, "data"): #Display only for 1D data fit1743 if not hasattr(self.data, "data"): #Display only for 1D data fit 1743 1744 self.btEditMask.Disable() 1744 1745 self.EditMask_title.Disable() 1745 1746 else: 1746 1747 1747 self.btEditMask.Enable() 1748 1748 self.EditMask_title.Enable() … … 1755 1755 1756 1756 self.Npts_total.Bind(wx.EVT_MOUSE_EVENTS, self._npts_click) 1757 #self.Npts_total.Disable()1758 1757 self.dataSource.SetValue(data_name) 1759 1758 self.qmin_x = data_min … … 1790 1789 wx.PostEvent(self._manager.parent, NewPlotEvent(plot=self.data, 1791 1790 title=str(self.data.title))) 1792 self._manager.store_data(uid=self.uid, data_list=self.data_list,1793 caption=self.window_name)1791 #self._manager.store_data(uid=self.uid, data_list=self.data_list, 1792 # caption=self.window_name) 1794 1793 self._draw_model() 1795 1794 … … 2411 2410 if hasattr(self.data,"dxw"): 2412 2411 msg= ": Slit smearing parameters" 2413 if self. smearer ==None:2412 if self.current_smearer ==None: 2414 2413 wx.PostEvent(self._manager.parent, StatusEvent(status=\ 2415 2414 "Data contains no smearing information"))
Note: See TracChangeset
for help on using the changeset viewer.