Changeset 404ebbd in sasmodels for sasmodels/models/guinier.py
- Timestamp:
- Jul 29, 2017 10:56:22 PM (7 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 48462b0
- Parents:
- a151caa
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/guinier.py
r3330bb4 r404ebbd 33 33 description = """ 34 34 I(q) = scale.exp ( - rg^2 q^2 / 3.0 ) 35 35 36 36 List of default parameters: 37 37 scale = scale … … 49 49 """ 50 50 51 def random(): 52 import numpy as np 53 scale = 10**np.random.uniform(1, 5) 54 # Note: compare.py has rg cutoff for guinier, so use that 55 q_max = 1.0 56 rg_max = np.sqrt(90*np.log(10) + 3*np.log(scale))/q_max 57 rg = 10**np.random.uniform(0, np.log10(rg_max)) 58 pars = dict( 59 #background=0, 60 scale=scale, 61 rg=rg, 62 ) 63 return pars 64 51 65 # parameters for demo 52 66 demo = dict(scale=1.0, rg=60.0)
Note: See TracChangeset
for help on using the changeset viewer.