Changes in / [f4b36fa:d24e390] in sasmodels


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/resolution.py

    rb397165 r7b7fcf0  
    8484        self.weight_matrix = pinhole_resolution(self.q_calc, self.q, 
    8585                                np.maximum(q_width, MINIMUM_RESOLUTION)) 
     86        self.q_calc = abs(self.q_calc) 
    8687 
    8788    def apply(self, theory): 
     
    125126        self.weight_matrix = \ 
    126127            slit_resolution(self.q_calc, self.q, qx_width, qy_width) 
     128        self.q_calc = abs(self.q_calc) 
    127129 
    128130    def apply(self, theory): 
     
    153155    # neither trapezoid nor Simpson's rule improved the accuracy. 
    154156    edges = bin_edges(q_calc) 
    155     edges[edges < 0.0] = 0.0 # clip edges below zero 
     157    #edges[edges < 0.0] = 0.0 # clip edges below zero 
    156158    cdf = erf((edges[:, None] - q[None, :]) / (sqrt(2.0)*q_width)[None, :]) 
    157159    weights = cdf[1:] - cdf[:-1] 
     
    286288    # The current algorithm is a midpoint rectangle rule. 
    287289    q_edges = bin_edges(q_calc) # Note: requires q > 0 
    288     q_edges[q_edges < 0.0] = 0.0 # clip edges below zero 
     290    #q_edges[q_edges < 0.0] = 0.0 # clip edges below zero 
    289291    weights = np.zeros((len(q), len(q_calc)), 'd') 
    290292 
Note: See TracChangeset for help on using the changeset viewer.