Changes in / [8678a34:a0ebc96] in sasmodels


Ignore:
Location:
sasmodels/models
Files:
1 added
1 deleted
20 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/barbell.py

    r0b56f38 r9802ab3  
    6868The 2D scattering intensity is calculated similar to the 2D cylinder model. 
    6969 
    70 .. figure:: img/cylinder_angle_definition.jpg 
     70.. figure:: img/cylinder_angle_definition.png 
    7171 
    7272    Definition of the angles for oriented 2D barbells. 
     
    108108              ["radius",      "Ang",         20, [0, inf],    "volume",      "Cylindrical bar radius"], 
    109109              ["length",      "Ang",        400, [0, inf],    "volume",      "Cylinder bar length"], 
    110               ["theta",       "degrees",     60, [-inf, inf], "orientation", "In plane angle"], 
    111               ["phi",         "degrees",     60, [-inf, inf], "orientation", "Out of plane angle"], 
     110              ["theta",       "degrees",     60, [-360, 360], "orientation", "Barbell axis to beam angle"], 
     111              ["phi",         "degrees",     60, [-360, 360], "orientation", "Rotation about beam"], 
    112112             ] 
    113113# pylint: enable=bad-whitespace, line-too-long 
  • sasmodels/models/bcc_paracrystal.py

    r1f65db5 r69e1afc  
    123123              ["sld",         "1e-6/Ang^2",  4,    [-inf, inf], "sld",         "Particle scattering length density"], 
    124124              ["sld_solvent", "1e-6/Ang^2",  1,    [-inf, inf], "sld",         "Solvent scattering length density"], 
    125               ["theta",       "degrees",    60,    [-inf, inf], "orientation", "In plane angle"], 
    126               ["phi",         "degrees",    60,    [-inf, inf], "orientation", "Out of plane angle"], 
    127               ["psi",         "degrees",    60,    [-inf, inf], "orientation", "Out of plane angle"] 
     125              ["theta",       "degrees",    60,    [-360, 360], "orientation", "c axis to beam angle"], 
     126              ["phi",         "degrees",    60,    [-360, 360], "orientation", "rotation about beam"], 
     127              ["psi",         "degrees",    60,    [-360, 360], "orientation", "rotation about c axis"] 
    128128             ] 
    129129# pylint: enable=bad-whitespace, line-too-long 
     
    148148    [{ }, 
    149149     [0.001, q, 0.215268], [1.46601394721, 2.85851284174, 0.00866710287078]], 
    150 ] 
     150    [{'theta':20.0,'phi':30,'psi':40.0},(-0.017,0.035),2082.20264399 ], 
     151    [{'theta':20.0,'phi':30,'psi':40.0},(-0.081,0.011),0.436323144781 ] 
     152    ] 
  • sasmodels/models/capped_cylinder.py

    r0b56f38 r9802ab3  
    7171The 2D scattering intensity is calculated similar to the 2D cylinder model. 
    7272 
    73 .. figure:: img/cylinder_angle_definition.jpg 
     73.. figure:: img/cylinder_angle_definition.png 
    7474 
    7575    Definition of the angles for oriented 2D cylinders. 
     
    129129              ["radius_cap", "Ang",     20, [0, inf],    "volume", "Cap radius"], 
    130130              ["length",     "Ang",    400, [0, inf],    "volume", "Cylinder length"], 
    131               ["theta",      "degrees", 60, [-inf, inf], "orientation", "inclination angle"], 
    132               ["phi",        "degrees", 60, [-inf, inf], "orientation", "deflection angle"], 
     131              ["theta",      "degrees", 60, [-360, 360], "orientation", "cylinder axis to beam angle"], 
     132              ["phi",        "degrees", 60, [-360, 360], "orientation", "rotation about beam"], 
    133133             ] 
    134134# pylint: enable=bad-whitespace, line-too-long 
  • sasmodels/models/core_shell_bicelle.py

    r0b56f38 r9802ab3  
    4747.. math:: 
    4848 
    49         \begin{align}     
     49    \begin{align}     
    5050    F(Q,\alpha) = &\bigg[  
    5151    (\rho_c - \rho_f) V_c \frac{2J_1(QRsin \alpha)}{QRsin\alpha}\frac{sin(QLcos\alpha/2)}{Q(L/2)cos\alpha} \\ 
     
    6363cylinders is then given by integrating over all possible $\theta$ and $\phi$. 
    6464 
    65 The *theta* and *phi* parameters are not used for the 1D output. 
     65For oriented bicelles the *theta*, and *phi* orientation parameters will appear when fitting 2D data,  
     66see the :ref:`cylinder` model for further information. 
    6667Our implementation of the scattering kernel and the 1D scattering intensity 
    6768use the c-library from NIST. 
    6869 
    69 .. figure:: img/cylinder_angle_definition.jpg 
     70.. figure:: img/cylinder_angle_definition.png 
    7071 
    71     Definition of the angles for the oriented core shell bicelle tmodel. 
     72    Definition of the angles for the oriented core shell bicelle model, 
     73    note that the cylinder axis of the bicelle starts along the beam direction 
     74    when $\theta  = \phi = 0$. 
    7275 
    7376 
     
    135138    ["sld_rim",        "1e-6/Ang^2", 4, [-inf, inf], "sld",         "Cylinder rim scattering length density"], 
    136139    ["sld_solvent",    "1e-6/Ang^2", 1, [-inf, inf], "sld",         "Solvent scattering length density"], 
    137     ["theta",          "degrees",   90, [-inf, inf], "orientation", "In plane angle"], 
    138     ["phi",            "degrees",    0, [-inf, inf], "orientation", "Out of plane angle"], 
     140    ["theta",          "degrees",   90, [-360, 360], "orientation", "cylinder axis to beam angle"], 
     141    ["phi",            "degrees",    0, [-360, 360], "orientation", "rotation about beam"] 
    139142    ] 
    140143 
     
    160163qy = q*sin(pi/6.0) 
    161164tests = [[{}, 0.05, 7.4883545957], 
    162         [{'theta':80., 'phi':10.}, (qx, qy), 2.81048892474 ], 
     165        [{'theta':80., 'phi':10.}, (qx, qy), 2.81048892474 ] 
    163166        ] 
    164167del qx, qy  # not necessary to delete, but cleaner 
  • sasmodels/models/core_shell_bicelle_elliptical.c

    r44e8a93 rdedcf34  
    2424    double si1,si2,be1,be2; 
    2525     // core_shell_bicelle_elliptical, RKH Dec 2016, based on elliptical_cylinder and core_shell_bicelle 
    26      // tested against limiting cases of cylinder, elliptical_cylinder and core_shell_bicelle 
     26     // tested against limiting cases of cylinder, elliptical_cylinder, stacked_discs, and core_shell_bicelle 
    2727     //    const double uplim = M_PI_4; 
    2828    const double halfheight = 0.5*length; 
     
    3434 
    3535    const double r_major = r_minor * x_core; 
    36     const double rA = 0.5*(square(r_major) + square(r_minor)); 
    37     const double rB = 0.5*(square(r_major) - square(r_minor)); 
     36    const double r2A = 0.5*(square(r_major) + square(r_minor)); 
     37    const double r2B = 0.5*(square(r_major) - square(r_minor)); 
    3838    const double dr1 = (rhoc-rhoh)   *M_PI*r_minor*r_major*(2.0*halfheight);; 
    3939    const double dr2 = (rhor-rhosolv)*M_PI*(r_minor+thick_rim)*(r_major+thick_rim)*2.0*(halfheight+thick_face); 
     
    6060            //const double beta = ( Gauss76Z[j]*(vbj-vaj) + vaj + vbj )/2.0; 
    6161            const double beta = ( Gauss76Z[j] +1.0)*M_PI_2; 
    62             const double rr = sqrt(rA - rB*cos(beta)); 
     62            const double rr = sqrt(r2A - r2B*cos(beta)); 
    6363            double besarg1 = q*rr*sin_alpha; 
    6464            double besarg2 = q*(rr+thick_rim)*sin_alpha; 
  • sasmodels/models/core_shell_bicelle_elliptical.py

    r15a90c1 r9802ab3  
    7676bicelles is then given by integrating over all possible $\alpha$ and $\psi$. 
    7777 
    78 For oriented bicellles the *theta*, *phi* and *psi* orientation parameters only appear when fitting 2D data,  
     78For oriented bicelles the *theta*, *phi* and *psi* orientation parameters will appear when fitting 2D data,  
    7979see the :ref:`elliptical-cylinder` model for further information. 
    8080 
     
    119119    ["radius",         "Ang",       30, [0, inf],    "volume",      "Cylinder core radius"], 
    120120    ["x_core",        "None",       3,  [0, inf],    "volume",      "axial ratio of core, X = r_polar/r_equatorial"], 
    121     ["thick_rim",  "Ang",        8, [0, inf],    "volume",      "Rim shell thickness"], 
    122     ["thick_face", "Ang",       14, [0, inf],    "volume",      "Cylinder face thickness"], 
    123     ["length",         "Ang",      50, [0, inf],    "volume",      "Cylinder length"], 
     121    ["thick_rim",  "Ang",            8, [0, inf],    "volume",      "Rim shell thickness"], 
     122    ["thick_face", "Ang",           14, [0, inf],    "volume",      "Cylinder face thickness"], 
     123    ["length",         "Ang",       50, [0, inf],    "volume",      "Cylinder length"], 
    124124    ["sld_core",       "1e-6/Ang^2", 4, [-inf, inf], "sld",         "Cylinder core scattering length density"], 
    125125    ["sld_face",       "1e-6/Ang^2", 7, [-inf, inf], "sld",         "Cylinder face scattering length density"], 
    126126    ["sld_rim",        "1e-6/Ang^2", 1, [-inf, inf], "sld",         "Cylinder rim scattering length density"], 
    127127    ["sld_solvent",    "1e-6/Ang^2", 6, [-inf, inf], "sld",         "Solvent scattering length density"], 
    128     ["theta",          "degrees",   90, [-360, 360], "orientation", "In plane angle"], 
    129     ["phi",            "degrees",    0, [-360, 360], "orientation", "Out of plane angle"], 
    130     ["psi",            "degrees",    0, [-360, 360], "orientation", "Major axis angle relative to Q"], 
     128    ["theta",       "degrees",    90.0, [-360, 360], "orientation", "cylinder axis to beam angle"], 
     129    ["phi",         "degrees",    0,    [-360, 360], "orientation", "rotation about beam"], 
     130    ["psi",         "degrees",    0,    [-360, 360], "orientation", "rotation about cylinder axis"] 
    131131    ] 
    132132 
  • sasmodels/models/core_shell_cylinder.py

    r0b56f38 r9b79f29  
    117117              ["length", "Ang", 400, [0, inf], "volume", 
    118118               "Cylinder length"], 
    119               ["theta", "degrees", 60, [-inf, inf], "orientation", 
    120                "In plane angle"], 
    121               ["phi", "degrees", 60, [-inf, inf], "orientation", 
    122                "Out of plane angle"], 
     119              ["theta", "degrees", 60, [-360, 360], "orientation", 
     120               "cylinder axis to beam angle"], 
     121              ["phi", "degrees",   60, [-360, 360], "orientation", 
     122               "rotation about beam"], 
    123123             ] 
    124124 
  • sasmodels/models/core_shell_ellipsoid.py

    r8e68ea0 r9802ab3  
    7777   F^2(q)=\int_{0}^{\pi/2}{F^2(q,\alpha)\sin(\alpha)d\alpha} 
    7878 
     79For oriented ellipsoids the *theta*, *phi* and *psi* orientation parameters will appear when fitting 2D data,  
     80see the :ref:`elliptical-cylinder` model for further information. 
    7981 
    8082References 
     
    132134    ["sld_shell",     "1e-6/Ang^2", 1,   [-inf, inf], "sld",         "Shell scattering length density"], 
    133135    ["sld_solvent",   "1e-6/Ang^2", 6.3, [-inf, inf], "sld",         "Solvent scattering length density"], 
    134     ["theta",         "degrees",    0,   [-inf, inf], "orientation", "Oblate orientation wrt incoming beam"], 
    135     ["phi",           "degrees",    0,   [-inf, inf], "orientation", "Oblate orientation in the plane of the detector"], 
     136    ["theta",         "degrees",    0,   [-360, 360], "orientation", "elipsoid axis to beam angle"], 
     137    ["phi",           "degrees",    0,   [-360, 360], "orientation", "rotation about beam"], 
    136138    ] 
    137139# pylint: enable=bad-whitespace, line-too-long 
  • sasmodels/models/core_shell_parallelepiped.py

    r1f65db5 r9b79f29  
    153153              ["thick_rim_c", "Ang", 10, [0, inf], "volume", 
    154154               "Thickness of C rim"], 
    155               ["theta", "degrees", 0, [-inf, inf], "orientation", 
    156                "In plane angle"], 
    157               ["phi", "degrees", 0, [-inf, inf], "orientation", 
    158                "Out of plane angle"], 
    159               ["psi", "degrees", 0, [-inf, inf], "orientation", 
    160                "Rotation angle around its own c axis against q plane"], 
     155              ["theta", "degrees", 0, [-360, 360], "orientation", 
     156               "c axis to beam angle"], 
     157              ["phi", "degrees", 0, [-360, 360], "orientation", 
     158               "rotation about beam"], 
     159              ["psi", "degrees", 0, [-360, 360], "orientation", 
     160               "rotation about c axis"], 
    161161             ] 
    162162 
  • sasmodels/models/cylinder.py

    r3330bb4 r9802ab3  
    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 
    6770.. figure:: img/cylinder_angle_projection.png 
     
    6972    Examples for oriented cylinders. 
    7073 
    71 The $\theta$ and $\phi$ parameters only appear in the model when fitting 2d data. 
     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.)  
    7280 
    7381Validation 
     
    127135              ["length", "Ang", 400, [0, inf], "volume", 
    128136               "Cylinder length"], 
    129               ["theta", "degrees", 60, [-inf, inf], "orientation", 
    130                "latitude"], 
    131               ["phi", "degrees", 60, [-inf, inf], "orientation", 
    132                "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"], 
    133141             ] 
    134142 
  • sasmodels/models/ellipsoid.py

    r0b56f38 r9b79f29  
    151151              ["radius_equatorial", "Ang", 400, [0, inf], "volume", 
    152152               "Equatorial radius"], 
    153               ["theta", "degrees", 60, [-inf, inf], "orientation", 
    154                "In plane angle"], 
    155               ["phi", "degrees", 60, [-inf, inf], "orientation", 
    156                "Out of plane angle"], 
     153              ["theta", "degrees", 60, [-360, 360], "orientation", 
     154               "ellipsoid axis to beam angle"], 
     155              ["phi", "degrees", 60, [-360, 360], "orientation", 
     156               "rotation about beam"], 
    157157             ] 
    158158 
  • sasmodels/models/elliptical_cylinder.py

    r15a90c1 r9802ab3  
    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 against the $q$ plane. 
    60 For example, $\Psi = 0$ when the $r_\text{minor}$ axis is parallel to the 
    61 $x$ axis of the detector. 
     59$\Psi$ is the rotational angle around its own long_c axis.  
    6260 
    6361All angle parameters are valid and given only for 2D calculation; ie, an 
     
    6664.. figure:: img/elliptical_cylinder_angle_definition.png 
    6765 
    68     Definition of angles for oriented elliptical cylinder, where axis_ratio >1, 
    69     and angle $\Psi$ is a rotation around the axis of the cylinder. 
     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. 
    7068 
    7169.. figure:: img/elliptical_cylinder_angle_projection.png 
     
    7371    Examples of the angles for oriented elliptical cylinders against the 
    7472    detector plane, with $\Psi$ = 0. 
     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, the $b$ and $a$ axes of the  
     77cylinder cross section. (When $\theta = \phi = 0$ these are parallel to the $Y$ and $X$ axes of the instrument.)  
     78The third orientation distribution, in $\psi$, is about the $c$ axis of the particle. Some experimentation may be required to  
     79understand the 2d patterns fully. (Earlier implementations had numerical integration issues in some circumstances when orientation  
     80distributions passed through 90 degrees, such situations, with very broad distributions, should still be approached with care.)  
    7581 
    7682NB: The 2nd virial coefficient of the cylinder is calculated based on the 
     
    126132              ["sld",         "1e-6/Ang^2", 4.0,   [-inf, inf], "sld",         "Cylinder scattering length density"], 
    127133              ["sld_solvent", "1e-6/Ang^2", 1.0,   [-inf, inf], "sld",         "Solvent scattering length density"], 
    128               ["theta",       "degrees",    90.0,  [-360, 360], "orientation", "In plane angle"], 
    129               ["phi",         "degrees",    0,     [-360, 360], "orientation", "Out of plane angle"], 
    130               ["psi",         "degrees",    0,     [-360, 360], "orientation", "Major axis angle relative to Q"]] 
     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"]] 
    131137 
    132138# pylint: enable=bad-whitespace, line-too-long 
  • sasmodels/models/fcc_paracrystal.py

    r1f65db5 r69e1afc  
    111111              ["sld", "1e-6/Ang^2", 4, [-inf, inf], "sld", "Particle scattering length density"], 
    112112              ["sld_solvent", "1e-6/Ang^2", 1, [-inf, inf], "sld", "Solvent scattering length density"], 
    113               ["theta", "degrees", 60, [-inf, inf], "orientation", "In plane angle"], 
    114               ["phi", "degrees", 60, [-inf, inf], "orientation", "Out of plane angle"], 
    115               ["psi", "degrees", 60, [-inf, inf], "orientation", "Out of plane angle"] 
     113              ["theta",       "degrees",    60,    [-360, 360], "orientation", "c axis to beam angle"], 
     114              ["phi",         "degrees",    60,    [-360, 360], "orientation", "rotation about beam"], 
     115              ["psi",         "degrees",    60,    [-360, 360], "orientation", "rotation about c axis"] 
    116116             ] 
    117117# pylint: enable=bad-whitespace, line-too-long 
     
    129129            psi_pd=15, psi_pd_n=0, 
    130130           ) 
    131 # april 6 2017, rkh add unit tests, NOT compared with any other calc method, assume correct! 
    132 # add 2d test later 
     131# april 10 2017, rkh add unit tests, NOT compared with any other calc method, assume correct! 
    133132q =4.*pi/220. 
    134133tests = [ 
    135134    [{ }, 
    136135     [0.001, q, 0.215268], [0.275164706668, 5.7776842567, 0.00958167119232]], 
     136     [{}, (-0.047,-0.007), 238.103096286], 
     137     [{}, (0.053,0.063), 0.863609587796 ], 
    137138] 
  • sasmodels/models/hollow_cylinder.py

    r0b56f38 r9b79f29  
    8282    ["sld",         "1/Ang^2",  6.3, [-inf, inf], "sld",         "Cylinder sld"], 
    8383    ["sld_solvent", "1/Ang^2",  1,   [-inf, inf], "sld",         "Solvent sld"], 
    84     ["theta",       "degrees", 90,   [-360, 360], "orientation", "Theta angle"], 
    85     ["phi",         "degrees",  0,   [-360, 360], "orientation", "Phi angle"], 
     84    ["theta",       "degrees", 90,   [-360, 360], "orientation", "Cylinder axis to beam angle"], 
     85    ["phi",         "degrees",  0,   [-360, 360], "orientation", "Rotation about beam"], 
    8686    ] 
    8787# pylint: enable=bad-whitespace, line-too-long 
  • sasmodels/models/parallelepiped.py

    rafd4692 r9802ab3  
    99---------- 
    1010 
    11 | This model calculates the scattering from a rectangular parallelepiped 
    12 | (\:numref:`parallelepiped-image`\). 
    13 | If you need to apply polydispersity, see also :ref:`rectangular-prism`. 
     11 This model calculates the scattering from a rectangular parallelepiped 
     12 (\:numref:`parallelepiped-image`\). 
     13 If you need to apply polydispersity, see also :ref:`rectangular-prism`. 
    1414 
    1515.. _parallelepiped-image: 
     
    6767 
    6868    \mu &= qB 
    69  
    7069 
    7170The scattering intensity per unit volume is returned in units of |cm^-1|. 
     
    113112    detector plane. 
    114113 
     114On introducing "Orientational Distribution" in the angles, "distribution of theta" and "distribution of phi" parameters will 
     115appear. These are actually rotations about axes $\delta_1$ and $\delta_2$ of the parallelepiped, perpendicular to the $a$ x $c$ and $b$ x $c$ faces.  
     116(When $\theta = \phi = 0$ these are parallel to the $Y$ and $X$ axes of the instrument.) The third orientation distribution, in $\psi$, is  
     117about the $c$ axis of the particle, perpendicular to the $a$ x $b$ face. Some experimentation may be required to  
     118understand the 2d patterns fully. (Earlier implementations had numerical integration issues in some circumstances when orientation  
     119distributions passed through 90 degrees, such situations, with very broad distributions, should still be approached with care.)  
     120 
     121     
    115122For a given orientation of the parallelepiped, the 2D form factor is 
    116123calculated as 
     
    168175 
    169176* **Author:** This model is based on form factor calculations implemented 
    170 in a c-library provided by the NIST Center for Neutron Research (Kline, 2006). 
     177    in a c-library provided by the NIST Center for Neutron Research (Kline, 2006). 
    171178* **Last Modified by:**  Paul Kienzle **Date:** April 05, 2017 
    172179* **Last Reviewed by:**  Richard Heenan **Date:** April 06, 2017 
     
    205212              ["length_c", "Ang", 400, [0, inf], "volume", 
    206213               "Larger side of the parallelepiped"], 
    207               ["theta", "degrees", 60, [-inf, inf], "orientation", 
    208                "In plane angle"], 
    209               ["phi", "degrees", 60, [-inf, inf], "orientation", 
    210                "Out of plane angle"], 
    211               ["psi", "degrees", 60, [-inf, inf], "orientation", 
    212                "Rotation angle around its own c axis against q plane"], 
     214              ["theta", "degrees", 60, [-360, 360], "orientation", 
     215               "c axis to beam angle"], 
     216              ["phi", "degrees", 60, [-360, 360], "orientation", 
     217               "rotation about beam"], 
     218              ["psi", "degrees", 60, [-360, 360], "orientation", 
     219               "rotation about c axis"], 
    213220             ] 
    214221 
  • sasmodels/models/sc_paracrystal.py

    r0881f4e r69e1afc  
    130130              ["sld",  "1e-6/Ang^2",         3.0, [0.0, inf],  "sld",         "Sphere scattering length density"], 
    131131              ["sld_solvent", "1e-6/Ang^2",  6.3, [0.0, inf],  "sld",         "Solvent scattering length density"], 
    132               ["theta",       "degrees",     0.0, [-inf, inf], "orientation", "Orientation of the a1 axis w/respect incoming beam"], 
    133               ["phi",         "degrees",     0.0, [-inf, inf], "orientation", "Orientation of the a2 in the plane of the detector"], 
    134               ["psi",         "degrees",     0.0, [-inf, inf], "orientation", "Orientation of the a3 in the plane of the detector"], 
     132              ["theta",       "degrees",    0,    [-360, 360], "orientation", "c axis to beam angle"], 
     133              ["phi",         "degrees",    0,    [-360, 360], "orientation", "rotation about beam"], 
     134              ["psi",         "degrees",    0,    [-360, 360], "orientation", "rotation about c axis"] 
    135135             ] 
    136136# pylint: enable=bad-whitespace, line-too-long 
     
    149149 
    150150tests = [ 
    151     # Accuracy tests based on content in test/utest_extra_models.py 
     151    # Accuracy tests based on content in test/utest_extra_models.py, 2d tests added April 10, 2017 
    152152    [{}, 0.001, 10.3048], 
    153153    [{}, 0.215268, 0.00814889], 
    154     [{}, (0.414467), 0.001313289] 
     154    [{}, (0.414467), 0.001313289], 
     155    [{'theta':10.0,'phi':20,'psi':30.0},(0.045,-0.035),18.0397138402 ], 
     156    [{'theta':10.0,'phi':20,'psi':30.0},(0.023,0.045),0.0177333171285 ] 
    155157    ] 
    156158 
  • sasmodels/models/stacked_disks.py

    rf3073b0 r9802ab3  
    7777the axis of the cylinder using two angles $\theta$ and $\varphi$. 
    7878 
    79 .. figure:: img/cylinder_angle_definition.jpg 
     79.. figure:: img/cylinder_angle_definition.png 
    8080 
    8181    Examples of the angles against the detector plane. 
     
    131131    ["sld_layer",   "1e-6/Ang^2",  0.0, [-inf, inf], "sld",         "Layer scattering length density"], 
    132132    ["sld_solvent", "1e-6/Ang^2",  5.0, [-inf, inf], "sld",         "Solvent scattering length density"], 
    133     ["theta",       "degrees",     0,   [-inf, inf], "orientation", "Orientation of the stacked disk axis w/respect incoming beam"], 
    134     ["phi",         "degrees",     0,   [-inf, inf], "orientation", "Orientation of the stacked disk in the plane of the detector"], 
     133    ["theta",       "degrees",     0,   [-360, 360], "orientation", "Orientation of the stacked disk axis w/respect incoming beam"], 
     134    ["phi",         "degrees",     0,   [-360, 360], "orientation", "Rotation about beam"], 
    135135    ] 
    136136# pylint: enable=bad-whitespace, line-too-long 
  • sasmodels/models/triaxial_ellipsoid.py

    r0881f4e re645373  
    7676    of the particle. 
    7777 
    78 The angle $\psi$ is the rotational angle around its own $c$ axis 
    79 against the $q$ plane. For example, $\psi = 0$ when the 
    80 $a$ axis is parallel to the $x$ axis of the detector. 
     78For oriented ellipsoids the *theta*, *phi* and *psi* orientation parameters will appear when fitting 2D data,  
     79see the :ref:`elliptical-cylinder` model for further information. 
    8180 
    8281.. _triaxial-ellipsoid-angles: 
     
    126125 
    127126description = """ 
    128 Note: During fitting ensure that the inequality ra<rb<rc is not 
    129         violated. Otherwise the calculation will 
    130         not be correct. 
     127   Note - fitting ensure that the inequality ra<rb<rc is not 
     128   violated. Otherwise the calculation may not be correct. 
    131129""" 
    132130category = "shape:ellipsoid" 
     
    143141              ["radius_polar", "Ang", 10, [0, inf], "volume", 
    144142               "Polar radius, Rc"], 
    145               ["theta", "degrees", 60, [-inf, inf], "orientation", 
    146                "In plane angle"], 
    147               ["phi", "degrees", 60, [-inf, inf], "orientation", 
    148                "Out of plane angle"], 
    149               ["psi", "degrees", 60, [-inf, inf], "orientation", 
    150                "Out of plane angle"], 
     143              ["theta", "degrees", 60, [-360, 360], "orientation", 
     144               "polar axis to beam angle"], 
     145              ["phi", "degrees", 60, [-360, 360], "orientation", 
     146               "rotation about beam"], 
     147              ["psi", "degrees", 60, [-360, 360], "orientation", 
     148               "rotation about polar axis"], 
    151149             ] 
    152150 
     
    183181# april 6 2017, rkh add unit tests 
    184182#     NOT compared with any other calc method, assume correct! 
    185 # add 2d test after pull #890 
     183# check 2d test after pull #890 
    186184qx = q*cos(pi/6.0) 
    187185qy = q*sin(pi/6.0) 
    188186tests = [[{}, 0.05, 24.8839548033], 
    189 #        [{'theta':80., 'phi':10.}, (qx, qy), 9999. ], 
     187        [{'theta':80., 'phi':10.}, (qx, qy), 166.712060266 ], 
    190188        ] 
    191189del qx, qy  # not necessary to delete, but cleaner 
Note: See TracChangeset for help on using the changeset viewer.