Changes in / [d24e390:f4b36fa] in sasmodels
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/resolution.py
r7b7fcf0 rb397165 84 84 self.weight_matrix = pinhole_resolution(self.q_calc, self.q, 85 85 np.maximum(q_width, MINIMUM_RESOLUTION)) 86 self.q_calc = abs(self.q_calc)87 86 88 87 def apply(self, theory): … … 126 125 self.weight_matrix = \ 127 126 slit_resolution(self.q_calc, self.q, qx_width, qy_width) 128 self.q_calc = abs(self.q_calc)129 127 130 128 def apply(self, theory): … … 155 153 # neither trapezoid nor Simpson's rule improved the accuracy. 156 154 edges = bin_edges(q_calc) 157 #edges[edges < 0.0] = 0.0 # clip edges below zero155 edges[edges < 0.0] = 0.0 # clip edges below zero 158 156 cdf = erf((edges[:, None] - q[None, :]) / (sqrt(2.0)*q_width)[None, :]) 159 157 weights = cdf[1:] - cdf[:-1] … … 288 286 # The current algorithm is a midpoint rectangle rule. 289 287 q_edges = bin_edges(q_calc) # Note: requires q > 0 290 #q_edges[q_edges < 0.0] = 0.0 # clip edges below zero288 q_edges[q_edges < 0.0] = 0.0 # clip edges below zero 291 289 weights = np.zeros((len(q), len(q_calc)), 'd') 292 290
Note: See TracChangeset
for help on using the changeset viewer.