Changeset 3c56da87 in sasmodels for sasmodels/models/barbell.py


Ignore:
Timestamp:
Mar 4, 2015 10:55:38 PM (9 years ago)
Author:
Paul Kienzle <pkienzle@…>
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
Message:

lint cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/barbell.py

    r9890053 r3c56da87  
    44r""" 
    55 
    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. 
     6Calculates the scattering from a barbell-shaped cylinder (This model simply 
     7becomes the DumBellModel when the length of the cylinder, *L*, is set to zero). 
     8That is, a sphereocylinder with spherical end caps that have a radius larger 
     9than that of the cylinder and the center of the end cap radius lies outside 
     10of the cylinder. All dimensions of the BarBell are considered to be 
     11monodisperse. See the diagram for the details of the geometry and restrictions 
     12on parameter values. 
    1013 
    1114Definition 
     
    1821.. image:: img/barbell_geometry.jpg 
    1922 
    20 where *r* is the radius of the cylinder. All other parameters are as defined in the diagram. 
     23where *r* is the radius of the cylinder. All other parameters are as defined 
     24in the diagram. 
    2125 
    2226Since 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 
     28defined by *r* and *R* as 
    2429 
    2530*h* = -1 \* sqrt(*R*\ :sup:`2` - *r*\ :sup:`2`) 
     
    4651             \over QR\sin\theta \left(1-t^2\right)^{1/2}} 
    4752 
    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. 
     53The < > 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 
     55equivalent to the volume fraction of cylinders, each of volume, *V*. Contrast 
     56is the difference of scattering length densities of the cylinder and the 
     57surrounding solvent. 
    5158 
    5259The volume of the barbell is 
     
    6976        \left( 4R^3 6R^2h - 2h^3 + 3r^2L \right)^{-1} 
    7077 
    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 
     79up to you to restrict this during analysis. 
    7280 
    7381This example dataset is produced by running the Macro PlotBarbell(), 
     
    7987*Figure. 1D plot using the default values (w/256 data point).* 
    8088 
    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 
     89For 2D data: The 2D scattering intensity is calculated similar to the 2D 
     90cylinder model. For example, for |theta| = 45 deg and |phi| = 0 deg with 
     91default values for other parameters 
    8392 
    8493.. image:: img/barbell_2d.jpg 
     
    102111 
    103112""" 
    104 from numpy import pi, inf 
     113from numpy import inf 
    105114 
    106115name = "barbell" 
Note: See TracChangeset for help on using the changeset viewer.