Changeset 25a92d1 in sasview
- Timestamp:
- Dec 18, 2009 3:37:23 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:
- 6e74ee4
- Parents:
- c8c4fa1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Invariant/invariant.py
reb62193 r25a92d1 121 121 power = power 122 122 fx = numpy.zeros(len(self.data.x)) 123 sigma = numpy.zeros(len(self.data.x))123 one = numpy.ones(len(self.data.x)) 124 124 125 125 #define dy^2 126 sigma = self.data.dy[self.idx_unsmeared ] 126 try: 127 sigma = self.data.dy[self.idx_unsmeared ] 128 except: 129 print "The dy data for Invariant calculation should be prepared before get to FitFunctor.fit()..." 130 sigma = one[self.idx_unsmeared ] 127 131 sigma2 = sigma*sigma 128 132 … … 199 203 raise ValueError,"Data must be of type DataLoader.Data1D" 200 204 new_data = self._scale * data - self._background 201 new_data.dy = data.dy 202 new_data.dxl = data.dxl 203 new_data.dxw = data.dxw 205 try: 206 #All data should pass here. 207 new_data.dy = data.dy 208 new_data.dxl = data.dxl 209 new_data.dxw = data.dxw 210 except: 211 #in case... 212 new_data.dy = numpy.ones(len(data.x)) 213 new_data.dxl = numpy.zeros(len(data.x)) 214 new_data.dxw = numpy.zeros(len(data.x)) 215 204 216 return new_data 205 217
Note: See TracChangeset
for help on using the changeset viewer.