Changeset 6e659ae8 in sasview
- Timestamp:
- Feb 25, 2009 8:51:39 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:
- 1a6ec25
- Parents:
- 2fe03d5
- Location:
- sansview/perspectives/fitting
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitpage1D.py
rfe3aba9 r6e659ae8 30 30 def __init__(self, parent,data, *args, **kwargs): 31 31 wx.ScrolledWindow.__init__(self, parent, *args, **kwargs) 32 32 33 """ 33 34 Initialization of the Panel -
sansview/perspectives/fitting/fitpanel.py
r1fc7411 r6e659ae8 104 104 except: 105 105 name = 'Fit' 106 flag2=self.draw_model_name !=name 107 flag= ((self.draw_model_name ==name) and (data.__class__.__name__ is "Data2D"))or\ 108 (self.draw_model_name !=name) 106 109 107 #if self.fit_page_name != name and self.draw_model_name !=name: 110 if not name in self.fit_page_name and flag:108 if not name in self.fit_page_name : 111 109 #self.about_page.Disable() 112 110 from fitpage1D import FitPage1D -
sansview/perspectives/fitting/fitting.py
r8f83c90d r6e659ae8 469 469 x=[] 470 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 if metadata.__class__ in ["Data1D","Theory1D"]: 472 for i in range(len(metadata.dy)): 473 if metadata.dy[i] !=0: 474 dy.append(metadata.dy[i]) 475 x.append(metadata.x[i]) 476 y.append(metadata.y[i]) 477 if len(dy)>0: 478 metadata.dy=numpy.zeros(len(dy)) 479 metadata.dy=dy 480 metadata.y=numpy.zeros(len(y)) 481 metadata.y=y 482 metadata.x=numpy.zeros(len(x)) 483 metadata.x=x 483 484 self.fitter.set_data(data=metadata,Uid=self.fit_id, 484 485 smearer=smearer,qmin= qmin,qmax=qmax, … … 573 574 self.fitter.set_model(new_model, self.fit_id, pars) 574 575 print "sim-->model",metadata,model,self.fit_id, pars 575 #self.fitter.set_model(Model(model), self.fit_id, pars) 576 dy=[] 577 x=[] 578 y=[] 579 if metadata.__class__ in ["Data1D","Theory1D"]: 580 for i in range(len(metadata.dy)): 581 if metadata.dy[i] !=0: 582 dy.append(metadata.dy[i]) 583 x.append(metadata.x[i]) 584 y.append(metadata.y[i]) 585 if len(dy)>0: 586 metadata.dy=numpy.zeros(len(dy)) 587 metadata.dy=dy 588 metadata.y=numpy.zeros(len(y)) 589 metadata.y=y 590 metadata.x=numpy.zeros(len(x)) 591 metadata.x=x 576 592 self.fitter.set_data(metadata,self.fit_id,qmin,qmax,ymin,ymax) 577 593 print "sim---->value of problem",value.get_scheduled()
Note: See TracChangeset
for help on using the changeset viewer.