Changeset 2d81cfe in sasmodels for sasmodels/models/polymer_excl_volume.py
- Timestamp:
- Nov 29, 2017 11:13:23 AM (6 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 237b800f
- Parents:
- a839b22
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/polymer_excl_volume.py
r404ebbd r2d81cfe 90 90 B Hammouda, *SANS from Homogeneous Polymer Mixtures - A Unified Overview, 91 91 Advances in Polym. Sci.* 106(1993) 87-133 92 93 92 """ 94 93 94 import numpy as np 95 95 from numpy import inf, power, errstate 96 96 from scipy.special import gammainc, gamma … … 124 124 with errstate(divide='ignore', invalid='ignore'): 125 125 upow = power(usub, -0.5*porod_exp) 126 result = (porod_exp*upow *127 (gamma(0.5*porod_exp)*gammainc(0.5*porod_exp, usub) -128 upow*gamma(porod_exp)*gammainc(porod_exp, usub)))126 result = (porod_exp*upow * 127 (gamma(0.5*porod_exp)*gammainc(0.5*porod_exp, usub) - 128 upow*gamma(porod_exp)*gammainc(porod_exp, usub))) 129 129 result[q <= 0] = 1.0 130 130 … … 134 134 135 135 def random(): 136 import numpy as np137 136 rg = 10**np.random.uniform(0, 4) 138 137 porod_exp = np.random.uniform(1e-3, 6)
Note: See TracChangeset
for help on using the changeset viewer.