Changeset 01eece6 in sasmodels for sasmodels/models/cylinder.py


Ignore:
Timestamp:
Mar 19, 2016 5:24:04 AM (8 years ago)
Author:
richardh
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:
787be86
Parents:
f3d7abd
Message:

renamed params, checked docs, some cylinder models

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/cylinder.py

    raa2edb2 r01eece6  
    22# Note: model title and parameter table are inserted automatically 
    33r""" 
    4 The form factor is normalized by the particle volume. 
     4The form factor is normalized by the particle volume V = \piR^2L. 
    55 
    66Definition 
     
    1919 
    2020    F(q) = 2 (\Delta \rho) V 
    21            \frac{\sin \left(q\tfrac12 L\cos\alpha \right)} 
    22                 {q\tfrac12 L \cos \alpha} 
     21           \frac{\sin \left(\tfrac12 qL\cos\alpha \right)} 
     22                {\tfrac12 qL \cos \alpha} 
    2323           \frac{J_1 \left(q R \sin \alpha\right)}{q R \sin \alpha} 
    2424 
     
    8888title = "Right circular cylinder with uniform scattering length density." 
    8989description = """ 
    90      f(q,alpha) = 2*(sld - solvent_sld)*V*sin(qLcos(alpha/2)) 
    91                 /[qLcos(alpha/2)]*J1(qRsin(alpha/2))/[qRsin(alpha)] 
     90     f(q,alpha) = 2*(sld - sld_solvent)*V*sin(qLcos(alpha)/2)) 
     91                /[qLcos(alpha)/2]*J1(qRsin(alpha))/[qRsin(alpha)] 
    9292 
    9393            P(q,alpha)= scale/V*f(q,alpha)^(2)+background 
     
    107107parameters = [["sld", "4e-6/Ang^2", 4, [-inf, inf], "", 
    108108               "Cylinder scattering length density"], 
    109               ["solvent_sld", "1e-6/Ang^2", 1, [-inf, inf], "", 
     109              ["sld_solvent", "1e-6/Ang^2", 1, [-inf, inf], "", 
    110110               "Solvent scattering length density"], 
    111111              ["radius", "Ang", 20, [0, inf], "volume", 
     
    130130# parameters for demo 
    131131demo = dict(scale=1, background=0, 
    132             sld=6, solvent_sld=1, 
     132            sld=6, sld_solvent=1, 
    133133            radius=20, length=300, 
    134134            theta=60, phi=60, 
     
    141141# names and the target sasview model name. 
    142142oldname = 'CylinderModel' 
    143 oldpars = dict(theta='cyl_theta', phi='cyl_phi', sld='sldCyl', solvent_sld='sldSolv') 
     143oldpars = dict(theta='cyl_theta', phi='cyl_phi', sld='sldCyl', sld_solvent='sldSolv') 
    144144 
    145145 
     
    151151        ] 
    152152del qx, qy  # not necessary to delete, but cleaner 
     153# ADDED by:  RKH  ON: 18Mar2016 renamed sld's etc 
Note: See TracChangeset for help on using the changeset viewer.