Changeset f8da3f3 in sasmodels


Ignore:
Timestamp:
Mar 21, 2016 8:12:48 AM (9 years ago)
Author:
wojciech
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:
e42b0b9
Parents:
669bf21 (diff), 3d8283b (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

Files:
11 edited
3 moved

Legend:

Unmodified
Added
Removed
  • example/sesans_parameters_css-hs.py

    r3415f4f rca3abe6  
    2222# Initial parameter values (if other than defaults) 
    2323initial_vals = { 
    24     "sld_core" : 1.0592, 
     24    "sld_core" : 1.05, 
     25    "sld_shell" : 2.88*pen-0.05*(1-pen), 
    2526    "sld_solvent" : 2.88, 
    26     "radius" : 890, 
    27     "thickness" : 130 
     27    "radius" : 730, 
     28    "thickness" : 20, 
     29    "volfraction" : phi, 
     30    "scale" : (1-phi) 
    2831} 
    2932 
  • sasmodels/kernelcl.py

    rc094758 r8e0d974  
    426426        self._need_release = [self.loops_b, self.res_b, self.q_input] 
    427427 
    428     def __call__(self, fixed_pars, pd_pars, cutoff=1e-5): 
     428    def __call__(self, fixed_pars, pd_pars, cutoff): 
    429429        real = (np.float32 if self.q_input.dtype == generate.F32 
    430430                else np.float64 if self.q_input.dtype == generate.F64 
  • sasmodels/models/_spherepy.py

    raa2edb2 r49da079  
    1717where *scale* is a volume fraction, $V$ is the volume of the scatterer, 
    1818$r$ is the radius of the sphere, *background* is the background level and 
    19 *sld* and *solvent_sld* are the scattering length densities (SLDs) of the 
     19*sld* and *sld_solvent* are the scattering length densities (SLDs) of the 
    2020scatterer and the solvent respectively. 
    2121 
     
    4747from numpy import pi, inf, sin, cos, sqrt, log 
    4848 
    49 name = "sphere (python)" 
    50 title = "Spheres with uniform scattering length density" 
     49name = " _sphere (python)" 
     50title = "PAK testing ideas for Spheres with uniform scattering length density" 
    5151description = """\ 
    52 P(q)=(scale/V)*[3V(sld-solvent_sld)*(sin(qr)-qr cos(qr)) 
     52P(q)=(scale/V)*[3V(sld-sld_solvent)*(sin(qr)-qr cos(qr)) 
    5353                /(qr)^3]^2 + background 
    5454    r: radius of sphere 
    5555    V: The volume of the scatter 
    5656    sld: the SLD of the sphere 
    57     solvent_sld: the SLD of the solvent 
     57    sld_solvent: the SLD of the solvent 
    5858""" 
    5959category = "shape:sphere" 
     
    6262parameters = [["sld", "1e-6/Ang^2", 1, [-inf, inf], "", 
    6363               "Layer scattering length density"], 
    64               ["solvent_sld", "1e-6/Ang^2", 6, [-inf, inf], "", 
     64              ["sld_solvent", "1e-6/Ang^2", 6, [-inf, inf], "", 
    6565               "Solvent scattering length density"], 
    6666              ["radius", "Ang", 50, [0, inf], "volume", 
     
    7272    return 1.333333333333333 * pi * radius ** 3 
    7373 
    74 def Iq(q, sld, solvent_sld, radius): 
     74def Iq(q, sld, sld_solvent, radius): 
    7575    #print "q",q 
    76     #print "sld,r",sld,solvent_sld,radius 
     76    #print "sld,r",sld,sld_solvent,radius 
    7777    qr = q * radius 
    7878    sn, cn = sin(qr), cos(qr) 
     
    8585    bes = 3 * (sn - qr * cn) / qr ** 3 # may be 0/0 but we fix that next line 
    8686    bes[qr == 0] = 1 
    87     fq = bes * (sld - solvent_sld) * form_volume(radius) 
     87    fq = bes * (sld - sld_solvent) * form_volume(radius) 
    8888    return 1.0e-4 * fq ** 2 
    8989Iq.vectorized = True  # Iq accepts an array of q values 
    9090 
    91 def Iqxy(qx, qy, sld, solvent_sld, radius): 
    92     return Iq(sqrt(qx ** 2 + qy ** 2), sld, solvent_sld, radius) 
     91def Iqxy(qx, qy, sld, sld_solvent, radius): 
     92    return Iq(sqrt(qx ** 2 + qy ** 2), sld, sld_solvent, radius) 
    9393Iqxy.vectorized = True  # Iqxy accepts arrays of qx, qy values 
    9494 
    95 def sesans(z, sld, solvent_sld, radius): 
     95def sesans(z, sld, sld_solvent, radius): 
    9696    """ 
    9797    Calculate SESANS-correlation function for a solid sphere. 
     
    115115 
    116116demo = dict(scale=1, background=0, 
    117             sld=6, solvent_sld=1, 
     117            sld=6, sld_solvent=1, 
    118118            radius=120, 
    119119            radius_pd=.2, radius_pd_n=45) 
    120120oldname = "SphereModel" 
    121 oldpars = dict(sld='sldSph', solvent_sld='sldSolv', radius='radius') 
     121oldpars = dict(sld='sldSph', sld_solvent='sldSolv', radius='radius') 
  • sasmodels/models/core_shell_sphere.py

    r3556ad7 r3f167d9  
    9191        @param thickness: shell thickness 
    9292    """ 
     93    return (1,1) 
    9394    whole = 4.0 * pi / 3.0 * pow((radius + thickness), 3) 
    9495    core = 4.0 * pi / 3.0 * radius * radius * radius 
  • sasmodels/models/hollow_rectangular_prism.py

    r43b7eea r3d8283b  
    8888title = "Hollow rectangular parallelepiped with uniform scattering length density." 
    8989description = """ 
    90     I(q)= scale*V*(sld - solvent_sld)^2*P(q,theta,phi)+background 
     90    I(q)= scale*V*(sld - sld_solvent)^2*P(q,theta,phi)+background 
    9191        P(q,theta,phi) = (2/pi/V^2) * double integral from 0 to pi/2 of ... 
    9292           (AP1-AP2)^2(q)*sin(theta)*dtheta*dphi 
     
    103103parameters = [["sld", "1e-6/Ang^2", 6.3, [-inf, inf], "", 
    104104               "Parallelepiped scattering length density"], 
    105               ["solvent_sld", "1e-6/Ang^2", 1, [-inf, inf], "", 
     105              ["sld_solvent", "1e-6/Ang^2", 1, [-inf, inf], "", 
    106106               "Solvent scattering length density"], 
    107107              ["a_side", "Ang", 35, [0, inf], "volume", 
     
    148148# parameters for demo 
    149149demo = dict(scale=1, background=0, 
    150             sld=6.3e-6, solvent_sld=1.0e-6, 
     150            sld=6.3e-6, sld_solvent=1.0e-6, 
    151151            a_side=35, b2a_ratio=1, c2a_ratio=1, thickness=1, 
    152152            a_side_pd=0.1, a_side_pd_n=10, 
     
    158158oldname = 'RectangularHollowPrismModel' 
    159159oldpars = dict(a_side='short_side', b2a_ratio='b2a_ratio', c_side='c2a_ratio', 
    160                thickness='thickness', sld='sldPipe', solvent_sld='sldSolv') 
     160               thickness='thickness', sld='sldPipe', sld_solvent='sldSolv') 
    161161 
    162162tests = [[{}, 0.2, 0.76687283098], 
  • sasmodels/models/hollow_rectangular_prism_thin_walls.py

    r43b7eea r3d8283b  
    7777from numpy import pi, inf, sqrt 
    7878 
    79 name = "hollow_rectangular_prism_infinitely_thin_walls" 
    80 title = "Hollow rectangular parallelepiped with infinitely thin walls." 
     79name = "hollow_rectangular_prism_thin_walls" 
     80title = "Hollow rectangular parallelepiped with thin walls." 
    8181description = """ 
    82     I(q)= scale*V*(sld - solvent_sld)^2*P(q)+background 
     82    I(q)= scale*V*(sld - sld_solvent)^2*P(q)+background 
    8383        with P(q) being the form factor corresponding to a hollow rectangular 
    8484        parallelepiped with infinitely thin walls. 
     
    8989parameters = [["sld", "1e-6/Ang^2", 6.3, [-inf, inf], "", 
    9090               "Parallelepiped scattering length density"], 
    91               ["solvent_sld", "1e-6/Ang^2", 1, [-inf, inf], "", 
     91              ["sld_solvent", "1e-6/Ang^2", 1, [-inf, inf], "", 
    9292               "Solvent scattering length density"], 
    9393              ["a_side", "Ang", 35, [0, inf], "volume", 
     
    9999             ] 
    100100 
    101 source = ["lib/gauss76.c", "hollow_rectangular_prism_infinitely_thin_walls.c"] 
     101source = ["lib/gauss76.c", "hollow_rectangular_prism_thin_walls.c"] 
    102102 
    103103def ER(a_side, b2a_ratio, c2a_ratio): 
     
    127127# parameters for demo 
    128128demo = dict(scale=1, background=0, 
    129             sld=6.3e-6, solvent_sld=1.0e-6, 
     129            sld=6.3e-6, sld_solvent=1.0e-6, 
    130130            a_side=35, b2a_ratio=1, c2a_ratio=1, 
    131131            a_side_pd=0.1, a_side_pd_n=10, 
     
    137137oldname = 'RectangularHollowPrismInfThinWallsModel' 
    138138oldpars = dict(a_side='short_side', b2a_ratio='b2a_ratio', c_side='c2a_ratio', 
    139                sld='sldPipe', solvent_sld='sldSolv') 
     139               sld='sldPipe', sld_solvent='sldSolv') 
    140140 
    141141tests = [[{}, 0.2, 0.837719188592], 
  • sasmodels/models/parallelepiped.py

    r6ef4293 r76e5041  
    151151---------- 
    152152 
    153 None. 
     153P Mittelbach and G Porod, *Acta Physica Austriaca*, 14 (1961) 185-211 
     154 
     155R Nayuk and K Huber, *Z. Phys. Chem.*, 226 (2012) 837-854 
    154156""" 
    155157 
     
    160162title = "Rectangular parallelepiped with uniform scattering length density." 
    161163description = """ 
    162     I(q)= scale*V*(sld - solvent_sld)^2*P(q,alpha)+background 
     164    I(q)= scale*V*(sld - sld_solvent)^2*P(q,alpha)+background 
    163165        P(q,alpha) = integral from 0 to 1 of ... 
    164166           phi(mu*sqrt(1-sigma^2),a) * S(mu*c*sigma/2)^2 * dsigma 
     
    177179parameters = [["sld", "1e-6/Ang^2", 4, [-inf, inf], "", 
    178180               "Parallelepiped scattering length density"], 
    179               ["solvent_sld", "1e-6/Ang^2", 1, [-inf, inf], "", 
     181              ["sld_solvent", "1e-6/Ang^2", 1, [-inf, inf], "", 
    180182               "Solvent scattering length density"], 
    181183              ["a_side", "Ang", 35, [0, inf], "volume", 
     
    210212# parameters for demo 
    211213demo = dict(scale=1, background=0, 
    212             sld=6.3e-6, solvent_sld=1.0e-6, 
     214            sld=6.3e-6, sld_solvent=1.0e-6, 
    213215            a_side=35, b_side=75, c_side=400, 
    214216            theta=45, phi=30, psi=15, 
     
    225227oldpars = dict(theta='parallel_theta', phi='parallel_phi', psi='parallel_psi', 
    226228               a_side='short_a', b_side='short_b', c_side='long_c', 
    227                sld='sldPipe', solvent_sld='sldSolv') 
     229               sld='sldPipe', sld_solvent='sldSolv') 
    228230 
    229231 
  • sasmodels/models/rectangular_prism.py

    r43b7eea r76e5041  
    99The only difference is that the way the relevant 
    1010parameters are defined here (*a*, *b/a*, *c/a* instead of *a*, *b*, *c*) 
    11 allows to use polydispersity with this model while keeping the shape of 
     11which allows use of polydispersity with this model while keeping the shape of 
    1212the prism (e.g. setting *b/a* = 1 and *c/a* = 1 and applying polydispersity 
    1313to *a* will generate a distribution of cubes of different sizes). 
     
    8686title = "Rectangular parallelepiped with uniform scattering length density." 
    8787description = """ 
    88     I(q)= scale*V*(sld - solvent_sld)^2*P(q,theta,phi)+background 
     88    I(q)= scale*V*(sld - sld_solvent)^2*P(q,theta,phi)+background 
    8989        P(q,theta,phi) = (2/pi) * double integral from 0 to pi/2 of ... 
    9090           AP^2(q)*sin(theta)*dtheta*dphi 
     
    9797parameters = [["sld", "1e-6/Ang^2", 6.3, [-inf, inf], "", 
    9898               "Parallelepiped scattering length density"], 
    99               ["solvent_sld", "1e-6/Ang^2", 1, [-inf, inf], "", 
     99              ["sld_solvent", "1e-6/Ang^2", 1, [-inf, inf], "", 
    100100               "Solvent scattering length density"], 
    101101              ["a_side", "Ang", 35, [0, inf], "volume", 
     
    125125# parameters for demo 
    126126demo = dict(scale=1, background=0, 
    127             sld=6.3e-6, solvent_sld=1.0e-6, 
     127            sld=6.3e-6, sld_solvent=1.0e-6, 
    128128            a_side=35, b2a_ratio=1, c2a_ratio=1, 
    129129            a_side_pd=0.1, a_side_pd_n=10, 
     
    135135oldname = 'RectangularPrismModel' 
    136136oldpars = dict(a_side='short_side', b2a_ratio='b2a_ratio', c_side='c2a_ratio', 
    137                sld='sldPipe', solvent_sld='sldSolv') 
     137               sld='sldPipe', sld_solvent='sldSolv') 
    138138 
    139139tests = [[{}, 0.2, 0.375248406825], 
  • sasmodels/models/sphere.py

    raa2edb2 r49da079  
    1717where *scale* is a volume fraction, $V$ is the volume of the scatterer, 
    1818$r$ is the radius of the sphere, *background* is the background level and 
    19 *sld* and *solvent_sld* are the scattering length densities (SLDs) of the 
     19*sld* and *sld_solvent* are the scattering length densities (SLDs) of the 
    2020scatterer and the solvent respectively. 
    2121 
     
    4949title = "Spheres with uniform scattering length density" 
    5050description = """\ 
    51 P(q)=(scale/V)*[3V(sld-solvent_sld)*(sin(qr)-qr cos(qr)) 
     51P(q)=(scale/V)*[3V(sld-sld_solvent)*(sin(qr)-qr cos(qr)) 
    5252                /(qr)^3]^2 + background 
    5353    r: radius of sphere 
    5454    V: The volume of the scatter 
    5555    sld: the SLD of the sphere 
    56     solvent_sld: the SLD of the solvent 
     56    sld_solvent: the SLD of the solvent 
    5757""" 
    5858category = "shape:sphere" 
     
    6161parameters = [["sld", "1e-6/Ang^2", 1, [-inf, inf], "", 
    6262               "Layer scattering length density"], 
    63               ["solvent_sld", "1e-6/Ang^2", 6, [-inf, inf], "", 
     63              ["sld_solvent", "1e-6/Ang^2", 6, [-inf, inf], "", 
    6464               "Solvent scattering length density"], 
    6565              ["radius", "Ang", 50, [0, inf], "volume", 
     
    7676 
    7777Iq = """ 
    78     return sphere_form(q, radius, sld, solvent_sld); 
     78    return sphere_form(q, radius, sld, sld_solvent); 
    7979    """ 
    8080 
     
    8282    // never called since no orientation or magnetic parameters. 
    8383    //return -1.0; 
    84     return Iq(sqrt(qx*qx + qy*qy), sld, solvent_sld, radius); 
     84    return Iq(sqrt(qx*qx + qy*qy), sld, sld_solvent, radius); 
    8585    """ 
    8686 
     
    9494 
    9595demo = dict(scale=1, background=0, 
    96             sld=6, solvent_sld=1, 
     96            sld=6, sld_solvent=1, 
    9797            radius=120, 
    9898            radius_pd=.2, radius_pd_n=45) 
    9999oldname = "SphereModel" 
    100 oldpars = dict(sld='sldSph', solvent_sld='sldSolv', radius='radius') 
     100oldpars = dict(sld='sldSph', sld_solvent='sldSolv', radius='radius') 
  • sasmodels/models/triaxial_ellipsoid.py

    r6ef4293 r49da079  
    9191               "Solvent scattering length density"], 
    9292              ["req_minor", "Ang", 20, [0, inf], "volume", 
    93                "Minor equitorial radius"], 
     93               "Minor equatorial radius"], 
    9494              ["req_major", "Ang", 400, [0, inf], "volume", 
    9595               "Major equatorial radius"], 
  • sasmodels/product.py

    r72a081d r8e0d974  
    163163        s_pd[0] = [effect_radius], [1.0] 
    164164 
    165         p_res = self.p_kernel(p_fixed, p_pd) 
    166         s_res = self.s_kernel(s_fixed, s_pd) 
     165        p_res = self.p_kernel(p_fixed, p_pd, cutoff) 
     166        s_res = self.s_kernel(s_fixed, s_pd, cutoff) 
    167167        #print s_fixed, s_pd, p_fixed, p_pd 
    168168 
  • sasmodels/sesans.py

    rc94577f r2684d45  
    2929 
    3030    q_min = dq = 0.1 * 2*pi / Rmax 
    31     return np.arange(q_min, Converter("1/A")(q_max[0], units=q_max[1]), dq) 
     31    return np.arange(q_min, 
     32                     Converter(q_max[1])(q_max[0], 
     33                                         units="1/A"), 
     34                     dq) 
    3235     
    3336def make_all_q(data): 
     
    7578 
    7679def call_hankel(data, q_calc, Iq_calc): 
    77     return hankel(data.x, data.lam * 1e-9, 
    78                   data.sample.thickness / 10, 
     80    return hankel((data.x, data.x_unit), 
     81                  (data.lam, data.lam_unit), 
     82                  (data.sample.thickness, 
     83                   data.sample.thickness_unit), 
    7984                  q_calc, Iq_calc) 
    8085   
     
    182187    *I* [cm$^{-1}$] is the value of the SANS model at *q* 
    183188    """ 
     189 
     190    from sas.sascalc.data_util.nxsunit import Converter 
     191    wavelength = Converter(wavelength[1])(wavelength[0],"A") 
     192    thickness = Converter(thickness[1])(thickness[0],"A") 
     193    Iq = Converter("1/cm")(Iq,"1/A") # All models default to inverse centimeters 
     194    SElength = Converter(SElength[1])(SElength[0],"A") 
     195 
    184196    G = np.zeros_like(SElength, 'd') 
    185197#============================================================================== 
     
    192204 
    193205    # [m^-1] step size in q, needed for integration 
    194     dq = (q[1]-q[0])*1e10 
     206    dq = (q[1]-q[0]) 
    195207 
    196208    # integration step, convert q into [m**-1] and 2 pi circle integration 
    197     G *= dq*1e10*2*pi 
    198     G0 *= dq*1e10*2*pi 
     209    G *= dq*2*pi 
     210    G0 = np.sum(Iq*q)*dq*2*np.pi 
    199211 
    200212    P = exp(thickness*wavelength**2/(4*pi**2)*(G-G0)) 
  • sasmodels/models/spherical_sld.py

    r8ad9619 r669bf21  
    170170# pylint: disable=bad-whitespace, line-too-long 
    171171#            ["name", "units", default, [lower, upper], "type", "description"], 
    172 parameters = [["n_shells",        "",               1,      [0, 9],         "", "number of shells"], 
    173               ["thick_inter_0",   "Ang",            50,     [-inf, inf],    "", "intern layer thickness"], 
    174               ["func_inter_0",    "",               0,      [0, 4],         "", "'Erf(|nu|*z)':0, 'RPower(z^|nu|)':1, 'LPower(z^|nu|)':2, 'RExp(-|nu|*z)':3, 'LExp(-|nu|*z)':4"], 
    175               ["core0_sld",       "1e-6/Ang^2",     2.07,   [-inf, inf],    "", "sld function flat"], 
    176               ["solvent_sld",     "1e-6/Ang^2",     1.0,    [-inf, inf],    "", "sld function solvent"], 
    177               ["flat1_sld",       "1e-6/Ang^2",     4.06,   [-inf, inf],    "", "sld function flat"], 
    178               ["flat2_sld",       "1e-6/Ang^2",     3.5,    [-inf, inf],    "", "sld function flat"], 
    179               ["flat3_sld",       "1e-6/Ang^2",     4.06,   [-inf, inf],    "", "sld function flat"], 
    180               ["flat4_sld",       "1e-6/Ang^2",     3.5,    [-inf, inf],    "", "sld function flat"], 
    181               ["flat5_sld",       "1e-6/Ang^2",     4.06,   [-inf, inf],    "", "sld function flat"], 
    182               ["flat6_sld",       "1e-6/Ang^2",     3.5,    [-inf, inf],    "", "sld function flat"], 
    183               ["flat7_sld",       "1e-6/Ang^2",     4.06,   [-inf, inf],    "", "sld function flat"], 
    184               ["flat8_sld",       "1e-6/Ang^2",     3.5,    [-inf, inf],    "", "sld function flat"], 
    185               ["flat9_sld",       "1e-6/Ang^2",     4.06,   [-inf, inf],    "", "sld function flat"], 
    186               ["flat10_sld",      "1e-6/Ang^2",     3.5,    [-inf, inf],    "", "sld function flat"], 
    187               ["thick_inter_1",    "Ang",           50.0,   [0, inf],    "", "intern layer thickness"], 
    188               ["thick_inter_2",    "Ang",           50.0,   [0, inf],    "", "intern layer thickness"], 
    189               ["thick_inter_3",    "Ang",           50.0,   [0, inf],    "", "intern layer thickness"], 
    190               ["thick_inter_4",    "Ang",           50.0,   [0, inf],    "", "intern layer thickness"], 
    191               ["thick_inter_5",    "Ang",           50.0,   [0, inf],    "", "intern layer thickness"], 
    192               ["thick_inter_6",    "Ang",           50.0,   [0, inf],    "", "intern layer thickness"], 
    193               ["thick_inter_7",    "Ang",           50.0,   [0, inf],    "", "intern layer thickness"], 
    194               ["thick_inter_8",    "Ang",           50.0,   [0, inf],    "", "intern layer thickness"], 
    195               ["thick_inter_9",    "Ang",           50.0,   [0, inf],    "", "intern layer thickness"], 
    196               ["thick_inter_10",   "Ang",           50.0,   [0, inf],    "", "intern layer thickness"], 
    197               ["thick_flat_1",     "Ang",           100.0,  [0, inf],    "", "flat layer_thickness"], 
    198               ["thick_flat_2",     "Ang",           100.0,  [0, inf],    "", "flat layer_thickness"], 
    199               ["thick_flat_3",     "Ang",           100.0,  [0, inf],    "", "flat layer_thickness"], 
    200               ["thick_flat_4",     "Ang",           100.0,  [0, inf],    "", "flat layer_thickness"], 
    201               ["thick_flat_5",     "Ang",           100.0,  [0, inf],    "", "flat layer_thickness"], 
    202               ["thick_flat_6",     "Ang",           100.0,  [0, inf],    "", "flat layer_thickness"], 
    203               ["thick_flat_7",     "Ang",           100.0,  [0, inf],    "", "flat layer_thickness"], 
    204               ["thick_flat_8",     "Ang",           100.0,  [0, inf],    "", "flat layer_thickness"], 
    205               ["thick_flat_9",     "Ang",           100.0,  [0, inf],    "", "flat layer_thickness"], 
    206               ["thick_flat_10",    "Ang",           100.0,  [0, inf],    "", "flat layer_thickness"], 
    207               ["func_inter_1",      "",             0,      [0, 4],         "", "'Erf(|nu|*z)':0, 'RPower(z^|nu|)':1, 'LPower(z^|nu|)':2, 'RExp(-|nu|*z)':3, 'LExp(-|nu|*z)':4"], 
    208               ["func_inter_2",      "",             0,      [0, 4],         "", "'Erf(|nu|*z)':0, 'RPower(z^|nu|)':1, 'LPower(z^|nu|)':2, 'RExp(-|nu|*z)':3, 'LExp(-|nu|*z)':4"], 
    209               ["func_inter_3",      "",             0,      [0, 4],         "", "'Erf(|nu|*z)':0, 'RPower(z^|nu|)':1, 'LPower(z^|nu|)':2, 'RExp(-|nu|*z)':3, 'LExp(-|nu|*z)':4"], 
    210               ["func_inter_4",      "",             0,      [0, 4],         "", "'Erf(|nu|*z)':0, 'RPower(z^|nu|)':1, 'LPower(z^|nu|)':2, 'RExp(-|nu|*z)':3, 'LExp(-|nu|*z)':4"], 
    211               ["func_inter_5",      "",             0,      [0, 4],         "", "'Erf(|nu|*z)':0, 'RPower(z^|nu|)':1, 'LPower(z^|nu|)':2, 'RExp(-|nu|*z)':3, 'LExp(-|nu|*z)':4"], 
    212               ["func_inter_6",      "",             0,      [0, 4],         "", "'Erf(|nu|*z)':0, 'RPower(z^|nu|)':1, 'LPower(z^|nu|)':2, 'RExp(-|nu|*z)':3, 'LExp(-|nu|*z)':4"], 
    213               ["func_inter_7",      "",             0,      [0, 4],         "", "'Erf(|nu|*z)':0, 'RPower(z^|nu|)':1, 'LPower(z^|nu|)':2, 'RExp(-|nu|*z)':3, 'LExp(-|nu|*z)':4"], 
    214               ["func_inter_8",      "",             0,      [0, 4],         "", "'Erf(|nu|*z)':0, 'RPower(z^|nu|)':1, 'LPower(z^|nu|)':2, 'RExp(-|nu|*z)':3, 'LExp(-|nu|*z)':4"], 
    215               ["func_inter_9",      "",             0,      [0, 4],         "", "'Erf(|nu|*z)':0, 'RPower(z^|nu|)':1, 'LPower(z^|nu|)':2, 'RExp(-|nu|*z)':3, 'LExp(-|nu|*z)':4"], 
    216               ["func_inter_10",     "",             0,      [0, 4],         "", "'Erf(|nu|*z)':0, 'RPower(z^|nu|)':1, 'LPower(z^|nu|)':2, 'RExp(-|nu|*z)':3, 'LExp(-|nu|*z)':4"], 
    217               ["nu_inter_1",        "",             2.5,    [-inf, inf],    "", "steepness parameter"], 
    218               ["nu_inter_2",        "",             2.5,    [-inf, inf],    "", "steepness parameter"], 
    219               ["nu_inter_3",        "",             2.5,    [-inf, inf],    "", "steepness parameter"], 
    220               ["nu_inter_4",        "",             2.5,    [-inf, inf],    "", "steepness parameter"], 
    221               ["nu_inter_5",        "",             2.5,    [-inf, inf],    "", "steepness parameter"], 
    222               ["nu_inter_6",        "",             2.5,    [-inf, inf],   "", "steepness parameter"], 
    223               ["nu_inter_7",        "",             2.5,    [-inf, inf],    "", "steepness parameter"], 
    224               ["nu_inter_8",        "",             2.5,    [-inf, inf],    "", "steepness parameter"], 
    225               ["nu_inter_9",        "",             2.5,    [-inf, inf],    "", "steepness parameter"], 
    226               ["nu_inter_10",       "",             2.5,    [-inf, inf],    "", "steepness parameter"], 
    227               ["npts_inter",        "",             35,     [0, 35],        "", "number of points in each sublayer Must be odd number"], 
    228               ["nu_inter_0",        "",             2.5,    [-inf, inf],    "", "steepness parameter"], 
    229               ["rad_core_0",        "Ang",          50.0,   [0, inf],    "", "intern layer thickness"], 
     172parameters = [["n_shells",         "",               1,      [0, 9],         "", "number of shells"], 
     173              ["thick_inter[n]",   "Ang",            50,     [-inf, inf],    "", "intern layer thickness"], 
     174              ["func_inter[n]",    "",               0,      [0, 4],         "", "Erf:0, RPower:1, LPower:2, RExp:3, LExp:4"], 
     175              ["sld_core",         "1e-6/Ang^2",     2.07,   [-inf, inf],    "", "sld function flat"], 
     176              ["sld_solvent",      "1e-6/Ang^2",     1.0,    [-inf, inf],    "", "sld function solvent"], 
     177              ["sld_flat[n]",      "1e-6/Ang^2",     4.06,   [-inf, inf],    "", "sld function flat"], 
     178              ["thick_inter[n]",   "Ang",            50.0,   [0, inf],    "", "intern layer thickness"], 
     179              ["thick_flat[n]",    "Ang",            100.0,  [0, inf],    "", "flat layer_thickness"], 
     180              ["inter_nu[n]",      "",               2.5,    [-inf, inf],    "", "steepness parameter"], 
     181              ["npts_inter",       "",               35,     [0, 35],        "", "number of points in each sublayer Must be odd number"], 
     182              ["core_rad",         "Ang",            50.0,   [0, inf],    "", "intern layer thickness"], 
    230183              ] 
    231184# pylint: enable=bad-whitespace, line-too-long 
    232185#source = ["lib/librefl.c",  "lib/sph_j1c.c", "spherical_sld.c"] 
    233186 
    234 Iq = """ 
    235     return q; 
    236     """ 
    237  
    238 Iqxy = """ 
    239     // never called since no orientation or magnetic parameters. 
    240     //return -1.0; 
    241     """ 
     187def Iq(q, *args, **kw): 
     188    return q 
     189 
     190def Iqxy(qx, *args, **kw): 
     191    return qx 
     192 
    242193 
    243194demo = dict( 
Note: See TracChangeset for help on using the changeset viewer.