Changeset c77f72c in sasview
- Timestamp:
- Mar 2, 2009 1:22:35 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:
- 93dec2c2
- Parents:
- 3e852ef5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitpage1D.py
r22e8d49 rc77f72c 456 456 457 457 def set_model(self): 458 """ 459 Hide panel object related to the previous fit and set 460 values entered by the used inside the model 461 """ 458 462 if len(self.parameters) !=0 and self.model !=None: 459 463 # Flag to register when a parameter has changed. … … 465 469 item[3].Hide() 466 470 except: 467 #enter dispersion value468 471 pass 469 472 self.set_model_parameter() … … 484 487 self.param_toFit=[] 485 488 for item in self.parameters: 489 #Select parameters to fit for list of primary parameters 486 490 if item[0].GetValue()==True: 487 491 list= [item[0],item[1],item[2],item[3]] … … 489 493 self.param_toFit.append(list ) 490 494 else: 495 #remove parameters from the fitting list 491 496 if item in self.param_toFit: 492 497 self.param_toFit.remove(item) 493 498 #Select parameters to fit for list of fittable parameters with dispersion 494 499 for item in self.fittable_param: 495 500 if item[0].GetValue()==True: … … 498 503 self.param_toFit.append(list ) 499 504 else: 505 #remove parameters from the fitting list 500 506 if item in self.param_toFit: 501 507 self.param_toFit.remove(item) 502 503 508 #Set the value of checkbox that selected every checkbox or not 504 509 if len(self.parameters)+len(self.fittable_param) ==len(self.param_toFit): 505 510 self.cb1.SetValue(True) … … 520 525 is_modified = False 521 526 has_error = False 527 #set the panel when fit result are float not list 522 528 if out.__class__==numpy.float64: 523 529 self.param_toFit[0][1].SetValue(format_number(out)) … … 529 535 self.param_toFit[0][3].SetValue(format_number(cov[0])) 530 536 self.param_toFit[0][3].Show() 531 #out is a list : set parameters and errors in TextCtrl532 537 else: 533 538 i=0 534 539 j=0 535 #print "fitpage: list param model",list 536 #for item in self.param_toFit: 537 #print "fitpage: list display",item[0].GetLabelText() 540 #Set the panel when fit result are list 538 541 for item in self.param_toFit: 539 542 if( out != None ) and len(out)<=len(self.param_toFit)and i < len(out): 540 #item[1].SetValue(format_number(out[i]))541 543 item[1].SetValue(format_number(self.model.getParam(item[0].GetLabelText()))) 542 544 item[1].Refresh() … … 546 548 item[3].Clear() 547 549 for j in range(len(out)): 548 if out[j]==self.model.getParam(item[0].GetLabelText()):#.SetValue(format_number(self.model.getParam(item[0].GetLabelText()))): 549 #print "jjj", j,item[1],item[1].SetValue(format_number(self.model.getParam(item[0].GetLabelText()))) 550 if out[j]==self.model.getParam(item[0].GetLabelText()): 550 551 break 551 552 item[3].SetValue(format_number(cov[j])) … … 560 561 561 562 def onSmear(self, event): 562 #print "in smearer",self.enable_smearer.GetValue() 563 """ 564 Create a smear object that will change the way residuals 565 are compute when fitting 566 """ 563 567 smear =None 564 568 msg=""
Note: See TracChangeset
for help on using the changeset viewer.