Changeset 3e8e627 in sasview for sansview/perspectives/fitting/fitpage1D.py
- Timestamp:
- Feb 4, 2009 3:51:37 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:
- 17fc6f8
- Parents:
- a320904
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitpage1D.py
rc4550b0 r3e8e627 179 179 self.btFit.SetToolTipString("Perform fit.") 180 180 ## Q range 181 print "self.data fitpage1D" , self.data,hasattr(self.data,"data")181 #print "self.data fitpage1D" , self.data,hasattr(self.data,"data") 182 182 # Reversed to the codes; Need to think carefully about consistency in q between 2D plot and fitting 183 183 if not hasattr(self.data,"data"): 184 184 self.qmin_x= numpy.min(self.data.x) 185 185 self.qmax_x= numpy.max(self.data.x) 186 self.num_points= len(self.data.x) 186 187 else: 187 188 # Reversed to the codes; Need to think carefully about consistency in q between 2D plot and fitting … … 190 191 radius3= math.sqrt(math.pow(self.data.xmin, 2)+ math.pow(self.data.ymax, 2)) 191 192 radius4= math.sqrt(math.pow(self.data.xmax, 2)+ math.pow(self.data.ymax, 2)) 192 self.qmin_x =0193 self.qmax_x= max(radius1, radius2, radius3, radius4)194 #self.qmin_x= self.data.xmin195 #self.qmax_x= self.data.xmax196 print "data2D range",self.qmax_x197 198 self.num_points= 100193 #self.qmin_x = 0 194 #self.qmax_x = max(radius1, radius2, radius3, radius4) 195 self.qmin_x= self.data.xmin 196 self.qmax_x= self.data.xmax 197 #print "data2D range",self.qmax_x 198 199 self.num_points= 100 199 200 200 201 … … 305 306 if self.data.y_bins[j]>= self.qmin_x and self.data.y_bins[j]<= self.qmax_x: 306 307 res.append( (self.data.data[j][i]- self.model.runXY(\ 307 [self.data. x_bins[i],self.data.y_bins[j]]))\308 [self.data.y_bins[j],self.data.x_bins[i]]))\ 308 309 /self.data.err_data[j][i] ) 309 310 sum=0 … … 335 336 self.qmin_x = float(self.qmin.GetValue()) 336 337 self.qmax_x = float(self.qmax.GetValue()) 337 print "self.qmin_x, self.qmax_x",self.qmin_x,self.qmax_x338 #print "self.qmin_x, self.qmax_x",self.qmin_x,self.qmax_x 338 339 x,y,dy = [numpy.asarray(v) for v in (self.data.x,self.data.y,self.data.dy)] 339 340 if self.qmin_x==None and self.qmax_x==None: … … 393 394 if len(self.param_toFit) >0 and flag==True: 394 395 self.manager.schedule_for_fit( value=1,fitproblem =None) 395 self.manager._on_single_fit(qmin=self.qmin_x,qmax=self.qmax_x) 396 if hasattr(self.data, "data"): 397 self.manager._on_single_fit(qmin=self.qmin_x,qmax=self.qmax_x, 398 ymin=self.data.ymin, ymax=self.data.ymax) 399 else: 400 self.manager._on_single_fit(qmin=self.qmin_x,qmax=self.qmax_x) 396 401 else: 397 402 wx.PostEvent(self.parent.parent, StatusEvent(status=\
Note: See TracChangeset
for help on using the changeset viewer.