Changeset 0f6c41c in sasmodels


Ignore:
Timestamp:
Aug 6, 2017 4:46:11 PM (7 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
4553dae
Parents:
97d89af
Message:

set range of randomly generated magnetic SLDs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/compare.py

    r97d89af r0f6c41c  
    345345 
    346346    # If the paramter is marked as an sld use the range of neutron slds 
    347     # Should be doing something with randomly selected contrast matching 
    348     # but for now use random contrasts.  Since real data is contrast-matched, 
    349     # this will favour selection of hollow models when they exist. 
     347    # TODO: ought to randomly contrast match a pair of SLDs 
    350348    if par.type == 'sld': 
    351         # Range of neutron SLDs 
    352349        return np.random.uniform(-0.5, 12) 
     350 
     351    # Limit magnetic SLDs to a smaller range, from zero to iron=5/A^2 
     352    if par.name.startswith('M0:'): 
     353        return np.random.uniform(0, 5) 
    353354 
    354355    # Guess at the random length/radius/thickness.  In practice, all models 
Note: See TracChangeset for help on using the changeset viewer.