- Timestamp:
- Feb 27, 2009 11:18:12 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:
- 7d680c7
- Parents:
- f3113c9
- Location:
- sansview/perspectives/fitting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitting.py
rf3113c9 re9e914f 47 47 self.standalone=True 48 48 ## Fit engine 49 self._fit_engine = ' park'49 self._fit_engine = 'scipy' 50 50 self.enable_model2D=False 51 51 # list of selcted data … … 76 76 #Set park engine 77 77 id3 = wx.NewId() 78 self.menu1.AppendCheckItem(id3, " scipy")78 self.menu1.AppendCheckItem(id3, "park") 79 79 wx.EVT_MENU(owner, id3, self._onset_engine) 80 80 … … 360 360 model.setParam(name,result.pvec) 361 361 else: 362 model.setParam(name,result.pvec[i]) 363 # print "fitting: single fit", name, result.pvec[i] 362 print "fitting result : chisqr",result.fitness 363 print "fitting result : pvec",result.pvec 364 print "fitting result : stderr",result.stderr 365 #model.setParam(name,result.pvec[i]) 366 # print "fitting: single fit", name, result.pvec[i] 364 367 i += 1 365 print "fitting result : chisqr",result.fitness 366 print "fitting result : pvec",result.pvec 367 print "fitting result : stderr",result.stderr 368 368 369 369 370 cpage.onsetValues(result.fitness, result.pvec,result.stderr) … … 373 374 xmin=xmin, xmax=xmax,title=None) 374 375 except: 375 #raise376 wx.PostEvent(self.parent, StatusEvent(status="Fitting error: %s" % sys.exc_value))377 return376 raise 377 #wx.PostEvent(self.parent, StatusEvent(status="Fitting error: %s" % sys.exc_value)) 378 #return 378 379 379 380 def _simul_fit_completed(self,result,qmin,qmax, elapsed,pars=None,cpage=None, -
sansview/perspectives/fitting/modelpage.py
rf3113c9 re9e914f 540 540 self.text2_3.Hide() 541 541 542 ix +=1 543 self.text2_5 = wx.StaticText(self, -1, 'Min') 544 self.sizer5.Add(self.text2_5,(iy, ix),(1,1),\ 545 wx.EXPAND|wx.ADJUST_MINSIZE, 0) 546 ix +=1 547 self.text2_6 = wx.StaticText(self, -1, 'Max') 548 self.sizer5.Add(self.text2_6,(iy, ix),(1,1),\ 549 wx.EXPAND|wx.ADJUST_MINSIZE, 0) 550 if self.data ==None: 551 self.text2_5.Hide() 552 self.text2_6.Hide() 542 553 543 ix +=1 554 544 self.text2_4 = wx.StaticText(self, -1, 'Units') … … 587 577 self.sizer5.Add(ctl2, (iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 588 578 ctl2.Hide() 589 ix += 1 590 param_min= format_number(self.model.details[item][1]) 591 ctl3 = wx.TextCtrl(self, -1, size=(_BOX_WIDTH/2,20), style=wx.TE_PROCESS_ENTER) 592 if float(param_min) ==0: 593 ctl3.SetValue("-inf") 594 else: 595 ctl3.SetValue(str (format_number(param_min))) 596 ctl3.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter) 597 ctl3.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter) 598 599 self.sizer5.Add(ctl3, (iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 600 ix += 1 601 param_max= format_number(self.model.details[item][2]) 602 ctl4 = wx.TextCtrl(self, -1, size=(_BOX_WIDTH/2,20), style=wx.TE_PROCESS_ENTER) 603 if float(param_max)==0: 604 ctl4.SetValue("+inf") 605 else: 606 ctl4.SetValue(str (format_number(param_max))) 607 ctl4.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter) 608 ctl4.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter) 609 self.sizer5.Add(ctl4, (iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 610 if self.data==None: 611 ctl4.Hide() 612 ctl3.Hide() 579 613 580 ix +=1 614 581 # Units … … 619 586 self.sizer5.Add(units, (iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 620 587 621 self.parameters.append([cb,ctl1,text2,ctl2 , ctl3, ctl4])588 self.parameters.append([cb,ctl1,text2,ctl2]) 622 589 623 590 iy+=1 … … 1111 1078 for item in self.parameters: 1112 1079 item[0].SetValue(True) 1113 list= [item[0],item[1],item[2],item[3] ,item[4],item[5]]1080 list= [item[0],item[1],item[2],item[3]] 1114 1081 self.param_toFit.append(list ) 1115 1082 if len(self.fittable_param)>0:
Note: See TracChangeset
for help on using the changeset viewer.