Changeset bbb887d in sasmodels


Ignore:
Timestamp:
Jun 7, 2018 3:35:11 PM (6 months ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, F1F2models_grethe, beta_approx, cuda-test, py3, ticket-1015-gpu-mem-error, ticket-1015-quick-fix, ticket-1157, ticket-608-user-defined-weights, ticket_1156
Children:
7420664
Parents:
2b2d431
Message:

define lower q limit equal to upper q limit with log spacing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/resolution.py

    r2b2d431 rbbb887d  
    189189    weights = cdf[1:] - cdf[:-1] 
    190190    # Limit q range to +/- 2.5 sigma 
    191     weights[q_calc[:, None] < (q - nsigma*q_width)[None, :]] = 0. 
    192     weights[q_calc[:, None] > (q + nsigma*q_width)[None, :]] = 0. 
     191    qhigh = q + nsigma*q_width 
     192    #qlow = q - nsigma*q_width  # linear limits 
     193    qlow = q*q/qhigh  # log limits 
     194    weights[q_calc[:, None] < qlow[None, :]] = 0. 
     195    weights[q_calc[:, None] > qhigh[None, :]] = 0. 
    193196    weights /= np.sum(weights, axis=0)[None, :] 
    194197    return weights 
Note: See TracChangeset for help on using the changeset viewer.