Changeset e4e9162 in sasview
 Timestamp:
 Oct 24, 2018 11:10:35 AM (3 months ago)
 Branches:
 py37sascalc
 Children:
 bbb725c
 Parents:
 1852b17
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

src/sas/sascalc/dataloader/manipulations.py
re090ba90 re4e9162 931 931 y = y/y_counts 932 932 y_err = np.sqrt(y_err)/y_counts 933 # The type of averaging: phi, q2, or q934 # Calculate x [i]should beat the center of the bin933 # The type of averaging: phi, q2, or q 934 # Calculate x values at the center of the bin 935 935 if run.lower() == 'phi': 936 step 936 step = (self.phi_max  self.phi_min) / self.nbins 937 937 x = (np.arange(self.nbins) + 0.5) * step + self.phi_min 938 938 else: 939 # We take the center of ring area, not radius. 940 # This is more accurate than taking the radial center of ring. 941 # delta_r = (self.r_max  self.r_min) / self.nbins 942 # r_inner = self.r_min + delta_r * i 943 # r_outer = r_inner + delta_r 944 # x[i] = math.sqrt((r_inner * r_inner + r_outer * r_outer) / 2) 939 # set q to the average of the q values within each bin 945 940 x = x/y_counts 941 942 ### Alternate algorithm 943 ## We take the center of ring area, not radius. 944 ## This is more accurate than taking the radial center of ring. 945 #step = (self.r_max  self.r_min) / self.nbins 946 #r_inner = self.r_min + step * np.arange(self.nbins) 947 #x = math.sqrt((r_inner**2 + (r_inner + step)**2) / 2) 946 948 947 949 idx = (np.isfinite(y) & np.isfinite(y_err))
Note: See TracChangeset
for help on using the changeset viewer.