Changeset 8f83c90d in sasview for sansview/perspectives
- Timestamp:
- Feb 24, 2009 2:59:12 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:
- 08895c5
- Parents:
- 949c7b2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitting.py
r949c7b2 r8f83c90d 9 9 from sans.guicomm.events import EVT_SLICER_PANEL,EVT_MODEL2D_PANEL,ERR_DATA 10 10 11 from sans.fit.AbstractFitEngine import Model, Data,FitData1D,FitData2D11 from sans.fit.AbstractFitEngine import Model,FitData1D,FitData2D#,Data, 12 12 from fitproblem import FitProblem 13 13 from fitpanel import FitPanel … … 349 349 break 350 350 i = 0 351 print "single-->result",pars,cpage,str(result),result.parameters,result.fitness,result.stderr 352 #print "fitting: single fit pars ", pars 351 353 352 for name in pars: 354 353 if result.pvec.__class__==numpy.float64: … … 361 360 print "fitting result : pvec",result.pvec 362 361 print "fitting result : stderr",result.stderr 363 print "qmin qmax xmin xmax ymin , ymax",qmin, qmax,xmin, xmax ,ymin, ymax 364 362 365 363 cpage.onsetValues(result.fitness, result.pvec,result.stderr) 366 364 #title="Fitted model 2D " … … 454 452 model = list[0] 455 453 smearer= value.get_smearer() 456 print "single fit", model, smearer 454 455 457 456 #Create list of parameters for fitting used 458 457 … … 464 463 pars.append(str(element[0].GetLabelText())) 465 464 pars.sort() 466 print "single fit start pars:", pars467 465 #Do the single fit 468 466 self.fitter.set_model(Model(model), self.fit_id, pars) 469 467 #print "args...:",metadata,self.fit_id,smearer,qmin,qmax,ymin,ymax 470 468 dy=[] 469 x=[] 470 y=[] 471 for i in range(len(metadata.dy)): 472 if metadata.dy[i] !=0: 473 dy.append(metadata.dy[i]) 474 x.append(metadata.x[i]) 475 y.append(metadata.y[i]) 476 if len(dy)>0: 477 metadata.dy=numpy.zeros(len(dy)) 478 metadata.dy=dy 479 metadata.y=numpy.zeros(len(y)) 480 metadata.y=y 481 metadata.x=numpy.zeros(len(x)) 482 metadata.x=x 471 483 self.fitter.set_data(data=metadata,Uid=self.fit_id, 472 484 smearer=smearer,qmin= qmin,qmax=qmax,
Note: See TracChangeset
for help on using the changeset viewer.