Changeset 5b0335b in sasmodels for sasmodels/models/spherical_sld.py


Ignore:
Timestamp:
Apr 4, 2016 11:36:11 AM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
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:
68e7f9d
Parents:
885ee37 (diff), 204fd9b (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 remote-tracking branch 'origin/master' into polydisp

Conflicts:

sasmodels/core.py
sasmodels/models/spherical_sld.py

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/spherical_sld.py

    rce896fd r5b0335b  
    168168category = "sphere-based" 
    169169 
     170INTERFACE_CASES = ["Erf", "RPower", "LPower", "RExp", "LExp"] 
     171 
    170172# pylint: disable=bad-whitespace, line-too-long 
    171173#            ["name", "units", default, [lower, upper], "type", "description"], 
    172174parameters = [["n_shells",                "",               1,      [0, 9],      "", "number of shells"], 
    173               ["thick_inter[n_shells]",   "Ang",            50,     [-inf, inf], "", "intern layer thickness"], 
    174               ["func_inter[n_shells]",    "",               0,      [0, 4],      "", "Erf:0, RPower:1, LPower:2, RExp:3, LExp:4"], 
     175              ["radius_core",             "Ang",            50.0,   [0, inf],    "", "intern layer thickness"], 
    175176              ["sld_core",                "1e-6/Ang^2",     2.07,   [-inf, inf], "", "sld function flat"], 
    176177              ["sld_solvent",             "1e-6/Ang^2",     1.0,    [-inf, inf], "", "sld function solvent"], 
    177178              ["sld_flat[n_shells]",      "1e-6/Ang^2",     4.06,   [-inf, inf], "", "sld function flat"], 
     179              ["thick_flat[n_shells]",    "Ang",            100.0,  [0, inf],    "", "flat layer_thickness"], 
     180              ["func_inter[n_shells]",    "",               0,      INTERFACE_CASES,  "", "shape of the interface between shells"], 
     181              ["nu_inter[n_shells]",      "",               2.5,    [-inf, inf], "", "steepness parameter"], 
    178182              ["thick_inter[n_shells]",   "Ang",            50.0,   [0, inf],    "", "intern layer thickness"], 
    179               ["thick_flat[n_shells]",    "Ang",            100.0,  [0, inf],    "", "flat layer_thickness"], 
    180               ["inter_nu[n_shells]",      "",               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"], 
     183              ["n_points_inter",          "",               35,     [0, 35],     "", "number of points in each sublayer Must be odd number"], 
    183184              ] 
    184185# pylint: enable=bad-whitespace, line-too-long 
     
    193194    solvent_sld=1.0, 
    194195    background=0.0, 
    195     npts_inter=35.0, 
    196     func_inter_0=0, 
    197     nu_inter_0=2.5, 
    198     rad_core_0=50.0, 
    199     core0_sld=2.07, 
    200     thick_inter_0=50.0, 
    201     func_inter_1=0, 
    202     nu_inter_1=2.5, 
    203     thick_inter_1=50.0, 
    204     flat1_sld=4.0, 
    205     thick_flat_1=100.0, 
    206     func_inter_2=0, 
    207     nu_inter_2=2.5, 
    208     thick_inter_2=50.0, 
    209     flat2_sld=3.5, 
    210     thick_flat_2=100.0, 
    211     func_inter_3=0, 
    212     nu_inter_3=2.5, 
    213     thick_inter_3=50.0, 
    214     flat3_sld=4.0, 
    215     thick_flat_3=100.0, 
    216     func_inter_4=0, 
    217     nu_inter_4=2.5, 
    218     thick_inter_4=50.0, 
    219     flat4_sld=3.5, 
    220     thick_flat_4=100.0, 
    221     func_inter_5=0, 
    222     nu_inter_5=2.5, 
    223     thick_inter_5=50.0, 
    224     flat5_sld=4.0, 
    225     thick_flat_5=100.0, 
    226     func_inter_6=0, 
    227     nu_inter_6=2.5, 
    228     thick_inter_6=50.0, 
    229     flat6_sld=3.5, 
    230     thick_flat_6=100.0, 
    231     func_inter_7=0, 
    232     nu_inter_7=2.5, 
    233     thick_inter_7=50.0, 
    234     flat7_sld=4.0, 
    235     thick_flat_7=100.0, 
    236     func_inter_8=0, 
    237     nu_inter_8=2.5, 
    238     thick_inter_8=50.0, 
    239     flat8_sld=3.5, 
    240     thick_flat_8=100.0, 
    241     func_inter_9=0, 
    242     nu_inter_9=2.5, 
    243     thick_inter_9=50.0, 
    244     flat9_sld=4.0, 
    245     thick_flat_9=100.0, 
    246     func_inter_10=0, 
    247     nu_inter_10=2.5, 
    248     thick_inter_10=50.0, 
    249     flat10_sld=3.5, 
    250     thick_flat_10=100.0 
     196    n_points_inter=35.0, 
    251197    ) 
    252198 
    253199oldname = "SphereSLDModel" 
    254200oldpars = dict( 
    255     n_shells="n_shells", 
    256     scale="scale", 
    257     background='background', 
    258     npts_inter='npts_inter', 
    259     solvent_sld='sld_solv', 
    260  
    261     func_inter_0='func_inter0', 
    262     nu_inter_0='nu_inter0', 
    263     rad_core_0='rad_core0', 
    264     core0_sld='sld_core0', 
    265     thick_inter_0='thick_inter0', 
    266     func_inter_1='func_inter1', 
    267     nu_inter_1='nu_inter1', 
    268     thick_inter_1='thick_inter1', 
    269     flat1_sld='sld_flat1', 
    270     thick_flat_1='thick_flat1', 
    271     func_inter_2='func_inter2', 
    272     nu_inter_2='nu_inter2', 
    273     thick_inter_2='thick_inter2', 
    274     flat2_sld='sld_flat2', 
    275     thick_flat_2='thick_flat2', 
    276     func_inter_3='func_inter3', 
    277     nu_inter_3='nu_inter3', 
    278     thick_inter_3='thick_inter3', 
    279     flat3_sld='sld_flat3', 
    280     thick_flat_3='thick_flat3', 
    281     func_inter_4='func_inter4', 
    282     nu_inter_4='nu_inter4', 
    283     thick_inter_4='thick_inter4', 
    284     flat4_sld='sld_flat4', 
    285     thick_flat_4='thick_flat4', 
    286     func_inter_5='func_inter5', 
    287     nu_inter_5='nu_inter5', 
    288     thick_inter_5='thick_inter5', 
    289     flat5_sld='sld_flat5', 
    290     thick_flat_5='thick_flat5', 
    291     func_inter_6='func_inter6', 
    292     nu_inter_6='nu_inter6', 
    293     thick_inter_6='thick_inter6', 
    294     flat6_sld='sld_flat6', 
    295     thick_flat_6='thick_flat6', 
    296     func_inter_7='func_inter7', 
    297     nu_inter_7='nu_inter7', 
    298     thick_inter_7='thick_inter7', 
    299     flat7_sld='sld_flat7', 
    300     thick_flat_7='thick_flat7', 
    301     func_inter_8='func_inter8', 
    302     nu_inter_8='nu_inter8', 
    303     thick_inter_8='thick_inter8', 
    304     flat8_sld='sld_flat8', 
    305     thick_flat_8='thick_flat8', 
    306     func_inter_9='func_inter9', 
    307     nu_inter_9='nu_inter9', 
    308     thick_inter_9='thick_inter9', 
    309     flat9_sld='sld_flat9', 
    310     thick_flat_9='thick_flat9', 
    311     func_inter_10='func_inter10', 
    312     nu_inter_10='nu_inter10', 
    313     thick_inter_10='thick_inter10', 
    314     flat10_sld='sld_flat10', 
    315     thick_flat_10='thick_flat10') 
     201    #scale="scale", 
     202    #background='background', 
     203    #n_shells="n_shells", 
     204    radius_core='rad_core', 
     205    #sld_core='sld_core', 
     206    #sld_flat='sld_flat', 
     207    #thick_flat='thick_flat', 
     208    #func_inter='func_inter', 
     209    #thick_inter='thick_inter', 
     210    #nu_inter='nu_inter', 
     211    #points_inter='npts_inter', 
     212    sld_solvent='sld_solv', 
     213    ) 
    316214 
    317215#TODO: Not working yet 
    318216tests = [ 
    319217    # Accuracy tests based on content in test/utest_extra_models.py 
    320     [{'npts_iter':35, 
    321         'sld_solv':1, 
    322         'func_inter_1':0.0, 
    323         'nu_inter':2.5, 
    324         'thick_inter_1':50, 
    325         'sld_flat_1':4, 
    326         'thick_flat_1':100, 
    327         'func_inter_0':0.0, 
    328         'nu_inter_0':2.5, 
    329         'rad_core_0':50.0, 
    330         'sld_core_0':2.07, 
    331         'thick_inter_0':50, 
    332         'background': 0.0, 
    333     }, 0.001, 1000], 
     218    [{'n_points_inter':35, 
     219      'sld_solv':1, 
     220      'radius_core':50.0, 
     221      'sld_core':2.07, 
     222      'func_inter2':0.0, 
     223      'thick_inter2':50, 
     224      'nu_inter2':2.5, 
     225      'sld_flat2':4, 
     226      'thick_flat2':100, 
     227      'func_inter1':0.0, 
     228      'thick_inter1':50, 
     229      'nu_inter1':2.5, 
     230      'background': 0.0, 
     231     }, 0.001, 0.001], 
    334232] 
Note: See TracChangeset for help on using the changeset viewer.