- Timestamp:
- Mar 26, 2019 3:42:44 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl
- Children:
- 4acca8c
- Parents:
- 4b796b8
- Location:
- src/sas
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Corfunc/CorfuncPerspective.py
r4b796b8 rf7e6b30 95 95 self.axes.plot(data_idf.x, data_idf.y, 96 96 label="Interface Distribution Function") 97 self.axes.set_xlim( min(data1.x), max(data1.x) / 4)97 self.axes.set_xlim(0, max(data1.x) / 4) 98 98 self.axes.legend() 99 99 -
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.