1 | |
---|
2 | from math import * |
---|
3 | import os |
---|
4 | import sys |
---|
5 | import numpy |
---|
6 | |
---|
7 | #name |
---|
8 | name = "L3_Sq" |
---|
9 | |
---|
10 | #title |
---|
11 | title = "User model for L3_Sq" |
---|
12 | |
---|
13 | #description |
---|
14 | description = "Lei et al. structure factor_Porte et al." |
---|
15 | |
---|
16 | #parameters |
---|
17 | parameters = [ |
---|
18 | ['A', '', 1, [-numpy.inf, numpy.inf], '', ''], |
---|
19 | ['B', '', 1, [-numpy.inf, numpy.inf], '', ''], |
---|
20 | ['q3', '', 0.05, [-numpy.inf, numpy.inf], '', ''], |
---|
21 | ['CorrLength', '', 20, [-numpy.inf, numpy.inf], '', ''], |
---|
22 | ['CorrLength3', '', 40, [-numpy.inf, numpy.inf], '', ''], |
---|
23 | ] |
---|
24 | |
---|
25 | |
---|
26 | def form_volume(*arg): |
---|
27 | return 1.0 |
---|
28 | |
---|
29 | def ER(*arg): |
---|
30 | return 1.0 |
---|
31 | |
---|
32 | def Iq(x , A, B, q3, CorrLength, CorrLength3): |
---|
33 | if x > 0: |
---|
34 | |
---|
35 | y = 1 + ((A*atan(x*CorrLength/2))/x) + (B/((1/(CorrLength3**2)) + (x - q3)**2)) |
---|
36 | |
---|
37 | else: |
---|
38 | |
---|
39 | y = 1 |
---|
40 | |
---|
41 | return y |
---|
42 | |
---|
43 | def Iqxy(x, y , A, B, q3, CorrLength, CorrLength3): |
---|
44 | return Iq(numpy.sqrt(x**2+y**2) , A, B, q3, CorrLength, CorrLength3) |
---|