Changeset 94999eb in sasview for sansview/perspectives/fitting/fitpage1D.py
- Timestamp:
- Feb 3, 2009 2:26:15 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:
- 0690e1d
- Parents:
- 6b44403
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitpage1D.py
r6b44403 r94999eb 137 137 #------------------ sizer 4 draw------------------------ 138 138 self.modelbox = wx.ComboBox(self, -1) 139 139 self.tcChi = wx.StaticText(self, -1, str(0), style=wx.ALIGN_LEFT) 140 self.tcChi.Hide() 141 self.text1_1 = wx.StaticText(self, -1, 'Chi2/dof', style=wx.ALIGN_LEFT) 142 self.text1_1.Hide() 140 143 #filling sizer2 141 144 ix = 0 … … 145 148 ix += 1 146 149 self.sizer4.Add(self.modelbox,(iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 147 150 ix += 1 151 self.sizer4.Add(self.text1_1,(iy,ix),(1,1),\ 152 wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 153 ix += 1 154 self.sizer4.Add(self.tcChi,(iy,ix),(1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 0) 148 155 #----------sizer6------------------------------------------------- 149 156 self.disable_disp = wx.RadioButton(self, -1, 'No', (10, 10), style=wx.RB_GROUP) … … 165 172 166 173 #---------sizer 9 draw---------------------------------------- 167 self.tcChi = wx.StaticText(self, -1, str(0), style=wx.ALIGN_LEFT) 168 self.tcChi.Hide() 169 self.text1_1 = wx.StaticText(self, -1, 'Chi2/dof', style=wx.ALIGN_LEFT) 170 self.text1_1.Hide() 174 171 175 172 176 id = wx.NewId() … … 235 239 ix += 1 236 240 self.sizer9.Add(self.npts,(iy,ix),(1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 0) 237 ix = 0 238 iy += 1 239 self.sizer9.Add(self.text1_1,(iy,ix),(1,1),\ 240 wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 241 ix += 1 242 self.sizer9.Add(self.tcChi,(iy,ix),(1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 0) 243 ix +=2 241 242 ix += 1 244 243 self.sizer9.Add(self.btFit,(iy,ix),(1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 0) 245 244 ix =0 … … 322 321 323 322 flag=self.checkFitRange() 323 print "flag", flag 324 324 if flag== True: 325 325 try: … … 330 330 self.qmin_x = float(self.qmin.GetValue()) 331 331 self.qmax_x = float(self.qmax.GetValue()) 332 print "self.qmin_x, self.qmax_x",self.qmin_x,self.qmax_x 332 333 x,y,dy = [numpy.asarray(v) for v in (self.data.x,self.data.y,self.data.dy)] 333 334 if self.qmin_x==None and self.qmax_x==None: … … 338 339 fx = numpy.asarray([self.model.run(item)for item in x[idx ]]) 339 340 res= (y[idx] - fx)/dy[idx] 340 341 341 342 342 sum=0 … … 372 372 evt = ModelEventbox(model=self.model,name=name) 373 373 wx.PostEvent(self.event_owner, evt) 374 #self.model= item()375 #self.set_panel(self.model)374 self.text1_1.Show() 375 self.tcChi.Show() 376 376 except: 377 377 raise #ValueError,"model.name is not equal to model class name" … … 583 583 set to true or false all checkBox given the main checkbox value cb1 584 584 """ 585 self.param_toFit=[] 586 if self.parameters !=[]: 587 if self.cb1.GetValue()==True: 588 for item in self.parameters: 589 item[0].SetValue(True) 590 list= [item[0],item[1],item[2],item[3]] 591 self.param_toFit.append(list ) 592 if len(self.fittable_param)>0: 593 for item in self.fittable_param: 594 item[0].SetValue(True) 595 list= [item[0],item[1],item[2],item[3]] 596 self.param_toFit.append(list ) 597 598 if not (len(self.param_toFit ) >0): 599 self.qmin.Disable() 600 self.qmax.Disable() 601 else: 602 self.qmin.Enable() 603 self.qmax.Enable() 604 else: 605 for item in self.parameters: 606 item[0].SetValue(False) 607 for item in self.fittable_param: 608 item[0].SetValue(False) 609 self.param_toFit=[] 610 611 self.qmin.Disable() 612 self.qmax.Disable() 585 self.select_all_param_helper() 613 586 614 587
Note: See TracChangeset
for help on using the changeset viewer.