- Timestamp:
- Sep 22, 2008 9:49:59 AM (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:
- 2e83ff3
- Parents:
- 916a15f
- Location:
- sansview/perspectives/fitting
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitpage.py
r49b7efa r55fd102 102 102 self.sizer4.Add(self.xmin,(iy, ix),(1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 0) 103 103 self.xmin.Bind(wx.EVT_KILL_FOCUS, self._onTextEnter) 104 self.xmin.Bind(wx.EVT_TEXT_ENTER, self._onTextEnter) 104 105 self.xmin.Hide() 105 106 ix += 2 … … 108 109 self.sizer4.Add(self.xmax,(iy,ix),(1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 0) 109 110 self.xmax.Bind(wx.EVT_KILL_FOCUS, self._onTextEnter) 111 self.xmax.Bind(wx.EVT_TEXT_ENTER, self._onTextEnter) 110 112 self.xmax.Hide() 111 113 #Set chisqr result into TextCtrl … … 448 450 ctl1.SetValue(str (format_number(value))) 449 451 ctl1.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter) 452 ctl1.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter) 450 453 self.sizer2.Add(ctl1, (iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 451 454 ix += 1 -
sansview/perspectives/fitting/fitting.py
r4c530a5 r55fd102 96 96 @return: a list of menu items with call-back function 97 97 """ 98 99 98 self.graph=graph 100 99 for item in graph.plottables: … … 416 415 model.name="M"+str(self.index_model) 417 416 self.index_model += 1 418 self.page_finder[current_pg].set_theory("Fitness")417 #self.page_finder[current_pg].set_theory("Fitness") 419 418 self.page_finder[current_pg].set_model(model,M_name) 420 419 self.plot_helper(currpage= current_pg,qmin= None,qmax= None) … … 449 448 if data!=None: 450 449 theory = Theory1D(x=[], y=[]) 451 theory.name = self.page_finder[page].get_theory()450 theory.name = model.name 452 451 theory.group_id = data.group_id 453 452 … … 524 523 new_plot.xaxis("\\rm{Q}", 'A^{-1}') 525 524 new_plot.yaxis("\\rm{Intensity} ","cm^{-1}") 526 new_plot.group_id = model.name525 new_plot.group_id ="Fitness" 527 526 528 527 wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, title="Analytical model")) -
sansview/perspectives/fitting/modelpage.py
r49b7efa r55fd102 229 229 ctl1.SetValue(str (format_number(value))) 230 230 ctl1.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter) 231 ctl1.Bind(wx.EVT_TEXT_ENTER, self._onparamEnter) 231 232 self.sizer2.Add(ctl1, (iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 232 233 … … 264 265 name=str(item[0].GetLabelText()) 265 266 value= float(item[1].GetValue()) 266 print "modelpage: name. value",name , value267 267 self.model.setParam(name,value) 268 268 self.manager.draw_model(self.model) -
sansview/perspectives/fitting/simfitpage.py
r3b19ac9 r55fd102 23 23 self.sizer3 = wx.GridBagSizer(5,5) 24 24 self.sizer1 = wx.GridBagSizer(5,5) 25 self.sizer2 = wx.GridBagSizer(5,5) 25 #self.sizer2 = wx.GridBagSizer(5,5) 26 self.sizer2 = wx.BoxSizer(wx.HORIZONTAL) 26 27 self.vbox = wx.BoxSizer(wx.VERTICAL) 27 28 self.vbox.Add(self.sizer3) … … 38 39 wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 39 40 wx.EVT_CHECKBOX(self, self.cb1.GetId(), self.select_all_model_name) 40 wx.EVT_CHECKBOX(self, self.cb1.GetId(), self.select_all_model_name)41 41 42 ix = 0 42 43 iy = 1 43 44 text=wx.StaticText(self, -1, 'Constraint') 44 self.sizer2.Add(text,(iy, ix),(1,1),\ 45 wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 45 self.sizer2.Add(text,0, wx.LEFT|wx.RIGHT|wx.ADJUST_MINSIZE, 10) 46 46 ix = 0 47 47 iy += 1 48 48 self.ctl2 = wx.TextCtrl(self, -1, style=wx.TE_MULTILINE) 49 49 self.ctl2.Bind(wx.EVT_KILL_FOCUS, self._onTextEnter) 50 self.sizer2.Add(self.ctl2, (iy, ix),(1,1),wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 50 self.ctl2.Bind(wx.EVT_TEXT_ENTER, self._onTextEnter) 51 self.sizer2.Add(self.ctl2, 0, wx.LEFT|wx.RIGHT|wx.ADJUST_MINSIZE, 10) 51 52 ix +=2 52 self.sizer2.Add(self.btFit, (iy,ix),(1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE,0)53 self.sizer2.Add(self.btFit, 0, wx.LEFT|wx.RIGHT|wx.ADJUST_MINSIZE, 10) 53 54 self.params=[] 54 55 self.model_list=[] … … 56 57 self.page_finder={} 57 58 iy +=1 58 self.sizer2.Add((20,20),(iy, ix)) 59 #self.sizer2.Add((20,20),(iy, ix)) 60 self.sizer2.Add((20,20), 0, wx.LEFT|wx.RIGHT|wx.ADJUST_MINSIZE, 10) 59 61 self.vbox.Layout() 60 62 self.vbox.Fit(self)
Note: See TracChangeset
for help on using the changeset viewer.