Changeset aad336c in sasmodels


Ignore:
Timestamp:
Mar 21, 2016 7:59:28 AM (9 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:
9418d75
Parents:
728136f
Message:

replaced wrong eqn in broad_peak doc, renamed sld's etc

Location:
sasmodels/models
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/broad_peak.py

    r2f0c07d raad336c  
    1717.. math:: 
    1818 
    19     I(q) = \frac{A}{q^n} + \frac{C}{1 + (q\xi)^m} + B 
     19    I(q) = \frac{A}{q^n} + \frac{C}{1 + (|q - q_0|\xi)^m} + B 
    2020 
    2121Here the peak position is related to the d-spacing as $q_o = 2\pi / d_o$. 
     22 
     23$A$ is the Porod law scale factor, $n$ the Porod exponent, $C$ is the Lorentzian  
     24scale factor, $m$ the exponent of q, \ |xi|\  the screening length, and $B$ the flat background. 
    2225 
    2326For 2D data the scattering intensity is calculated in the same way as 1D, 
  • sasmodels/models/core_shell_bicelle.py

    r43b7eea raad336c  
    44---------- 
    55This model provides the form factor for a circular cylinder with a core-shell 
    6 scattering length density profile. The form factor is normalized by the 
    7 particle volume. 
     6scattering length density profile. Thus this is a variation of a core-shell cylinder  
     7or disc where the shell on the walls and ends may be of different thicknesses and scattering 
     8length densities. The form factor is normalized by the particle volume. 
    89 
    910.. _core-shell-bicelle-geometry: 
     
    1112.. figure:: img/core_shell_bicelle_geometry.png 
    1213 
    13     (Graphic from DOI: 10.1039/C0NP00002G) 
     14    (Graphic from DOI: 10.1039/C0NP00002G, note however that the model here calculates for rectangular, not curved, rims.) 
    1415 
    1516 
     
    4344title = "Circular cylinder with a core-shell scattering length density profile.." 
    4445description = """ 
    45     P(q,alpha)= scale/Vs*f(q)^(2) + bkg,  where: f(q)= 2(core_sld 
     46    P(q,alpha)= scale/Vs*f(q)^(2) + bkg,  where: f(q)= 2(sld_core 
    4647    - solvant_sld)* Vc*sin[qLcos(alpha/2)] 
    4748    /[qLcos(alpha/2)]*J1(qRsin(alpha)) 
    48     /[qRsin(alpha)]+2(shell_sld-solvent_sld) 
     49    /[qRsin(alpha)]+2(shell_sld-sld_solvent) 
    4950    *Vs*sin[q(L+T)cos(alpha/2)][[q(L+T) 
    5051    *cos(alpha/2)]*J1(q(R+T)sin(alpha)) 
     
    5859    shell_sld: the scattering length density 
    5960    of the shell 
    60     solvent_sld: the scattering length density 
     61    sld_solvent: the scattering length density 
    6162    of the solvent 
    6263    bkg: the background 
     
    7778    ["face_thickness", "Ang",       10, [0, inf],    "volume",      "Cylinder face thickness"], 
    7879    ["length",         "Ang",      400, [0, inf],    "volume",      "Cylinder length"], 
    79     ["core_sld",       "1e-6/Ang^2", 1, [-inf, inf], "",            "Cylinder core scattering length density"], 
    80     ["face_sld",       "1e-6/Ang^2", 4, [-inf, inf], "",            "Cylinder face scattering length density"], 
    81     ["rim_sld",        "1e-6/Ang^2", 4, [-inf, inf], "",            "Cylinder rim scattering length density"], 
    82     ["solvent_sld",    "1e-6/Ang^2", 1, [-inf, inf], "",            "Solvent scattering length density"], 
     80    ["sld_core",       "1e-6/Ang^2", 1, [-inf, inf], "",            "Cylinder core scattering length density"], 
     81    ["sld_face",       "1e-6/Ang^2", 4, [-inf, inf], "",            "Cylinder face scattering length density"], 
     82    ["sld_rim",        "1e-6/Ang^2", 4, [-inf, inf], "",            "Cylinder rim scattering length density"], 
     83    ["sld_solvent",    "1e-6/Ang^2", 1, [-inf, inf], "",            "Solvent scattering length density"], 
    8384    ["theta",          "degrees",   90, [-inf, inf], "orientation", "In plane angle"], 
    8485    ["phi",            "degrees",    0, [-inf, inf], "orientation", "Out of plane angle"], 
     
    9495            face_thickness=10.0, 
    9596            length=400.0, 
    96             core_sld=1.0, 
    97             face_sld=4.0, 
    98             rim_sld=4.0, 
    99             solvent_sld=1.0, 
     97            sld_core=1.0, 
     98            sld_face=4.0, 
     99            sld_rim=4.0, 
     100            sld_solvent=1.0, 
    100101            theta=90, 
    101102            phi=0) 
     
    103104oldname = 'CoreShellBicelleModel' 
    104105 
    105 oldpars = dict(rim_thickness='rim_thick', 
     106oldpars = dict(sld_core='core_sld', sld_face='face_sld', sld_rim='rim_sld', 
     107               sld_solvent='solvent_sld', rim_thickness='rim_thick', 
    106108               face_thickness='face_thick', 
    107109               theta='axis_theta', 
     
    115117      'face_thickness': 10.0, 
    116118      'length': 400.0, 
    117       'core_sld': 1.0, 
    118       'face_sld': 4.0, 
    119       'rim_sld': 4.0, 
    120       'solvent_sld': 1.0, 
     119      'sld_core': 1.0, 
     120      'sld_face': 4.0, 
     121      'sld_rim': 4.0, 
     122      'sld_solvent': 1.0, 
    121123      'background': 0.0, 
    122124     }, 0.001, 353.550], 
     
    126128      'face_thickness': 10.0, 
    127129      'length': 400.0, 
    128       'core_sld': 1.0, 
    129       'face_sld': 4.0, 
    130       'rim_sld': 4.0, 
    131       'solvent_sld': 1.0, 
     130      'sld_core': 1.0, 
     131      'sld_face': 4.0, 
     132      'sld_rim': 4.0, 
     133      'sld_solvent': 1.0, 
    132134      'theta': 90.0, 
    133135      'phi': 0.0, 
     
    140142      'face_thickness': 100.0, 
    141143      'length': 1200.0, 
    142       'core_sld': 5.0, 
    143       'face_sld': 41.0, 
    144       'rim_sld': 42.0, 
    145       'solvent_sld': 21.0, 
     144      'sld_core': 5.0, 
     145      'sld_face': 41.0, 
     146      'sld_rim': 42.0, 
     147      'sld_solvent': 21.0, 
    146148     }, 0.05, 1670.1828], 
    147149    ] 
  • sasmodels/models/core_shell_parallelepiped.py

    r43b7eea raad336c  
    111111 
    112112#             ["name", "units", default, [lower, upper], "type","description"], 
    113 parameters = [["core_sld", "1e-6/Ang^2", 1, [-inf, inf], "", 
     113parameters = [["sld_core", "1e-6/Ang^2", 1, [-inf, inf], "", 
    114114               "Parallelepiped core scattering length density"], 
    115               ["arim_sld", "1e-6/Ang^2", 2, [-inf, inf], "", 
     115              ["sld_a", "1e-6/Ang^2", 2, [-inf, inf], "", 
    116116               "Parallelepiped A rim scattering length density"], 
    117               ["brim_sld", "1e-6/Ang^2", 4, [-inf, inf], "", 
     117              ["sld_b", "1e-6/Ang^2", 4, [-inf, inf], "", 
    118118               "Parallelepiped B rim scattering length density"], 
    119               ["crim_sld", "1e-6/Ang^2", 2, [-inf, inf], "", 
     119              ["sld_c", "1e-6/Ang^2", 2, [-inf, inf], "", 
    120120               "Parallelepiped C rim scattering length density"], 
    121               ["solvent_sld", "1e-6/Ang^2", 6, [-inf, inf], "", 
     121              ["sld_solvent", "1e-6/Ang^2", 6, [-inf, inf], "", 
    122122               "Solvent scattering length density"], 
    123123              ["a_side", "Ang", 35, [0, inf], "volume", 
     
    161161# parameters for demo 
    162162demo = dict(scale=1, background=0.0, 
    163             core_sld=1e-6, arim_sld=2e-6, brim_sld=4e-6, 
    164             crim_sld=2e-6, solvent_sld=6e-6, 
     163            sld_core=1e-6, sld_a=2e-6, sld_b=4e-6, 
     164            sld_c=2e-6, sld_solvent=6e-6, 
    165165            a_side=35, b_side=75, c_side=400, 
    166166            arim_thickness=10, brim_thickness=10, crim_thickness=10, 
     
    181181oldname = 'CSParallelepipedModel' 
    182182oldpars = dict(theta='parallel_theta', phi='parallel_phi', psi='parallel_psi', 
    183                core_sld='sld_pcore', arim_sld='sld_rimA', brim_sld='sld_rimB', 
    184                crim_sld='sld_rimC', solvent_sld='sld_solv', 
     183               sld_core='sld_pcore', sld_a='sld_rimA', sld_b='sld_rimB', 
     184               sld_c='sld_rimC', sld_solvent='sld_solv', 
    185185               a_side='shortA', b_side='midB', c_side='longC', 
    186186               arim_thickness='rimA', brim_thickness='rimB', crim_thickness='rimC') 
  • sasmodels/models/fractal_core_shell.py

    r6794301 raad336c  
    4444    q = \sqrt{q_x^2 + q_y^2} 
    4545 
    46 Reference 
    47 --------- 
     46References 
     47---------- 
    4848 
    4949See the core_shell and fractal model descriptions 
     
    6565    ["radius",      "Ang",        60.0, [0, inf],    "volume", "Sphere core radius"], 
    6666    ["thickness",   "Ang",        10.0, [0, inf],    "volume", "Sphere shell thickness"], 
    67     ["core_sld",    "1e-6/Ang^2", 1.0,  [-inf, inf], "",       "Sphere core scattering length density"], 
    68     ["shell_sld",   "1e-6/Ang^2", 2.0,  [-inf, inf], "",       "Sphere shell scattering length density"], 
    69     ["solvent_sld", "1e-6/Ang^2", 3.0,  [-inf, inf], "",       "Solvent scattering length density"], 
     67    ["sld_core",    "1e-6/Ang^2", 1.0,  [-inf, inf], "",       "Sphere core scattering length density"], 
     68    ["sld_shell",   "1e-6/Ang^2", 2.0,  [-inf, inf], "",       "Sphere shell scattering length density"], 
     69    ["sld_solvent", "1e-6/Ang^2", 3.0,  [-inf, inf], "",       "Solvent scattering length density"], 
    7070    ["volfraction", "",           1.0,  [0, inf],    "",       "Volume fraction of building block spheres"], 
    7171    ["frac_dim",    "",           2.0,  [-inf, inf], "",       "Fractal dimension"], 
     
    7979            radius=20, 
    8080            thickness=5, 
    81             core_sld=3.5, 
    82             shell_sld=1.0, 
    83             solvent_sld=6.35, 
     81            sld_core=3.5, 
     82            sld_shell=1.0, 
     83            sld_solvent=6.35, 
    8484            volfraction=0.05, 
    8585            frac_dim=2.0, 
     
    8787 
    8888oldname = 'FractalCoreShellModel' 
    89 oldpars = {} 
     89oldpars = dict( sld_core='core_sld', 
     90               sld_shell='shell_sld', 
     91               sld_solvent='solvent_sld') 
    9092 
    9193def ER(radius, thickness): 
     
    113115         [{'radius': 60.0, 
    114116           'thickness': 10.0, 
    115            'core_sld': 1.0, 
    116            'shell_sld': 2.0, 
    117            'solvent_sld': 3.0, 
     117           'sld_core': 1.0, 
     118           'sld_shell': 2.0, 
     119           'sld_solvent': 3.0, 
    118120           'background': 0.0 
    119121          }, 0.4, 0.00070126]] 
  • sasmodels/models/rpa.py

    raa2edb2 raad336c  
    5353 
    5454name = "rpa" 
    55 title = "Random Phase Approximation" 
     55title = "Random Phase Approximation - unfinished work in progress" 
    5656description = """ 
    5757This formalism applies to multicomponent polymer mixtures in the 
Note: See TracChangeset for help on using the changeset viewer.