Changeset 43e685d in sasview for sansview/perspectives/fitting
- Timestamp:
- Mar 17, 2010 3:26:55 PM (15 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:
- 90e5ca1
- Parents:
- c6f95bb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/model_thread.py
re575db9 r43e685d 48 48 49 49 if self.data != None: 50 self.I_data = self.data.data 50 51 self.qx_data = self.data.qx_data 51 52 self.qy_data = self.data.qy_data … … 68 69 self.qy_data = new_ybin 69 70 self.qx_data = new_xbin 71 # fake data 72 self.I_data = numpy.ones(len(self.qx_data)) 70 73 71 74 self.mask = numpy.ones(len(self.qx_data),dtype=bool) … … 74 77 radius= numpy.sqrt( self.qx_data*self.qx_data + self.qy_data*self.qy_data ) 75 78 index_data= (self.qmin<= radius)&(self.mask) 76 79 77 80 # For theory, qmax is based on 1d qmax 78 81 # so that must be mulitified by sqrt(2) to get actual max for 2d 79 82 index_model = ((self.qmin <= radius)&(radius<= self.qmax)) 80 83 self.mask = (index_model)&(self.mask) 81 84 self.mask = (self.mask)&(numpy.isfinite(self.I_data)) 82 85 if self.data ==None: 83 86 # Only qmin value will be consider for the detector … … 87 90 88 91 output = numpy.zeros(len(self.mask)) 92 93 # output default is None 94 # This method is to distinguish between masked point and data point = 0. 95 output = output/output 96 # set value for self.mask==True, else still None to Plottools 89 97 output[self.mask] = value 90 98
Note: See TracChangeset
for help on using the changeset viewer.