Changeset 40a87fa in sasmodels for sasmodels/models/unified_power_Rg.py
- Timestamp:
- Aug 8, 2016 9:24:11 AM (8 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 2472141
- Parents:
- 2d65d51
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/unified_power_Rg.py
r785cbec r40a87fa 37 37 $q_i^*$ which is ignored here. 38 38 39 For example, to approximate the scattering from random coils (Debye _equation),39 For example, to approximate the scattering from random coils (Debye equation), 40 40 set $R_{gi}$ as the Guinier radius, $P_i = 2$, and $B_i = 2 G_i / R_{gi}$ 41 41 … … 65 65 from scipy.special import erf 66 66 67 category = "shape-independent" 68 69 # pylint: disable=bad-whitespace, line-too-long 67 70 parameters = [ 68 71 ["level", "", 1, [0, 6], "", "Level number"], … … 72 75 ["G[level]", "1/cm", 400, [0, inf], "", ""], 73 76 ] 74 category = "shape-independent" 77 # pylint: enable=bad-whitespace, line-too-long 75 78 76 79 def Iq(q, level, rg, power, B, G): … … 87 90 exp_next = exp(-(q*rg[i+1])**2/3.) if i < ilevel-1 else 1. 88 91 result += G[i]*exp_now + B[i]*exp_next*pow_now 89 result[q ==0] = np.sum(G[:ilevel])92 result[q == 0] = np.sum(G[:ilevel]) 90 93 return result 91 94
Note: See TracChangeset
for help on using the changeset viewer.