Changeset 32f87a5 in sasmodels for sasmodels/direct_model.py


Ignore:
Timestamp:
Oct 18, 2017 12:08:54 AM (7 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
fbb9397
Parents:
8698a0d
Message:

update sasview wrapper with new way of handling orientation dispersity

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/direct_model.py

    r8698a0d r32f87a5  
    141141    npts = values.get(parameter.name+'_pd_n', 0) 
    142142    width = values.get(parameter.name+'_pd', 0.0) 
     143    relative = parameter.relative_pd 
    143144    if npts == 0 or width == 0 or not active: 
    144145        # Note: orientation parameters have the viewing angle as the parameter 
    145146        # value and the jitter in the distribution, so be sure to set the 
    146147        # empty pd for orientation parameters to 0. 
    147         pd = [value if parameter.type != 'orientation' else 0.0], [1.0] 
    148     else: 
    149         relative = parameter.relative_pd 
     148        pd = [value if relative else 0.0], [1.0] 
     149    else: 
    150150        limits = parameter.limits 
    151151        disperser = values.get(parameter.name+'_pd_type', 'gaussian') 
Note: See TracChangeset for help on using the changeset viewer.