Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/barbell.py

    r9802ab3 rfcb33e4  
    6868The 2D scattering intensity is calculated similar to the 2D cylinder model. 
    6969 
    70 .. figure:: img/cylinder_angle_definition.png 
     70.. figure:: img/cylinder_angle_definition.jpg 
    7171 
    7272    Definition of the angles for oriented 2D barbells. 
     
    8787* **Last Reviewed by:** Richard Heenan **Date:** January 4, 2017 
    8888""" 
    89 from numpy import inf, sin, cos, pi 
     89from numpy import inf 
    9090 
    9191name = "barbell" 
     
    108108              ["radius",      "Ang",         20, [0, inf],    "volume",      "Cylindrical bar radius"], 
    109109              ["length",      "Ang",        400, [0, inf],    "volume",      "Cylinder bar length"], 
    110               ["theta",       "degrees",     60, [-360, 360], "orientation", "Barbell axis to beam angle"], 
    111               ["phi",         "degrees",     60, [-360, 360], "orientation", "Rotation about beam"], 
     110              ["theta",       "degrees",     60, [-inf, inf], "orientation", "In plane angle"], 
     111              ["phi",         "degrees",     60, [-inf, inf], "orientation", "Out of plane angle"], 
    112112             ] 
    113113# pylint: enable=bad-whitespace, line-too-long 
     
    125125            phi_pd=15, phi_pd_n=0, 
    126126           ) 
    127 q = 0.1 
    128 # april 6 2017, rkh add unit tests, NOT compared with any other calc method, assume correct! 
    129 qx = q*cos(pi/6.0) 
    130 qy = q*sin(pi/6.0) 
    131 tests = [[{}, 0.075, 25.5691260532], 
    132         [{'theta':80., 'phi':10.}, (qx, qy), 3.04233067789], 
    133         ] 
    134 del qx, qy  # not necessary to delete, but cleaner 
Note: See TracChangeset for help on using the changeset viewer.