Changes in / [8b9adb5:c9f885e] in sasmodels


Ignore:
Location:
sasmodels/models
Files:
2 deleted
17 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/be_polyelectrolyte.py

    r0e86967 r168052c  
    127127    :return:     2D-Intensity 
    128128    """ 
    129     intensity = Iq(sqrt(qx**2 + qy**2), *args) 
    130     return intensity 
     129    iq = Iq(sqrt(qx**2 + qy**2), *args) 
     130    return iq 
    131131 
    132132Iqxy.vectorized = True  # Iqxy accepts an array of qx, qy values 
  • sasmodels/models/core_shell_cylinder.py

    rf0aa7f8 reb69cce  
    155155 
    156156def ER(radius, thickness, length): 
    157     """ 
    158         Returns the effective radius used in the S*P calculation 
    159     """ 
    160157    radius = radius + thickness 
    161158    length = length + 2 * thickness 
     
    164161 
    165162def VR(radius, thickness, length): 
    166     """ 
    167         Returns volume ratio 
    168     """ 
    169163    whole = pi * (radius + thickness) ** 2 * (length + 2 * thickness) 
    170164    core = pi * radius ** 2 * length 
  • sasmodels/models/correlation_length.py

    r3e6c5c1 r5054e80  
    7878# names and the target sasview model name. 
    7979oldname = 'CorrLengthModel' 
     80# pylint: disable=bad-continuation 
     81oldpars = dict( 
     82               lorentz_scale='scale_l', porod_scale='scale_p', 
     83               cor_length='length_l', exponent_p='exponent_p', 
     84               exponent_l='exponent_l' 
     85               ) 
    8086 
    81 oldpars = dict(lorentz_scale='scale_l', porod_scale='scale_p', 
    82                cor_length='length_l', exponent_p='exponent_p', 
    83                exponent_l='exponent_l') 
    84  
    85 tests = [[{}, 0.001, 1009.98], 
     87tests = [ 
     88         [{}, 0.001, 1009.98], 
    8689         [{}, 0.150141, 0.174645], 
    87          [{}, 0.442528, 0.0203957]] 
     90         [{}, 0.442528, 0.0203957] 
     91         ] 
     92# pylint: enable=bad-continuation 
  • sasmodels/models/cylinder.py

    r0c3a226 reb69cce  
    144144 
    145145def ER(radius, length): 
    146     """ 
    147         Return equivalent radius (ER) 
    148     """ 
    149146    ddd = 0.75 * radius * (2 * radius * length + (length + radius) * (length + pi * radius)) 
    150147    return 0.5 * (ddd) ** (1. / 3.) 
  • sasmodels/models/dab.py

    r94bd809 reb69cce  
    11r""" 
     2 
    23Calculates the scattering from a randomly distributed, two-phase system based on 
    34the Debye-Anderson-Brumberger (DAB) model for such systems. The two-phase system 
  • sasmodels/models/fcc.py

    rc0ccea8 r9aac25d  
    114114single = False 
    115115 
    116 # pylint: disable=bad-whitespace, line-too-long 
    117116#             ["name", "units", default, [lower, upper], "type","description"], 
    118117parameters = [["dnn", "Ang", 220, [-inf, inf], "", "Nearest neighbour distance"], 
     
    125124              ["psi", "degrees", 60, [-inf, inf], "orientation", "Out of plane angle"] 
    126125             ] 
    127 # pylint: enable=bad-whitespace, line-too-long 
    128126 
    129127source = ["lib/J1.c", "lib/gauss150.c", "lib/sphere_form.c", "fcc.c"] 
  • sasmodels/models/guinier.py

    r723cebe reb69cce  
    3636 
    3737#             ["name", "units", default, [lower, upper], "type","description"], 
    38 parameters = [["rg", "Ang", 60.0, [0, inf], "", "Radius of Gyration"]] 
     38parameters = [ 
     39              ["rg", "Ang", 60.0, [0, inf], "", "Radius of Gyration"], 
     40              ] 
    3941 
    4042Iq = """ 
     
    4951 
    5052# parameters for demo 
    51 demo = dict(scale=1.0, rg=60.0) 
     53demo = dict(scale=1.0,rg=60.0) 
    5254 
    5355# For testing against the old sasview models, include the converted parameter 
     
    5759 
    5860# parameters for unit tests 
    59 tests = [[{'rg' : 31.5}, 0.005, 0.991756]] 
     61tests = [ 
     62         [{'rg' : 31.5}, 0.005, 0.991756] 
     63         ] 
  • sasmodels/models/hollow_cylinder.py

    re0fd913 rec2ca99  
    9393source = ["lib/J1.c", "lib/gauss76.c", "hollow_cylinder.c"] 
    9494 
    95 # pylint: disable=W0613 
    9695def ER(radius, core_radius, length): 
    9796    """ 
  • sasmodels/models/lamellarCailleHG.py

    r652a78a r13ed84c  
    146146    solvent_sld='sld_solvent') 
    147147# 
    148 tests = [[{'scale': 1.0, 'background': 0.0, 'tail_length': 10.0, 'head_length': 2.0, 
    149            'Nlayers': 30.0, 'spacing': 40., 'Caille_parameter': 0.001, 'sld': 0.4, 
    150            'head_sld': 2.0, 'solvent_sld': 6.0, 'tail_length_pd': 0.0, 
    151            'head_length_pd': 0.0, 'spacing_pd': 0.0}, [0.001], [6838238.571488]]] 
     148tests = [ 
     149        [ {'scale': 1.0, 'background' : 0.0, 'tail_length' : 10.0, 'head_length' : 2.0,'Nlayers' : 30.0, 'spacing' : 40., 
     150            'Caille_parameter' : 0.001, 'sld' : 0.4, 'head_sld' : 2.0, 'solvent_sld' : 6.0, 
     151            'tail_length_pd' : 0.0, 'head_length_pd' : 0.0, 'spacing_pd' : 0.0 }, [0.001], [6838238.571488]] 
     152        ] 
  • sasmodels/models/lamellarFFHG.py

    r3eb6b90 r7f47777  
    6868category = "shape:lamellae" 
    6969 
    70 # pylint: disable=bad-whitespace, line-too-long 
    7170#             ["name", "units", default, [lower, upper], "type","description"], 
    72 parameters = [["tail_length", "Ang",       15,   [0, inf],  "volume",  "Tail thickness"], 
    73               ["head_length", "Ang",       10,   [0, inf],  "volume",  "head thickness"], 
    74               ["sld",         "1e-6/Ang^2", 0.4, [-inf,inf], "",       "Tail scattering length density"], 
    75               ["head_sld",    "1e-6/Ang^2", 3.0, [-inf,inf], "",       "Head scattering length density"], 
    76               ["solvent_sld", "1e-6/Ang^2", 6,   [-inf,inf], "",       "Solvent scattering length density"]] 
    77 # pylint: enable=bad-whitespace, line-too-long 
     71parameters = [["tail_length", "Ang",  15, [0, inf], "volume", 
     72               "Tail thickness"], 
     73              ["head_length", "Ang",  10, [0, inf], "volume", 
     74               "head thickness"], 
     75              ["sld", "1e-6/Ang^2", 0.4, [-inf,inf], "", 
     76               "Tail scattering length density"], 
     77              ["head_sld", "1e-6/Ang^2", 3.0, [-inf,inf], "", 
     78               "Head scattering length density"], 
     79              ["solvent_sld", "1e-6/Ang^2", 6, [-inf,inf], "", 
     80               "Solvent scattering length density"], 
     81             ] 
    7882 
    7983# No volume normalization despite having a volume parameter 
     
    109113 
    110114demo = dict(scale=1, background=0, 
    111             tail_length=15, head_length=10, 
     115            tail_length=15,head_length=10, 
    112116            sld=0.4, head_sld=3.0, solvent_sld=6.0, 
    113             tail_length_pd=0.2, tail_length_pd_n=40, 
    114             head_length_pd=0.01, head_length_pd_n=40) 
     117            tail_length_pd= 0.2, tail_length_pd_n=40, 
     118            head_length_pd= 0.01, head_length_pd_n=40) 
    115119 
    116120oldname = 'LamellarFFHGModel' 
     
    118122               sld='sld_tail', head_sld='sld_head', solvent_sld='sld_solvent') 
    119123# 
    120 tests = [[{'scale': 1.0, 'background': 0.0, 'tail_length': 15.0, 'head_length': 10.0, 
    121            'sld': 0.4, 'head_sld': 3.0, 'solvent_sld': 6.0}, [0.001], [653143.9209]]] 
     124tests = [ 
     125        [ {'scale': 1.0, 'background' : 0.0, 'tail_length' : 15.0, 'head_length' : 10.0,'sld' : 0.4, 
     126         'head_sld' : 3.0, 'solvent_sld' : 6.0, }, [0.001], [653143.9209]] 
     127        ] 
     128 
     129 
  • sasmodels/models/lorentz.py

    reb5901b reb69cce  
    5656 
    5757# parameters for demo 
    58 demo = dict(scale=1.0, background=0.0, cor_length=50.0) 
     58demo = dict(scale=1.0,background=0.0,cor_length=50.0) 
    5959 
    6060# For testing against the old sasview models, include the converted parameter 
     
    6464 
    6565# parameters for unit tests 
    66 tests = [[{'cor_length': 250}, 0.01, 0.137931]] 
     66tests = [ 
     67         [{'cor_length' : 250},0.01,0.137931] 
     68         ] 
  • sasmodels/models/peak_lorentz.py

    r04b0b30 r14ba6f6  
    1111    I(q) = \frac{scale}{\bigl(1+\bigl(\frac{q-q_0}{B}\bigr)^2\bigr)} + background 
    1212 
    13 with the peak having height of $I_0$ centered at $q_0$ and having 
    14 a HWHM (half-width half-maximum) of B. 
     13with the peak having height of $I_0$ centered at $q_0$ and having a HWHM (half-width half-maximum) of B. 
    1514 
    1615For 2D data the scattering intensity is calculated in the same way as 1D, 
     
    5655 
    5756def Iq(q, peak_pos, peak_hwhm): 
    58     """ 
    59         Return I(q) 
    60     """ 
    6157    inten = (1/(1+((q-peak_pos)/peak_hwhm)**2)) 
    6258    return inten 
     
    6460 
    6561def Iqxy(qx, qy, *args): 
    66     """ 
    67         Return I(qx, qy) 
    68     """ 
    6962    return Iq(sqrt(qx ** 2 + qy ** 2), *args) 
    7063Iqxy.vectorized = True # Iqxy accepts an array of qx, qy values 
  • sasmodels/models/porod.py

    r1ce6e82 r16bb433  
    1313of the sample, and $\Delta\rho$ is the contrast factor. 
    1414 
    15 For 2D data: The 2D scattering intensity is calculated in the same way as 1D, 
     15For 2D data: The 2D scattering intensity is calculated in the same way as 1D,  
    1616where the q vector is defined as 
    1717 
  • sasmodels/models/rpa.py

    r8dd6914 r82c299f  
    8989#   ["name", "units", default, [lower, upper], "type","description"], 
    9090parameters = [ 
    91     ["case_num", CASES, 0, [0, 10], "", "Component organization"], 
     91    ["case_num", CASES, 0, [0, 10], "", "Component organization" ], 
    9292 
    9393    ["Na", "", 1000.0, [1, inf], "", "Degree of polymerization"], 
  • sasmodels/models/sphere.py

    rc691551 r9c461c7  
    100100 
    101101def ER(radius): 
    102     """ 
    103         Return equivalent radius (ER) 
    104     """ 
    105102    return radius 
    106103 
  • sasmodels/models/triaxial_ellipsoid.py

    r469e763 r9c461c7  
    8282---------- 
    8383 
    84 L A Feigin and D I Svergun, *Structure Analysis by Small-Angle X-Ray 
    85 and Neutron Scattering*, Plenum, New York, 1987. 
     84L A Feigin and D I Svergun, *Structure Analysis by Small-Angle X-Ray and Neutron Scattering*, Plenum, 
     85New York, 1987. 
    8686""" 
    8787 
     
    120120 
    121121def ER(req_minor, req_major, rpolar): 
    122     """ 
    123         Returns the effective radius used in the S*P calculation 
    124     """ 
    125122    import numpy as np 
    126123    from .ellipsoid import ER as ellipsoid_ER 
  • sasmodels/models/vesicle.py

    r068cebd r216fa6d  
    6060""" 
    6161 
     62import numpy as np 
    6263from numpy import pi, inf 
    6364 
     
    130131# NOTE: test results taken from values returned by SasView 3.1.2 
    131132tests = [[{}, 0.0010005303255, 17139.8268799], 
    132          [{}, 0.200027832249, 0.130387268704], 
     133         [{}, 0.200027832249, 0.130387268704 ], 
    133134         [{}, 'ER', 130.], 
    134135         [{}, 'VR', 0.54483386436], 
Note: See TracChangeset for help on using the changeset viewer.