Changeset 7b7fcf0 in sasmodels
 Timestamp:
 Feb 7, 2017 5:55:02 PM (6 years ago)
 Branches:
 master, core_shell_microgels, costrafo411, magnetic_model, ticket1257vesicleproduct, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
 Children:
 0813a99
 Parents:
 1105286
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

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