Changeset 52611f5 in sasview for sansview/perspectives
- Timestamp:
- Apr 27, 2009 2:19:11 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:
- 43d00c4
- Parents:
- 15ff344
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/gui_thread.py
r15ff344 r52611f5 52 52 """ 53 53 self.starttime = time.time() 54 54 55 x,y = [numpy.asarray(v) for v in (self.x,self.y)] 55 56 if self.dy==None or self.dy==[]: 56 57 self.dy= numpy.zeros(len(self.y)) 57 58 self.dy[self.dy==0]=1 59 58 60 if self.qmin==None: 59 self.qmin= min(self.x) 61 if min (self.x) ==0.0 and self.x[0]==0 and not numpy.isfinite(self.y[0]): 62 self.qmin = min(self.x[sel.x!=0]) 63 else: 64 self.qmin= min(self.x) 60 65 61 66 if self.qmax==None: … … 71 76 72 77 # Check whether we need to bail out 73 self.isquit() 78 self.isquit() 79 74 80 fx[i_x]=self.model.run(self.x[i_x]) 75 81 76 82 if self.smearer!=None: 77 83 fx= self.smearer(fx) 84 78 85 for i_y in range(len(fx)): 79 86 # Check whether we need to bail out 80 87 self.isquit() 88 81 89 temp=(self.y[i_y] - fx[i_y])/self.dy[i_y] 82 90 res.append(temp*temp) 83 84 85 91 #sum of residuals 86 92 sum=0
Note: See TracChangeset
for help on using the changeset viewer.