Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/elliptical_cylinder.py

    r9802ab3 rfcb33e4  
    5757define the axis of the cylinder using two angles $\theta$, $\phi$ and $\Psi$ 
    5858(see :ref:`cylinder orientation <cylinder-angle-definition>`). The angle 
    59 $\Psi$ is the rotational angle around its own long_c axis.  
     59$\Psi$ is the rotational angle around its own long_c axis against the $q$ plane. 
     60For example, $\Psi = 0$ when the $r_\text{minor}$ axis is parallel to the 
     61$x$ axis of the detector. 
    6062 
    6163All angle parameters are valid and given only for 2D calculation; ie, an 
    6264oriented system. 
    6365 
    64 .. figure:: img/elliptical_cylinder_angle_definition.png 
     66.. figure:: img/elliptical_cylinder_angle_definition.jpg 
    6567 
    66     Definition of angles for oriented elliptical cylinder, where axis_ratio is drawn >1, 
    67     and angle $\Psi$ is now a rotation around the axis of the cylinder. 
     68    Definition of angles for 2D 
    6869 
    69 .. figure:: img/elliptical_cylinder_angle_projection.png 
     70.. figure:: img/cylinder_angle_projection.jpg 
    7071 
    7172    Examples of the angles for oriented elliptical cylinders against the 
    72     detector plane, with $\Psi$ = 0. 
    73  
    74 The $\theta$ and $\phi$ parameters to orient the cylinder only appear in the model when fitting 2d data.  
    75 On introducing "Orientational Distribution" in the angles, "distribution of theta" and "distribution of phi" parameters will 
    76 appear. These are actually rotations about the axes $\delta_1$ and $\delta_2$ of the cylinder, the $b$ and $a$ axes of the  
    77 cylinder cross section. (When $\theta = \phi = 0$ these are parallel to the $Y$ and $X$ axes of the instrument.)  
    78 The third orientation distribution, in $\psi$, is about the $c$ axis of the particle. Some experimentation may be required to  
    79 understand the 2d patterns fully. (Earlier implementations had numerical integration issues in some circumstances when orientation  
    80 distributions passed through 90 degrees, such situations, with very broad distributions, should still be approached with care.)  
     73    detector plane. 
    8174 
    8275NB: The 2nd virial coefficient of the cylinder is calculated based on the 
     
    115108""" 
    116109 
    117 from numpy import pi, inf, sqrt, sin, cos 
     110from numpy import pi, inf, sqrt 
    118111 
    119112name = "elliptical_cylinder" 
     
    132125              ["sld",         "1e-6/Ang^2", 4.0,   [-inf, inf], "sld",         "Cylinder scattering length density"], 
    133126              ["sld_solvent", "1e-6/Ang^2", 1.0,   [-inf, inf], "sld",         "Solvent scattering length density"], 
    134               ["theta",       "degrees",    90.0,  [-360, 360], "orientation", "cylinder axis to beam angle"], 
    135               ["phi",         "degrees",    0,     [-360, 360], "orientation", "rotation about beam"], 
    136               ["psi",         "degrees",    0,     [-360, 360], "orientation", "rotation about cylinder axis"]] 
     127              ["theta",       "degrees",    90.0,  [-360, 360], "orientation", "In plane angle"], 
     128              ["phi",         "degrees",    0,     [-360, 360], "orientation", "Out of plane angle"], 
     129              ["psi",         "degrees",    0,     [-360, 360], "orientation", "Major axis angle relative to Q"]] 
    137130 
    138131# pylint: enable=bad-whitespace, line-too-long 
     
    156149                           + (length + radius) * (length + pi * radius)) 
    157150    return 0.5 * (ddd) ** (1. / 3.) 
    158 q = 0.1 
    159 # april 6 2017, rkh added a 2d unit test, NOT READY YET pull #890 branch assume correct! 
    160 qx = q*cos(pi/6.0) 
    161 qy = q*sin(pi/6.0) 
    162151 
    163152tests = [ 
     
    169158      'sld_solvent':1.0, 'background':0.0}, 
    170159     0.001, 675.504402], 
    171 #    [{'theta':80., 'phi':10.}, (qx, qy), 7.88866563001 ], 
    172160] 
Note: See TracChangeset for help on using the changeset viewer.