1 | |
---|
2 | from math import * |
---|
3 | import os |
---|
4 | import sys |
---|
5 | import numpy |
---|
6 | |
---|
7 | #name |
---|
8 | name = "L3_Porcar_et_al" |
---|
9 | |
---|
10 | #title |
---|
11 | title = "User model for L3_Porcar_et_al" |
---|
12 | |
---|
13 | #description |
---|
14 | description = "Form factor of discoids averaged over random orientations" |
---|
15 | |
---|
16 | #parameters |
---|
17 | parameters = [ |
---|
18 | ['sld_solv', '', 6.35, [-numpy.inf, numpy.inf], '', ''], |
---|
19 | ['sld_L3', '', 0.8, [-numpy.inf, numpy.inf], '', ''], |
---|
20 | ['thickness', '', 300, [-numpy.inf, numpy.inf], 'volume', ''], |
---|
21 | ['radii', '', 700, [-numpy.inf, numpy.inf], 'volume', ''], |
---|
22 | ] |
---|
23 | |
---|
24 | |
---|
25 | def form_volume(*arg): |
---|
26 | return 1.0 |
---|
27 | |
---|
28 | def ER(*arg): |
---|
29 | return 1.0 |
---|
30 | |
---|
31 | def Iq(x , sld_solv, sld_L3, thickness, radii): |
---|
32 | if x > 0: |
---|
33 | |
---|
34 | 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)) |
---|
35 | else: |
---|
36 | |
---|
37 | y = 1 |
---|
38 | |
---|
39 | return y |
---|
40 | |
---|
41 | #def Iqxy(x, y , sld_solv, sld_L3, thickness, radii): |
---|
42 | # return Iq(numpy.sqrt(x**2+y**2) , sld_solv, sld_L3, thickness, radii) |
---|