Changeset d49ca5c in sasmodels
- Timestamp:
- Jul 31, 2017 6:00:13 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:
- 31df0c9
- Parents:
- 109d963
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/core_shell_sphere.py
r925ad6e rd49ca5c 57 57 title = "Form factor for a monodisperse spherical particle with particle with a core-shell structure." 58 58 description = """ 59 F^2(q) = 3/V_s [V_c (sld_core-sld_shell) (sin(q*radius)-q*radius*cos(q*radius))/(q*radius)^3 59 F^2(q) = 3/V_s [V_c (sld_core-sld_shell) (sin(q*radius)-q*radius*cos(q*radius))/(q*radius)^3 60 60 + V_s (sld_shell-sld_solvent) (sin(q*r_s)-q*r_s*cos(q*r_s))/(q*r_s)^3] 61 61 … … 99 99 return whole, whole - core 100 100 101 def random(): 102 import numpy as np 103 total_radius = 10**np.random.uniform(1.3, 4.3) 104 radius = np.random.uniform(0, 1)*total_radius 105 thickness = total_radius - radius 106 Vf = 10**np.random.uniform(4, 6)/total_radius**3 107 pars = dict( 108 scale=Vf, 109 radius=radius, 110 thickness=thickness, 111 ) 112 return pars 113 101 114 tests = [ 102 115 [{'radius': 20.0, 'thickness': 10.0}, 'ER', 30.0],
Note: See TracChangeset
for help on using the changeset viewer.