Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/cylinder.py

    r3330bb4 r9802ab3  
    3838 
    3939 
    40 Numerical integration is simplified by a change of variable to $u = cos(\alpha)$ with  
    41 $sin(\alpha)=\sqrt{1-u^2}$.  
     40Numerical integration is simplified by a change of variable to $u = cos(\alpha)$ with 
     41$sin(\alpha)=\sqrt{1-u^2}$. 
    4242 
    4343The output of the 1D scattering intensity function for randomly oriented 
     
    6161.. _cylinder-angle-definition: 
    6262 
    63 .. figure:: img/cylinder_angle_definition.jpg 
     63.. figure:: img/cylinder_angle_definition.png 
    6464 
    65     Definition of the angles for oriented cylinders. 
     65    Definition of the $\theta$ and $\phi$ orientation angles for a cylinder relative  
     66    to the beam line coordinates, plus an indication of their orientation distributions  
     67    which are described as rotations about each of the perpendicular axes $\delta_1$ and $\delta_2$  
     68    in the frame of the cylinder itself, which when $\theta = \phi = 0$ are parallel to the $Y$ and $X$ axes. 
    6669 
    67 The $\theta$ and $\phi$ parameters only appear in the model when fitting 2d data. 
     70.. figure:: img/cylinder_angle_projection.png 
     71 
     72    Examples for oriented cylinders. 
     73 
     74The $\theta$ and $\phi$ parameters to orient the cylinder only appear in the model when fitting 2d data.  
     75On introducing "Orientational Distribution" in the angles, "distribution of theta" and "distribution of phi" parameters will 
     76appear. These are actually rotations about the axes $\delta_1$ and $\delta_2$ of the cylinder, which when $\theta = \phi = 0$ are parallel  
     77to the $Y$ and $X$ axes of the instrument respectively. Some experimentation may be required to understand the 2d patterns fully. 
     78(Earlier implementations had numerical integration issues in some circumstances when orientation distributions passed through 90 degrees, such  
     79situations, with very broad distributions, should still be approached with care.)  
    6880 
    6981Validation 
     
    123135              ["length", "Ang", 400, [0, inf], "volume", 
    124136               "Cylinder length"], 
    125               ["theta", "degrees", 60, [-inf, inf], "orientation", 
    126                "latitude"], 
    127               ["phi", "degrees", 60, [-inf, inf], "orientation", 
    128                "longitude"], 
     137              ["theta", "degrees", 60, [-360, 360], "orientation", 
     138               "cylinder axis to beam angle"], 
     139              ["phi", "degrees",   60, [-360, 360], "orientation", 
     140               "rotation about beam"], 
    129141             ] 
    130142 
     
    152164tests = [[{}, 0.2, 0.042761386790780453], 
    153165        [{}, [0.2], [0.042761386790780453]], 
    154 #  new coords     
     166#  new coords 
    155167        [{'theta':80.1534480601659, 'phi':10.1510817110481}, (qx, qy), 0.03514647218513852], 
    156168        [{'theta':80.1534480601659, 'phi':10.1510817110481}, [(qx, qy)], [0.03514647218513852]], 
Note: See TracChangeset for help on using the changeset viewer.