Changeset 5d4777d in sasmodels for sasmodels/models/cylinder.py
- Timestamp:
- Sep 1, 2014 11:24:38 PM (10 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:
- f4cf580
- Parents:
- ff7119b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/cylinder.py
ra7684e5 r5d4777d 1 # cylinder model 1 2 # Note: model title and parameter table are inserted automatically 2 3 r""" … … 31 32 To provide easy access to the orientation of the cylinder, we define the 32 33 axis of the cylinder using two angles $\theta$ and $\phi$. Those angles 33 are defined in Figure :num:`figure # CylinderModel-orientation`.34 are defined in Figure :num:`figure #cylinder-orientation`. 34 35 35 .. _ CylinderModel-orientation:36 .. _cylinder-orientation: 36 37 37 38 .. figure:: img/image061.JPG (should be img/cylinder-1.jpg, or img/cylinder-orientation.jpg) … … 64 65 Validation of our code was done by comparing the output of the 1D model 65 66 to the output of the software provided by the NIST (Kline, 2006). 66 Figure :num:`figure # CylinderModel-compare` shows a comparison of67 Figure :num:`figure #cylinder-compare` shows a comparison of 67 68 the 1D output of our model and the output of the NIST software. 68 69 69 .. _ CylinderModel-compare:70 .. _cylinder-compare: 70 71 71 72 .. figure:: img/image065.JPG … … 91 92 the intensity for fully oriented cylinders, we can compare the result of 92 93 averaging our 2D output using a uniform distribution $p(\theta, \phi) = 1.0$. 93 Figure :num:`figure # CylinderModel-crosscheck` shows the result of94 Figure :num:`figure #cylinder-crosscheck` shows the result of 94 95 such a cross-check. 95 96 96 .. _ CylinderModel-crosscheck:97 .. _cylinder-crosscheck: 97 98 98 99 .. figure:: img/image066.JPG … … 111 112 title = "Right circular cylinder with uniform scattering length density." 112 113 description = """ 113 f(q)= 2*(sldCyl - sldSolv)*V*sin(qLcos(alpha/2))114 P(q)= 2*(sld - solvent_sld)*V*sin(qLcos(alpha/2)) 114 115 /[qLcos(alpha/2)]*J1(qRsin(alpha/2))/[qRsin(alpha)] 115 116 … … 119 120 L: Length of the cylinder 120 121 J1: The bessel function 121 alpha: angle between the axis of the122 alpha: angle between the axis of the 122 123 cylinder and the q-vector for 1D 123 124 :the ouput is P(q)=scale/V*integral 124 125 from pi/2 to zero of... 125 f(q)^(2)*sin(alpha)*dalpha + bkg126 126 f(q)^(2)*sin(alpha)*dalpha + background 127 """ 127 128 128 129 parameters = [ … … 143 144 ] 144 145 145 source = [ "lib/J1.c", "lib/gauss76.c", " lib/cylkernel.c", "cylinder.c"]146 source = [ "lib/J1.c", "lib/gauss76.c", "cylinder.c" ] 146 147 147 148 def ER(radius, length):
Note: See TracChangeset
for help on using the changeset viewer.