Changeset a006b63 in sasmodels for sasmodels/models/cylinder.py


Ignore:
Timestamp:
Feb 18, 2015 5:04:51 PM (9 years ago)
Author:
jhbakker
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
ff58110, e166cb9, 9c117a2
Parents:
0ac3db5 (diff), ea7ffce (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of https://github.com/SasView/sasmodels

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/cylinder.py

    ra503bfd rea7ffce  
    4343.. figure:: img/orientation2.jpg 
    4444 
    45     Examples of the angles for oriented pp against the detector plane. 
     45    Examples of the angles for oriented cylinders against the detector plane. 
    4646 
    4747NB: The 2nd virial coefficient of the cylinder is calculated based on the 
     
    113113title = "Right circular cylinder with uniform scattering length density." 
    114114description = """ 
    115      P(q)= 2*(sld - solvent_sld)*V*sin(qLcos(alpha/2)) 
    116             /[qLcos(alpha/2)]*J1(qRsin(alpha/2))/[qRsin(alpha)] 
     115     f(q,alpha) = 2*(sld - solvent_sld)*V*sin(qLcos(alpha/2)) 
     116                /[qLcos(alpha/2)]*J1(qRsin(alpha/2))/[qRsin(alpha)] 
    117117 
    118             P(q,alpha)= scale/V*f(q)^(2)+background 
     118            P(q,alpha)= scale/V*f(q,alpha)^(2)+background 
    119119            V: Volume of the cylinder 
    120120            R: Radius of the cylinder 
     
    125125            :the ouput is P(q)=scale/V*integral 
    126126            from pi/2 to zero of... 
    127             f(q)^(2)*sin(alpha)*dalpha + background 
     127            f(q,alpha)^(2)*sin(alpha)*dalpha + background 
    128128""" 
    129129 
     
    169169oldpars=dict(theta='cyl_theta', phi='cyl_phi', sld='sldCyl', solvent_sld='sldSolv') 
    170170 
     171 
     172# test values: 
     173# [ 
     174#   [ {parameters}, q, I(q)], 
     175#   [ {parameters}, [q], [I(q)] ], 
     176#   [ {parameters}, [q1, q2, ...], [I(q1), I(q2), ...]], 
     177 
     178#   [ {parameters}, (qx, qy), I(qx, Iqy)], 
     179#   [ {parameters}, [(qx1, qy1), (qx2, qy2), ...], [I(qx1,qy1), I(qx2,qy2), ...], 
     180#   ... 
     181# ] 
     182# Precision defaults to 7 digits (relative) for single, 14 for double 
     183# May want a limited precision version that checks for 8-n or 15-n digits respectively 
     184tests = [ 
     185    [{},  0.2, 0.041761386790780453], 
     186    [{'theta':10.0, 'phi':10.0}, [0.2], [0.041761386790780453]], 
     187    [{'theta':10.0, 'phi':10.0}, (0.2, 2.5), 0.038176446608393366], 
     188    [{'theta':10.0, 'phi':10.0}, [(0.2, 2.5)], [0.038176446608393366]], 
     189    ] 
     190 
Note: See TracChangeset for help on using the changeset viewer.