Changeset 484faf7 in sasview for sansview/perspectives/fitting
- Timestamp:
- Jan 4, 2010 8:11:56 PM (15 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:
- 6e0e2d85
- Parents:
- 0277d084
- Location:
- sansview/perspectives/fitting
- Files:
-
- 1 added
- 3 deleted
- 2 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/basepage.py
r918fcb1 r484faf7 1229 1229 if self.enable_smearer.GetValue(): 1230 1230 temp_smear= self.smearer 1231 1231 1232 self.manager.draw_model(self.model, data=self.data, 1232 1233 smearer= temp_smear, 1233 qmin=float(self.qmin_x), qmax=float(self.qmax_x), 1234 qmin=float(self.qmin_x), 1235 qmax=float(self.qmax_x), 1234 1236 qstep= float(self.num_points), 1235 1237 enable2D=self.enable2D) … … 1442 1444 1443 1445 # If qmin and qmax have been modified, update qmin and qmax 1444 if check_value( self.qmin, self.qmax):1446 if self._validate_qrange( self.qmin, self.qmax): 1445 1447 tempmin = float(self.qmin.GetValue()) 1446 1448 if tempmin != self.qmin_x: … … 1481 1483 wx.PostEvent(self.parent, event) 1482 1484 self.state_change= False 1483 1485 #Draw the model for a different range 1486 self._draw_model() 1484 1487 1485 1488 def _on_select_model_helper(self): … … 2012 2015 #On 'More details' button 2013 2016 """ 2014 from help Panel import HelpWindow2017 from help_panel import HelpWindow 2015 2018 2016 2019 if self.model == None: -
sansview/perspectives/fitting/fitting.py
r7975f2b r484faf7 102 102 self.sim_page=None 103 103 #dictionary containing data name and error on dy of that data 104 self.err_dy ={}104 self.err_dy = {} 105 105 106 106 … … 136 136 wx.EVT_MENU(owner, id1, self.on_add_sim_page) 137 137 #menu for SLD Calculator 138 self.tool_menu = wx.Menu()139 id_tool_menu = wx.NewId()140 sld_id = wx.NewId()141 sld_help= "Compute the scattering length density of molecules"142 self.tool_menu.Append(sld_id, "SLD Calculator",sld_help)143 wx.EVT_MENU(owner,sld_id, self.onCalculateSld)138 #self.tool_menu = wx.Menu() 139 #id_tool_menu = wx.NewId() 140 #sld_id = wx.NewId() 141 #sld_help= "Compute the scattering length density of molecules" 142 #self.tool_menu.Append(sld_id, "SLD Calculator",sld_help) 143 #wx.EVT_MENU(owner,sld_id, self.onCalculateSld) 144 144 145 145 #menu for model … … 154 154 155 155 #create menubar items 156 return [(id, self.menu1, "Fitting") ,157 (id_tool_menu, self.tool_menu,"Tools" ),158 (id2, menu2, "Model")]156 return [(id, self.menu1, "Fitting")] 157 #(id_tool_menu, self.tool_menu,"Tools" ), 158 #(id2, menu2, "Model")] 159 159 160 160 … … 178 178 TODO: replace the text with a nice image 179 179 """ 180 from helpPanel import HelpWindow 180 181 from help_panel import HelpWindow 181 182 frame = HelpWindow(None, -1, 'HelpWindow') 182 183 frame.Show(True) … … 194 195 """ 195 196 self.graph = graph 196 fitOption = "Select data for fitting" 197 fitOpenHint = "Dialog with fitting parameters " 198 197 fit_option = "Select data for fitting" 198 fit_hint = "Dialog with fitting parameters " 199 invariant_option = "Compute Invariant" 200 invariant_hint = "A dialog will appears for further computation" 199 201 for item in graph.plottables: 200 202 if item.__class__.__name__ is "Data2D": … … 202 204 if hasattr(item,"is_data"): 203 205 if item.is_data: 204 return [[fit Option, fitOpenHint, self._onSelect]]206 return [[fit_option, fit_hint, self._onSelect]] 205 207 else: 206 208 return [] 207 return [[fit Option, fitOpenHint, self._onSelect]]209 return [[fit_option, fit_hint, self._onSelect]] 208 210 else: 209 211 if item.name==graph.selected_plottable : … … 214 216 if hasattr(item,"is_data"): 215 217 if item.is_data: 216 return [[fitOption, fitOpenHint, self._onSelect]] 218 return [[fit_option, fit_hint, 219 self._onSelect], 220 [invariant_option, 221 invariant_hint, self._compute_invariant]] 217 222 else: 218 223 return [] 219 224 else: 220 return [[fitOption, fitOpenHint, self._onSelect]] 225 return [[fit_option, fit_hint, self._onSelect], 226 [invariant_option, 227 invariant_hint, self._compute_invariant]] 221 228 return [] 222 229 … … 548 555 549 556 550 557 def _compute_invariant(self, event): 558 """ 559 Open the invariant panel to invariant computation 560 """ 561 562 551 563 def _closed_fitpage(self, event): 552 564 """ … … 848 860 set engine to park 849 861 """ 862 Plugin.on_perspective(self,event=event) 850 863 self._on_change_engine('park') 851 864 … … 908 921 @param engine: the key work of the engine 909 922 """ 923 910 924 ## saving fit engine name 911 925 self._fit_engine = engine … … 1090 1104 1091 1105 title= new_plot.name 1092 1106 new_plot. perspective = self.get_perspective() 1093 1107 # Pass the reset flag to let the plotting event handler 1094 1108 # know that we are replacing the whole plot
Note: See TracChangeset
for help on using the changeset viewer.