Changeset 3c56da87 in sasmodels for sasmodels/models/barbell.py
- Timestamp:
- Mar 4, 2015 10:55:38 PM (9 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:
- 3a45c2c
- Parents:
- b89f519
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/barbell.py
r9890053 r3c56da87 4 4 r""" 5 5 6 Calculates the scattering from a barbell-shaped cylinder (This model simply becomes the DumBellModel when the length of 7 the cylinder, *L*, is set to zero). That is, a sphereocylinder with spherical end caps that have a radius larger than 8 that of the cylinder and the center of the end cap radius lies outside of the cylinder. All dimensions of the BarBell 9 are considered to be monodisperse. See the diagram for the details of the geometry and restrictions on parameter values. 6 Calculates the scattering from a barbell-shaped cylinder (This model simply 7 becomes the DumBellModel when the length of the cylinder, *L*, is set to zero). 8 That is, a sphereocylinder with spherical end caps that have a radius larger 9 than that of the cylinder and the center of the end cap radius lies outside 10 of the cylinder. All dimensions of the BarBell are considered to be 11 monodisperse. See the diagram for the details of the geometry and restrictions 12 on parameter values. 10 13 11 14 Definition … … 18 21 .. image:: img/barbell_geometry.jpg 19 22 20 where *r* is the radius of the cylinder. All other parameters are as defined in the diagram. 23 where *r* is the radius of the cylinder. All other parameters are as defined 24 in the diagram. 21 25 22 26 Since the end cap radius 23 *R* >= *r* and by definition for this geometry *h* < 0, *h* is then defined by *r* and *R* as 27 *R* >= *r* and by definition for this geometry *h* < 0, *h* is then 28 defined by *r* and *R* as 24 29 25 30 *h* = -1 \* sqrt(*R*\ :sup:`2` - *r*\ :sup:`2`) … … 46 51 \over QR\sin\theta \left(1-t^2\right)^{1/2}} 47 52 48 The < > brackets denote an average of the structure over all orientations. <*A* :sup:`2`\ *(q)*> is then the form 49 factor, *P(q)*. The scale factor is equivalent to the volume fraction of cylinders, each of volume, *V*. Contrast is 50 the difference of scattering length densities of the cylinder and the surrounding solvent. 53 The < > brackets denote an average of the structure over all orientations. 54 <*A* :sup:`2`\ *(q)*> is then the form factor, *P(q)*. The scale factor is 55 equivalent to the volume fraction of cylinders, each of volume, *V*. Contrast 56 is the difference of scattering length densities of the cylinder and the 57 surrounding solvent. 51 58 52 59 The volume of the barbell is … … 69 76 \left( 4R^3 6R^2h - 2h^3 + 3r^2L \right)^{-1} 70 77 71 **The requirement that** *R* >= *r* **is not enforced in the model!** It is up to you to restrict this during analysis. 78 **The requirement that** *R* >= *r* **is not enforced in the model!** It is 79 up to you to restrict this during analysis. 72 80 73 81 This example dataset is produced by running the Macro PlotBarbell(), … … 79 87 *Figure. 1D plot using the default values (w/256 data point).* 80 88 81 For 2D data: The 2D scattering intensity is calculated similar to the 2D cylinder model. For example, for 82 |theta| = 45 deg and |phi| = 0 deg with default values for other parameters 89 For 2D data: The 2D scattering intensity is calculated similar to the 2D 90 cylinder model. For example, for |theta| = 45 deg and |phi| = 0 deg with 91 default values for other parameters 83 92 84 93 .. image:: img/barbell_2d.jpg … … 102 111 103 112 """ 104 from numpy import pi,inf113 from numpy import inf 105 114 106 115 name = "barbell"
Note: See TracChangeset
for help on using the changeset viewer.