Changeset e5af88b in sasview
- Timestamp:
- Feb 3, 2009 1:36:22 PM (16 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:
- 80f3169
- Parents:
- 0690e1d
- Location:
- sansview/perspectives/fitting
- Files:
-
- 5 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitpage1D.py
r94999eb re5af88b 231 231 ix = 0 232 232 iy += 1 233 self.sizer9.Add(wx.StaticText(self, -1, ' xrange'),(iy, ix),(1,1),\233 self.sizer9.Add(wx.StaticText(self, -1, 'Q range'),(iy, ix),(1,1),\ 234 234 wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 235 235 ix += 1 -
sansview/perspectives/fitting/fitting.py
r94999eb re5af88b 69 69 id3 = wx.NewId() 70 70 self.menu1.AppendCheckItem(id3, "park") 71 71 72 wx.EVT_MENU(owner, id3, self._onset_engine) 72 73 -
sansview/perspectives/fitting/modelpage.py
r94999eb re5af88b 128 128 self.qmin = wx.TextCtrl(self, -1,size=(_BOX_WIDTH,20)) 129 129 self.qmin.SetValue(format_number(self.qmin_x)) 130 self.qmin.SetToolTipString("Minimun value of xin linear scale.")130 self.qmin.SetToolTipString("Minimun value of Q in linear scale.") 131 131 self.qmin.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter) 132 132 self.qmin.Bind(wx.EVT_TEXT_ENTER, self._onparamEnter) … … 134 134 self.qmax = wx.TextCtrl(self, -1,size=(_BOX_WIDTH,20)) 135 135 self.qmax.SetValue(format_number(self.qmax_x)) 136 self.qmax.SetToolTipString("Maximum value of xin linear scale.")136 self.qmax.SetToolTipString("Maximum value of Q in linear scale.") 137 137 self.qmax.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter) 138 138 self.qmax.Bind(wx.EVT_TEXT_ENTER, self._onparamEnter) … … 160 160 ix = 0 161 161 iy += 1 162 self.sizer9.Add(wx.StaticText(self, -1, ' xrange'),(iy, ix),(1,1),\162 self.sizer9.Add(wx.StaticText(self, -1, 'Q range'),(iy, ix),(1,1),\ 163 163 wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 164 164 ix += 1 … … 267 267 self.cb1.SetValue(False) 268 268 self.select_all_param_helper() 269 self.fittable_param=[] 270 self.fixed_param=[] 271 self.sizer8.Clear(True) 269 272 270 self.populate_disp_box() 273 271 self.set_panel_dispers(self.disp_list) 274 self.vbox.Layout() 275 self.SetScrollbars(20,20,55,40) 276 self.Layout() 277 self.parent.GetSizer().Layout() 272 278 273 else: 279 274 if self.data !=None: … … 304 299 wx.EVT_COMBOBOX(self.disp_box,-1, self._on_select_Disp) 305 300 self.sizer7.Add(self.disp_box,( iy, ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 306 301 self.vbox.Layout() 302 self.SetScrollbars(20,20,55,40) 303 self.Layout() 304 self.parent.GetSizer().Layout() 305 306 307 307 def set_range(self, qmin_x, qmax_x, npts): 308 308 """ … … 367 367 self.enable2D=True 368 368 self._draw_model() 369 370 else: 371 print "enable is true:",self.enable2D 372 #self.manager.parent. show_panel(147) 373 self.manager.show_panel2D( id=None ) 374 #self.manager.menu1.Append(event_id, new_panel.window_caption, 375 # "Show %s plot panel" % new_panel.window_caption) 369 self.model_view.Disable() 376 370 377 371 … … 427 421 #self.manager.draw_model(model, name) 428 422 self.enable2D=False 423 self.model_view.Enable() 429 424 self._draw_model(name) 430 425 … … 562 557 def set_panel_dispers(self, disp_list, type="Gaussian" ): 563 558 564 565 559 self.fittable_param=[] 560 self.fixed_param=[] 561 566 562 ix=0 567 563 iy=1 568 564 ### this will become a separate method 569 565 if type== "Gaussian" : 570 566 print "went here" 567 self.sizer8.Clear(True) 571 568 disp = wx.StaticText(self, -1, 'Dispersion') 572 569 self.sizer8.Add(disp,( iy, ix),(1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) … … 643 640 self.sizer8.Add(Tctl, (iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 644 641 self.fixed_param.append([name3, Tctl]) 645 646 642 643 ix =0 644 iy +=1 645 self.sizer8.Add((20,20),(iy,ix),(1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 646 self.vbox.Layout() 647 self.SetScrollbars(20,20,55,40) 648 self.Layout() 649 self.parent.GetSizer().Layout() 647 650 648 651 … … 658 661 # Flag to register when a parameter has changed. 659 662 is_modified = False 663 for item in self.fittable_param: 664 try: 665 name=str(item[0].GetLabelText()) 666 value= float(item[1].GetValue()) 667 #print "model para", name,value 668 # If the value of the parameter has changed, 669 # update the model and set the is_modified flag 670 if value != self.model.getParam(name): 671 #print "went hereee" 672 self.model.setParam(name,value) 673 is_modified = True 674 675 except: 676 raise 677 wx.PostEvent(self.parent.parent, StatusEvent(status=\ 678 "Model Drawing Error:wrong value entered : %s"% sys.exc_value)) 679 660 680 for item in self.fixed_param: 661 681 try: … … 671 691 672 692 except: 673 wx.PostEvent(self.parent.parent, StatusEvent(status=\ 693 raise 694 wx.PostEvent(self.parent.parent, StatusEvent(status=\ 674 695 "Model Drawing Error:wrong value entered : %s"% sys.exc_value)) 675 696
Note: See TracChangeset
for help on using the changeset viewer.