Changeset 31df0c9 in sasmodels for sasmodels/models/rectangular_prism.py


Ignore:
Timestamp:
Aug 1, 2017 4:38:47 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:
1511c37c
Parents:
d49ca5c
Message:

tuned random model generation for more models

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/rectangular_prism.py

    rab2aea8 r31df0c9  
    104104              ["length_a", "Ang", 35, [0, inf], "volume", 
    105105               "Shorter side of the parallelepiped"], 
    106               ["b2a_ratio", "Ang", 1, [0, inf], "volume", 
     106              ["b2a_ratio", "", 1, [0, inf], "volume", 
    107107               "Ratio sides b/a"], 
    108               ["c2a_ratio", "Ang", 1, [0, inf], "volume", 
     108              ["c2a_ratio", "", 1, [0, inf], "volume", 
    109109               "Ratio sides c/a"], 
    110110             ] 
     
    125125    return 0.5 * (ddd) ** (1. / 3.) 
    126126 
     127def random(): 
     128    import numpy as np 
     129    a, b, c = 10**np.random.uniform(1, 4.7, size=3) 
     130    pars = dict( 
     131        length_a=a, 
     132        b2a_ratio=b/a, 
     133        c2a_ratio=c/a, 
     134    ) 
     135    return pars 
    127136 
    128137# parameters for demo 
Note: See TracChangeset for help on using the changeset viewer.