Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/cylinder.py

    r9802ab3 r3330bb4  
    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.png 
     63.. figure:: img/cylinder_angle_definition.jpg 
    6464 
    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. 
     65    Definition of the angles for oriented cylinders. 
    6966 
    70 .. figure:: img/cylinder_angle_projection.png 
    71  
    72     Examples for oriented cylinders. 
    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, which when $\theta = \phi = 0$ are parallel  
    77 to 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  
    79 situations, with very broad distributions, should still be approached with care.)  
     67The $\theta$ and $\phi$ parameters only appear in the model when fitting 2d data. 
    8068 
    8169Validation 
     
    135123              ["length", "Ang", 400, [0, inf], "volume", 
    136124               "Cylinder length"], 
    137               ["theta", "degrees", 60, [-360, 360], "orientation", 
    138                "cylinder axis to beam angle"], 
    139               ["phi", "degrees",   60, [-360, 360], "orientation", 
    140                "rotation about beam"], 
     125              ["theta", "degrees", 60, [-inf, inf], "orientation", 
     126               "latitude"], 
     127              ["phi", "degrees", 60, [-inf, inf], "orientation", 
     128               "longitude"], 
    141129             ] 
    142130 
     
    164152tests = [[{}, 0.2, 0.042761386790780453], 
    165153        [{}, [0.2], [0.042761386790780453]], 
    166 #  new coords 
     154#  new coords     
    167155        [{'theta':80.1534480601659, 'phi':10.1510817110481}, (qx, qy), 0.03514647218513852], 
    168156        [{'theta':80.1534480601659, 'phi':10.1510817110481}, [(qx, qy)], [0.03514647218513852]], 
Note: See TracChangeset for help on using the changeset viewer.