- Timestamp:
- Feb 10, 2009 3:36:29 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:
- ca10d8e
- Parents:
- 26cb768
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitpage1D.py
r2268d10 r1309e919 92 92 i+=1 93 93 94 95 94 #Filing the sizer containing data related fields 96 95 ix = 0 … … 198 197 self.qmax_x= math.sqrt(math.pow(max(math.fabs(self.data.xmax),math.fabs(self.data.xmin)),2) 199 198 +math.pow(max(math.fabs(self.data.ymax),math.fabs(self.data.ymin)),2))#self.data.xmax 200 print "data2D range",self.qmax_x199 #print "data2D range",self.qmax_x 201 200 202 201 self.num_points= 100 … … 310 309 self.qmin_x = float(self.qmin.GetValue()) 311 310 self.qmax_x = float(self.qmax.GetValue()) 312 313 311 for i in range(len(self.data.x_bins)): 314 if self.data.x_bins[i]>= self.qmin_x and self.data.x_bins[i]<= self.qmax_x:312 #if self.data.x_bins[i]>= self.qmin_x and self.data.x_bins[i]<= self.qmax_x: 315 313 for j in range(len(self.data.y_bins)): 316 if self.data.y_bins[j]>= self.qmin_x and self.data.y_bins[j]<= self.qmax_x: 317 res.append( (self.data.data[j][i]- self.model.runXY(\ 318 [self.data.x_bins[i],self.data.y_bins[j]]))\ 319 /self.data.err_data[j][i] ) 314 if math.pow(self.data.x_bins[i],2)+math.pow(self.data.y_bins[j],2)>=math.pow(self.qmin_x,2): 315 if math.pow(self.data.x_bins[i],2)+math.pow(self.data.y_bins[j],2)<=math.pow(self.qmax_x,2): 316 #if self.data.y_bins[j]>= self.qmin_x and self.data.y_bins[j]<= self.qmax_x: 317 chisqrji=(self.data.data[j][i]- self.model.runXY(\ 318 [self.data.y_bins[j],self.data.x_bins[i]]))\ 319 /self.data.err_data[j][i] 320 res.append( math.pow(chisqrji,2) ) 320 321 sum=0 321 322 … … 324 325 sum +=item 325 326 #print "chisqr : sum 2D", xmin, xmax, ymin, ymax,sum 326 #print res327 self.tcChi.SetLabel(format_number(math.fabs(sum )))327 #print len(res) 328 self.tcChi.SetLabel(format_number(math.fabs(sum/ len(res)))) 328 329 except: 329 330 raise … … 361 362 if numpy.isfinite(item): 362 363 sum +=item 363 self.tcChi.SetLabel(format_number(math.fabs(sum )))364 self.tcChi.SetLabel(format_number(math.fabs(sum/ len(res)))) 364 365 except: 365 366 wx.PostEvent(self.parent.GrandParent, StatusEvent(status=\
Note: See TracChangeset
for help on using the changeset viewer.