Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/squarewell.py

    r5111921 rd529d93  
    88Positive well depths correspond to an attractive potential well. Negative well depths correspond to a potential 
    99"shoulder", which may or may not be physically reasonable. The stickyhardsphere model may be a better choice in 
    10 some circumstances. Computed values may behave badly at extremely small Q. 
     10some circumstances. Computed values may behave badly at extremely small $qR$. 
    1111 
    12 The well width (*l*\ ) is defined as multiples of the particle diameter (2\*\ *R*\ ) 
     12The well width (|lambda| ) is defined as multiples of the particle diameter (2\*\ *R*\ ) 
    1313 
    1414The interaction potential is: 
     
    2222    U(r) = \begin{cases} 
    2323    \infty & r < 2R \\ 
    24     -\epsilon , 2R \leq < 2R\lambda 
    25     0 & r \geq 2R 
     24    -\epsilon & 2R \leq r < 2R\lambda \\ 
     25    0 & r \geq 2R\lambda 
    2626    \end{cases} 
    2727 
    2828where $r$ is the distance from the center of the sphere of a radius $R$. 
    2929 
     30In sasview the effective radius may be calculated from the parameters 
     31used in the form factor $P(q)$ that this $S(q)$ is combined with. 
    3032 
    3133For 2D data: The 2D scattering intensity is calculated in the same way as 1D, where the *q* vector is defined as 
     
    3537    q = \sqrt{q_x^2 + q_y^2} 
    3638 
    37 .. comment:: 
    38  
    39   .. figure:: img/squarewell_226.jpg 
    40  
    41     1D plot using the default values (in linear scale).* 
    4239 
    4340REFERENCE 
     
    5956""" 
    6057category = "structure-factor" 
     58structure_factor = True 
    6159 
    6260#single = False 
     
    6563    #   [ "name", "units", default, [lower, upper], "type", 
    6664    #     "description" ], 
    67     ["effect_radius", "Ang", 50.0, [0, inf], "volume", 
     65    ["radius_effective", "Ang", 50.0, [0, inf], "volume", 
    6866     "effective radius of hard sphere"], 
    6967    ["volfraction", "", 0.04, [0, 0.08], "", 
     
    7169    ["welldepth", "kT", 1.5, [0.0, 1.5], "", 
    7270     "depth of well, epsilon"], 
    73     ["wellwidth", "diameters", 1.2, [0, inf], "", 
    74      "width of well in diameters (=2R) units"], 
     71    ["wellwidth", "diameters", 1.2, [1.0, inf], "", 
     72     "width of well in diameters (=2R) units, must be > 1"], 
    7573    ] 
    7674 
     
    8987        x= q; 
    9088         
    91         req = effect_radius; 
     89        req = radius_effective; 
    9290        phis = volfraction; 
    9391        edibkb = welldepth; 
     
    134132 
    135133oldname = 'SquareWellStructure' 
    136 oldpars = dict() 
    137 demo = dict(effect_radius=50, volfraction=0.04, welldepth=1.5, 
    138             wellwidth=1.2, effect_radius_pd=0, effect_radius_pd_n=0) 
     134oldpars = dict(radius_effective="effect_radius",radius_effective_pd="effect_radius_pd",radius_effective_pd_n="effect_radius_pd_n") 
     135demo = dict(radius_effective=50, volfraction=0.04, welldepth=1.5, 
     136            wellwidth=1.2, radius_effective_pd=0, radius_effective_pd_n=0) 
    139137# 
    140138tests = [ 
    141         [ {'scale': 1.0, 'background' : 0.0, 'effect_radius' : 50.0, 'volfraction' : 0.04,'welldepth' : 1.5, 'wellwidth' : 1.2,  
    142            'effect_radius_pd' : 0}, [0.001], [0.97665742]] 
     139        [ {'scale': 1.0, 'background' : 0.0, 'radius_effective' : 50.0, 'volfraction' : 0.04,'welldepth' : 1.5, 'wellwidth' : 1.2,  
     140           'radius_effective_pd' : 0}, [0.001], [0.97665742]] 
    143141        ] 
    144 # ADDED by: converting from sasview RKH  ON: 16Mar2016 - in progress 
     142# ADDED by: converting from sasview RKH  ON: 16Mar2016 
    145143 
Note: See TracChangeset for help on using the changeset viewer.