Changeset 7b78bb6 in sasview for sansview/perspectives
- Timestamp:
- Apr 14, 2009 3:50:45 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:
- 25a608f5
- Parents:
- 196deac
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitpage.py
r7b0fd65 r7b78bb6 495 495 from sans.guiframe.utils import check_value 496 496 flag = check_value( self.qmin, self.qmax) 497 497 err_image = self.data.err_image 498 if err_image==[] or err_image==None: 499 err_image= numpy.zeros(len(self.data.x_bins),len(self.data.y_bins)) 500 501 err_image[err_image==0]=1 498 502 res=[] 499 503 if flag== True: … … 504 508 for j in range(len(self.data.y_bins)): 505 509 #Check the range containing data between self.qmin_x and self.qmax_x 506 if math.pow(self.data.x_bins[i],2)+math.pow(self.data.y_bins[j],2)>=math.pow(self.qmin_x,2):507 if math.pow(self.data.x_bins[i],2)+math.pow(self.data.y_bins[j],2)<=math.pow(self.qmax_x,2):508 chisqrji=(self.data.data[j][i]- self.model.runXY(\509 [self.data.x_bins[i],self.data.y_bins[j]]))\510 /self.data.err_data[j][i]511 512 510 value = math.pow(self.data.x_bins[i],2)+ math.pow(self.data.y_bins[j],2) 511 if value >= math.pow(self.qmin_x,2) and value <= math.pow(self.qmax_x,2): 512 temp = [self.data.x_bins[i],self.data.y_bins[j]] 513 error= self.data.err_data[j][i] 514 chisqrji = (self.data.data[j][i]- self.model.runXY(temp ))/error 515 #Vector containing residuals 516 res.append( math.pow(chisqrji,2) ) 513 517 # compute sum of residual 514 518 sum=0
Note: See TracChangeset
for help on using the changeset viewer.