1 | r""" |
---|
2 | This model provides the form factor, *P(q)*, for a monodisperse hollow right |
---|
3 | angle circular cylinder (tube) where the form factor is normalized by the |
---|
4 | volume of the tube |
---|
5 | |
---|
6 | *P(q)* = *scale* \* *<F*\ :sup:`2`\ *>* / *V*\ :sub:`shell` + *background* |
---|
7 | |
---|
8 | where the averaging < > is applied only for the 1D calculation. |
---|
9 | |
---|
10 | The inside and outside of the hollow cylinder are assumed have the same SLD. |
---|
11 | |
---|
12 | Definition |
---|
13 | ---------- |
---|
14 | |
---|
15 | The 1D scattering intensity is calculated in the following way (Guinier, 1955) |
---|
16 | |
---|
17 | .. math:: |
---|
18 | |
---|
19 | \begin{eqnarray} |
---|
20 | P(q)&=&(\text{scale})V_{shell}(\Delta\rho)^2\int_0^{1}\Psi^2[q_z, |
---|
21 | R_{shell}(1-x^2)^{1/2},R_{core}(1-x^2)^{1/2}][\frac{sin(qHx)}{qHx}]^2dx\\ |
---|
22 | \Psi[q,y,z]&=&\frac{1}{1-\gamma^2}[\Lambda(qy)-\gamma^2\Lambda(qz)]\\ |
---|
23 | \Lambda(a)&=&2J_1(a)/a\\ |
---|
24 | \gamma&=&R_{core}/R_{shell}\\ |
---|
25 | V_{shell}&=&\pi(R_{shell}^2-R_{core}^2)L\\ |
---|
26 | J_1(x)&=&\frac{(sin(x)-x\cdot cos(x))}{x^2}\\ |
---|
27 | \end{eqnarray} |
---|
28 | |
---|
29 | where *scale* is a scale factor and *J1* is the 1st order Bessel function. |
---|
30 | |
---|
31 | To provide easy access to the orientation of the core-shell cylinder, we define |
---|
32 | the axis of the cylinder using two angles |theta| and |phi|\ . As for the case |
---|
33 | of the cylinder, those angles are defined in Figure 2 of the CylinderModel. |
---|
34 | |
---|
35 | NB: The 2nd virial coefficient of the cylinder is calculated based on the radius |
---|
36 | and 2 length values, and used as the effective radius for *S(Q)* when |
---|
37 | *P(Q)* \* *S(Q)* is applied. |
---|
38 | |
---|
39 | In the parameters, the contrast represents SLD :sub:`shell` - SLD :sub:`solvent` |
---|
40 | and the *radius* = *R*\ :sub:`shell` while *core_radius* = *R*\ :sub:`core`. |
---|
41 | |
---|
42 | .. image:: img/image074.jpg |
---|
43 | |
---|
44 | *Figure. 1D plot using the default values (w/1000 data point).* |
---|
45 | |
---|
46 | Our model uses the form factor calculations implemented in a c-library provided |
---|
47 | by the NIST Center for Neutron Research (Kline, 2006). |
---|
48 | |
---|
49 | .. image:: img/image061.jpg |
---|
50 | |
---|
51 | *Figure. Definition of the angles for the oriented hollow_cylinder model.* |
---|
52 | |
---|
53 | .. image:: img/image062.jpg |
---|
54 | |
---|
55 | *Figure. Examples of the angles for oriented pp against the detector plane.* |
---|
56 | |
---|
57 | REFERENCE |
---|
58 | |
---|
59 | L A Feigin and D I Svergun, *Structure Analysis by Small-Angle X-Ray and |
---|
60 | Neutron Scattering*, Plenum Press, New York, (1987) |
---|
61 | """ |
---|
62 | |
---|
63 | from numpy import inf |
---|
64 | |
---|
65 | name = "hollow_cylinder" |
---|
66 | title = "" |
---|
67 | description = """ |
---|
68 | P(q) = scale*<f*f>/Vol + background, where f is the scattering amplitude. |
---|
69 | core_radius = the radius of core |
---|
70 | radius = the radius of shell |
---|
71 | length = the total length of the cylinder |
---|
72 | sld = SLD of the shell |
---|
73 | solvent_sld = SLD of the solvent |
---|
74 | background = incoherent background |
---|
75 | """ |
---|
76 | category = "shape:cylinder" |
---|
77 | |
---|
78 | # ["name", "units", default, [lower, upper], "type","description"], |
---|
79 | parameters = [ |
---|
80 | ["radius", "Ang", 30.0, [0, inf], "volume", "Cylinder radius"], |
---|
81 | ["core_radius", "Ang", 20.0, [0, inf], "volume", "Hollow core radius"], |
---|
82 | ["length", "Ang", 400.0, [0, inf], "volume", "Cylinder length"], |
---|
83 | ["sld", "1/Ang^2", 6.3, [-inf, inf], "", "Cylinder sld"], |
---|
84 | ["solvent_sld", "1/Ang^2", 1, [-inf, inf], "", "Solvent sld"], |
---|
85 | ["theta", "[deg]", 90, [-360, 360], "orientation", "Theta angle"], |
---|
86 | ["phi", "[deg]", 0, [-360, 360], "orientation", "Phi angle"], |
---|
87 | ] |
---|
88 | |
---|
89 | source = ["lib/J1.c", "lib/gauss76.c", "hollow_cylinder.c"] |
---|
90 | |
---|
91 | # parameters for demo |
---|
92 | demo = dict(scale=1.0,background=0.0,length=400.0,radius=30.0,core_radius=20.0, |
---|
93 | sld=6.3,solvent_sld=1,theta=90,phi=0, |
---|
94 | radius_pd=.2, radius_pd_n=9, |
---|
95 | length_pd=.2, length_pd_n=10, |
---|
96 | theta_pd=10, theta_pd_n=5, |
---|
97 | ) |
---|
98 | |
---|
99 | # For testing against the old sasview models, include the converted parameter |
---|
100 | # names and the target sasview model name. |
---|
101 | oldname = 'HollowCylinderModel' |
---|
102 | oldpars = dict(scale='scale',background='background',radius='radius', |
---|
103 | core_radius='core_radius',sld='sldCyl',length='length', |
---|
104 | solvent_sld='sldSolv',phi='axis_phi',theta='axis_theta') |
---|
105 | |
---|
106 | # Parameters for unit tests |
---|
107 | tests = [ |
---|
108 | [{"radius" : 30.0},0.00005,1764.926] |
---|
109 | ] |
---|