Changeset 1e420e6 in sasmodels


Ignore:
Timestamp:
Sep 13, 2018 9:39:04 PM (8 days ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
ticket-1157
Children:
d50097d
Parents:
b6dab59
Message:

improve safety check when setting background to 0.0 for structure factors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/modelinfo.py

    rb6dab59 r1e420e6  
    787787    structure_factor = getattr(kernel_module, 'structure_factor', False) 
    788788    if structure_factor: 
    789         # Make sure background is the second common parameter 
    790         assert COMMON_PARAMETERS[1][0] == "background" 
     789        # Make sure background is the second common parameter. 
     790        assert parameters.common_parameters[1].id == "background" 
    791791        parameters.common_parameters[1].default = 0.0 
    792792 
Note: See TracChangeset for help on using the changeset viewer.