Changeset a151caa in sasmodels for sasmodels/models/be_polyelectrolyte.py
- Timestamp:
- Jul 28, 2017 10:49:09 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:
- 404ebbd
- Parents:
- 0bdddc2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/be_polyelectrolyte.py
r3330bb4 ra151caa 17 17 r_{0}^2 = \frac{1}{\alpha \sqrt{C_a} \left( b/\sqrt{48\pi L_b}\right)} 18 18 19 where 19 where 20 20 21 21 $K$ is the contrast factor for the polymer which is defined differently than in … … 28 28 29 29 a = b_p - (v_p/v_s) b_s 30 30 31 31 where $b_p$ and $b_s$ are sum of the scattering lengths of the atoms 32 32 constituting the monomer of the polymer and the sum of the scattering lengths … … 35 35 36 36 $L_b$ is the Bjerrum length(|Ang|) - **Note:** This parameter needs to be 37 kept constant for a given solvent and temperature! 37 kept constant for a given solvent and temperature! 38 38 39 39 $h$ is the virial parameter (|Ang^3|/mol) - **Note:** See [#Borue]_ for the … … 67 67 * **Author:** NIST IGOR/DANSE **Date:** pre 2010 68 68 * **Last Modified by:** Paul Kienzle **Date:** July 24, 2016 69 * **Last Reviewed by:** Paul Butler and Richard Heenan **Date:** 69 * **Last Reviewed by:** Paul Butler and Richard Heenan **Date:** 70 70 October 07, 2016 71 71 """ … … 139 139 Iq.vectorized = True # Iq accepts an array of q values 140 140 141 def random(): 142 import numpy as np 143 pars = dict( 144 scale=10000, #background=0, 145 #polymer_concentration=0.7, 146 polymer_concentration=np.random.beta(5, 3), # around 70% 147 #salt_concentration=0.0, 148 # keep salt concentration extremely low 149 # and use explicit molar to match polymer concentration 150 salt_concentration=np.random.beta(1, 100)*6.022136e-4, 151 #contrast_factor=10.0, 152 contrast_fact=np.random.uniform(1, 100), 153 #bjerrum_length=7.1, 154 bjerrum_length=np.random.uniform(1, 10), 155 #virial_param=12.0, 156 virial_param=np.random.uniform(-1000, 30), 157 #monomer_length=10.0, 158 monomer_length=10.0**(4*np.random.beta(1.5, 3)), 159 #ionization_degree=0.05, 160 ionization_degree=np.random.beta(1.5, 4), 161 ) 162 return pars 141 163 142 164 demo = dict(scale=1, background=0.1,
Note: See TracChangeset
for help on using the changeset viewer.