Changeset 30d103a in sasview for sansview/perspectives/fitting
- Timestamp:
- Aug 6, 2009 12:22:55 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:
- c9aa125
- Parents:
- 1b001a7
- Location:
- sansview/perspectives/fitting
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/basepage.py
r6dc9ad8 r30d103a 170 170 Cancel the previous action 171 171 """ 172 print "enable undo"172 #print "enable undo" 173 173 event = PreviousStateEvent(page = self) 174 174 wx.PostEvent(self.parent, event) … … 291 291 self.disp_box = wx.ComboBox(self, -1) 292 292 293 for key in self.polydisp.iterkeys(): 294 name = str(key.__name__) 295 if name=="ArrayDispersion": 296 # Remove the option until the rest of the code is ready for it 297 self.disp_box.Append("Select customized Model",key) 298 else: 299 self.disp_box.Append(name,key) 300 self.disp_box.SetSelection(0) 301 293 for key, value in self.polydisp.iteritems(): 294 name = str(key) 295 self.disp_box.Append(name,value) 296 297 self.disp_box.SetStringSelection("gaussian") 302 298 wx.EVT_COMBOBOX(self.disp_box,-1, self._on_select_Disp) 303 299 … … 306 302 sizer_select_dispers.Add(self.disp_box,0, 307 303 wx.TOP|wx.BOTTOM|wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE,border=5) 308 #sizer_select_dispers.Add((10,10))304 309 305 self.model_disp.Hide() 310 306 self.disp_box.Hide() … … 1528 1524 1529 1525 n = self.disp_box.GetCurrentSelection() 1526 name = self.disp_box.GetValue() 1530 1527 dispersity= self.disp_box.GetClientData(n) 1531 name= dispersity.__name__1528 1532 1529 self.disp_name = name 1533 if name == "GaussianDispersion": 1534 self._set_sizer_gaussian() 1535 if name == "ArrayDispersion": 1530 1531 if name.lower() == "array": 1536 1532 self._set_sizer_arraydispersion() 1533 else: 1534 self._set_sizer_dispersion(dispersity= dispersity) 1537 1535 1538 1536 … … 1590 1588 self.disp_cb_dict[p] = wx.CheckBox(self, -1, p, (10, 10)) 1591 1589 self.state.disp_cb_dict[p]= self.disp_cb_dict[p].GetValue() 1592 print "self.enable2D",self.enable2D1590 #print "self.enable2D",self.enable2D 1593 1591 if not (self.enable2D or self.data.__class__.__name__ =="Data2D"): 1594 1592 self.disp_cb_dict[p].Hide() -
sansview/perspectives/fitting/fitpage.py
r6dc9ad8 r30d103a 241 241 242 242 243 def _set_sizer_gaussian(self): 243 #def _set_sizer_gaussian(self): 244 def _set_sizer_dispersion(self, dispersity): 244 245 """ 245 246 draw sizer with gaussian dispersity parameters … … 261 262 # Create the dispersion objects 262 263 for item in self.model.dispersion.keys(): 263 disp_model = GaussianDispersion() 264 #disp_model = GaussianDispersion() 265 disp_model = dispersity() 264 266 self._disp_obj_dict[item] = disp_model 265 267 self.model.set_dispersion(item, disp_model) -
sansview/perspectives/fitting/modelpage.py
r6dc9ad8 r30d103a 116 116 117 117 118 def _set_sizer_gaussian(self): 119 """ 120 draw sizer with gaussian dispersity parameters 118 #def _set_sizer_gaussian(self): 119 def _set_sizer_dispersion(self, dispersity): 120 """ 121 draw sizer with gaussian, log or schulz dispersity parameters 121 122 """ 122 123 self.fittable_param=[] … … 134 135 # Create the dispersion objects 135 136 for item in self.model.dispersion.keys(): 136 disp_model = GaussianDispersion() 137 #disp_model = GaussianDispersion() 138 disp_model = dispersity() 137 139 self._disp_obj_dict[item] = disp_model 138 140 self.model.set_dispersion(item, disp_model) … … 297 299 self._draw_model() 298 300 self.model_view.Disable() 301 299 302 300 303 self.set_model_param_sizer(self.model) … … 304 307 for item in self.orientation_params: 305 308 if item[2]!=None: 309 306 310 item[2].Enable() 307 if self.disp_name == "ArrayDispersion":311 if self.disp_name.lower() == "array": 308 312 self._set_sizer_arraydispersion() 309 313 else: … … 437 441 # Set the controls 438 442 #For qmin and qmax, do not use format_number.(If do, qmin and max could be different from what is in the data.) 439 """ 440 self.qmin.SetValue(format_number(self.qmin_x)) 441 self.qmax.SetValue(format_number(self.qmax_x)) 442 self.npts.SetValue(format_number(self.num_points)) 443 """ 443 444 444 self.qmin.SetValue(str(self.qmin_x)) 445 445 self.qmax.SetValue(str(self.qmax_x))
Note: See TracChangeset
for help on using the changeset viewer.