Changeset bad9ae2 in sasview
- Timestamp:
- Dec 1, 2009 9:21:24 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:
- f521f61
- Parents:
- 7a108dd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Invariant/invariant.py
r7a108dd rbad9ae2 215 215 fx= Functor(data , function) 216 216 y = data.y 217 out, cov_x= linalg.lstsq(y,fx)217 slope, constant = linalg.lstsq(y,fx) 218 218 @param qmin: data first q value to consider during the fit 219 219 @param qmax: data last q value to consider during the fit … … 320 320 where n >= len(data.x)-1 321 321 dxi = 1/2*(xi+1 - xi) + (xi - xi-1) 322 dx0 = (x1 - x0)/2322 dx0 = x0 + (x1 - x0)/2 323 323 dxn = xn - xn-1 324 324 @param data: the data to use to compute invariant. … … 332 332 n = len(data.x)- 1 333 333 #compute the first delta q 334 dx0 = (data.x[1] -data.x[0])/2334 dx0 = (data.x[1] + data.x[0])/2 335 335 #compute the last delta q 336 336 dxn = data.x[n] - data.x[n-1] … … 687 687 # Data boundaries for fiiting 688 688 x_len = len(self._data.x) - 1 689 qmin = self._data.x[x_len - (self._high_extrapolation_npts - 1) 689 qmin = self._data.x[x_len - (self._high_extrapolation_npts - 1)] 690 690 qmax = self._data.x[x_len] 691 691 … … 759 759 #check value inside the sqrt function 760 760 value = 1 - k * self._qstar 761 if ( 1 - k * self._qstar) <= 0:761 if (value) <= 0: 762 762 raise ValueError, "Cannot compute incertainty on volume" 763 763 # Compute uncertainty
Note: See TracChangeset
for help on using the changeset viewer.