Changeset 1e420e6 in sasmodels


Ignore:
Timestamp:
Sep 13, 2018 7:39:04 PM (6 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:
b6d1d52
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.