1 | r""" |
---|
2 | Definition |
---|
3 | ---------- |
---|
4 | |
---|
5 | Calculates L3_Porcar_et_alNEW. |
---|
6 | |
---|
7 | Form factor of discoids averaged over random orientations |
---|
8 | |
---|
9 | References |
---|
10 | ---------- |
---|
11 | |
---|
12 | Authorship and Verification |
---|
13 | --------------------------- |
---|
14 | |
---|
15 | * **Author:** --- **Date:** 2018YYY-08m-07d |
---|
16 | * **Last Modified by:** --- **Date:** 2018YYY-08m-07d |
---|
17 | * **Last Reviewed by:** --- **Date:** 2018YYY-08m-07d |
---|
18 | """ |
---|
19 | |
---|
20 | from math import * |
---|
21 | from numpy import inf |
---|
22 | |
---|
23 | name = "L3_Porcar_et_alNEW" |
---|
24 | title = "User model for L3_Porcar_et_alNEW" |
---|
25 | description = """Form factor of discoids averaged over random orientations""" |
---|
26 | |
---|
27 | parameters = [ |
---|
28 | # ["name", "units", default, [lower, upper], "type", "description"], |
---|
29 | ['sld_solv', '', 6.35, [-inf, inf], '', ''], |
---|
30 | ['sld_L3', '', 0.8, [-inf, inf], '', ''], |
---|
31 | ['thickness', '', 300, [-inf, inf], '', ''], |
---|
32 | ['radii', '', 700, [-inf, inf], '', ''], |
---|
33 | ] |
---|
34 | |
---|
35 | def Iq(x, sld_solv, sld_L3, thickness, radii): |
---|
36 | """Absolute scattering""" |
---|
37 | if x > 0: |
---|
38 | |
---|
39 | y = 4*(pi*(radii**2)*((sld_L3 - sld_solv)**2))*((1 - cos(x*thickness)*exp(- (x**2)*(thickness**2)/32))/(x**2))/((x**2)*(radii**2) + 2*exp(- (x**2)*(radii**2)/6)) |
---|
40 | |
---|
41 | else: |
---|
42 | |
---|
43 | y= 1 |
---|
44 | |
---|
45 | return y |
---|
46 | ## uncomment the following if Iq works for vector x |
---|
47 | #Iq.vectorized = True |
---|
48 | |
---|
49 | #def Iqxy(x, y, sld_solv, sld_L3, thickness, radii): |
---|
50 | # """Absolute scattering of oriented particles.""" |
---|
51 | # ... |
---|
52 | # return oriented_form(x, y, args) |
---|
53 | ## uncomment the following if Iqxy works for vector x, y |
---|
54 | #Iqxy.vectorized = True |
---|