Changeset b297ba9 in sasmodels for sasmodels/models/rectangular_prism.py
- Timestamp:
- Mar 20, 2019 7:03:50 PM (5 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 4e28511
- Parents:
- 0d362b7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/rectangular_prism.py
r99658f6 rb297ba9 32 32 .. math:: 33 33 34 A_P\,(q) =34 A_P\,(q) = 35 35 \frac{\sin \left( \tfrac{1}{2}qC \cos\theta \right) }{\tfrac{1}{2} qC \cos\theta} 36 36 \,\times\, … … 48 48 49 49 .. math:: 50 P(q) = \frac{2}{\pi} \int_0^{\frac{\pi}{2}} \,51 \int_0^{\frac{\pi}{2}} A_P^2(q) \, \sin\theta \, d\theta \, d\phi50 P(q) = \frac{2}{\pi} \int_0^{\frac{\pi}{2}} \, 51 \int_0^{\frac{\pi}{2}} A_P^2(q) \, \sin\theta \, d\theta \, d\phi 52 52 53 53 And the 1D scattering intensity is calculated as 54 54 55 55 .. math:: 56 I(q) = \text{scale} \times V \times (\rho_\text{p} -57 \rho_\text{solvent})^2 \times P(q)56 I(q) = \text{scale} \times V \times (\rho_\text{p} - 57 \rho_\text{solvent})^2 \times P(q) 58 58 59 59 where $V$ is the volume of the rectangular prism, $\rho_\text{p}$ … … 100 100 R Nayuk and K Huber, *Z. Phys. Chem.*, 226 (2012) 837-854 101 101 102 L. Onsager, Ann. New York Acad. Sci. 51, 627-659 (1949). 102 L. Onsager, Ann. New York Acad. Sci. 51, 627-659 (1949). 103 103 104 104 """ 105 105 106 106 import numpy as np 107 from numpy import pi, inf, sqrt107 from numpy import inf 108 108 109 109 name = "rectangular_prism" … … 140 140 have_Fq = True 141 141 effective_radius_type = [ 142 "equivalent cylinder excluded volume", "equivalent volume sphere", 142 "equivalent cylinder excluded volume", "equivalent volume sphere", 143 143 "half length_a", "half length_b", "half length_c", 144 144 "equivalent circular cross-section", "half ab diagonal", "half diagonal", … … 146 146 147 147 def random(): 148 """Return a random parameter set for the model.""" 148 149 a, b, c = 10**np.random.uniform(1, 4.7, size=3) 149 150 pars = dict(
Note: See TracChangeset
for help on using the changeset viewer.