Changeset 4acca8c in sasview for src/sas/sascalc
- Timestamp:
- Mar 26, 2019 9:44:01 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl
- Children:
- 3beadede
- Parents:
- f7e6b30 (diff), 60e20d8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/corfunc/transform_thread.py
ra859f99 rf7e6b30 45 45 # gamma3(R) = 1/R int_{0}^{R} gamma1(x) dx 46 46 # trapz uses the trapezium rule to calculate the integral 47 mask = xs <= 200.0 # Only calculate gamma3 up to x=200 (as this is all that's plotted)48 47 # gamma3 = [trapz(gamma1[:n], xs[:n])/xs[n-1] for n in range(2, len(xs[mask]) + 1)]j 49 48 # gamma3.insert(0, 1.0) # Gamma_3(0) is defined as 1 50 n = len(xs [mask])49 n = len(xs) 51 50 gamma3 = cumtrapz(gamma1[:n], xs[:n])/xs[1:n] 52 51 gamma3 = np.hstack((1.0, gamma3)) # Gamma_3(0) is defined as 1 … … 79 78 80 79 transform1 = Data1D(xs, gamma1) 81 transform3 = Data1D(xs [xs <= 200], gamma3)80 transform3 = Data1D(xs, gamma3) 82 81 idf = Data1D(xs, idf) 83 82
Note: See TracChangeset
for help on using the changeset viewer.