Changeset 4a82d4d in sasmodels


Ignore:
Timestamp:
Feb 17, 2016 11:42:35 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:
2556095
Parents:
7ef3589
Message:

Spherical SLD working expect low q region

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • .gitignore

    ra36c6d3 r4a82d4d  
    1818/.pydevproject 
    1919/.idea 
     20/sasmodels.egg-info/ 
  • compare.sh

    rec7e360 r4a82d4d  
    77#echo PYTHONPATH=$PYTHONPATH 
    88 
    9 #PYOPENCL_COMPILER_OUTPUT=1; export PYOPENCL_COMPILER_OUTPUT 
     9PYOPENCL_COMPILER_OUTPUT=1; export PYOPENCL_COMPILER_OUTPUT 
    1010#PYOPENCL_CTX=${CTX:-1}; export PYOPENCL_CTX 
    1111 
  • sasmodels/models/spherical_sld.c

    r7ef3589 r4a82d4d  
    22 
    33double Iq(double q, 
    4     int n_shells, double sld_solve, int npts_inter, 
    5     double sld_core_0, double rad_core_0, double thinck_inter_0, int func_inter_0, double nu_inter_0, 
    6     double sld_flat_1, double thick_inter_1, double thick_flat_1, int func_inter_1, double nu_inter_1, 
    7     double sld_flat_2, double thick_inter_2, double thick_flat_2, int func_inter_2, double nu_inter_2, 
    8     double sld_flat_3, double thick_inter_3, double thick_flat_3, int func_inter_3, double nu_inter_3, 
    9     double sld_flat_4, double thick_inter_4, double thick_flat_4, int func_inter_4, double nu_inter_4, 
    10     double sld_flat_5, double thick_inter_5, double thick_flat_5, int func_inter_5, double nu_inter_5, 
    11     double sld_flat_6, double thick_inter_6, double thick_flat_6, int func_inter_6, double nu_inter_6, 
    12     double sld_flat_7, double thick_inter_7, double thick_flat_7, int func_inter_7, double nu_inter_7, 
    13     double sld_flat_8, double thick_inter_8, double thick_flat_8, int func_inter_8, double nu_inter_8, 
    14     double sld_flat_9, double thick_inter_9, double thick_flat_9, int func_inter_9, double nu_inter_9, 
    15     double sld_flat_10, double thick_inter_10, double thick_flat_10, int func_inter_10, double nu_inter_10); 
     4    int n_shells, double thick_inter_0, int func_inter_0, double sld_core_0, double sld_solv, 
     5    double sld_flat_1, double sld_flat_2, double sld_flat_3, double sld_flat_4, double sld_flat_5, 
     6    double sld_flat_6, double sld_flat_7, double sld_flat_8, double sld_flat_9, double sld_flat_10, 
     7    double thick_inter_1, double thick_inter_2, double thick_inter_3, double thick_inter_4, double thick_inter_5, 
     8    double thick_inter_6, double thick_inter_7, double thick_inter_8, double thick_inter_9, double thick_inter_10, 
     9    double thick_flat_1, double thick_flat_2, double thick_flat_3, double thick_flat_4, double thick_flat_5, 
     10    double thick_flat_6, double thick_flat_7, double thick_flat_8, double thick_flat_9, double thick_flat_10, 
     11    int func_inter_1, int func_inter_2, int func_inter_3, int func_inter_4, int func_inter_5, 
     12    int func_inter_6, int func_inter_7, int func_inter_8, int func_inter_9, int func_inter_10, 
     13    double nu_inter_1, double nu_inter_2,double nu_inter_3, double nu_inter_4, double nu_inter_5, 
     14    double nu_inter_6, double nu_inter_7, double nu_inter_8, double nu_inter_9, double nu_inter_10, 
     15    int npts_inter, double nu_inter_0, double rad_core_0); 
    1616 
    1717double Iqxy(double qx, double qy, 
    18     int n_shells, double sld_solve, int npts_inter, 
    19     double sld_core_0, double rad_core_0, double thinck_inter_0, int func_inter_0, double nu_inter_0, 
    20     double sld_flat_1, double thick_inter_1, double thick_flat_1, int func_inter_1, double nu_inter_1, 
    21     double sld_flat_2, double thick_inter_2, double thick_flat_2, int func_inter_2, double nu_inter_2, 
    22     double sld_flat_3, double thick_inter_3, double thick_flat_3, int func_inter_3, double nu_inter_3, 
    23     double sld_flat_4, double thick_inter_4, double thick_flat_4, int func_inter_4, double nu_inter_4, 
    24     double sld_flat_5, double thick_inter_5, double thick_flat_5, int func_inter_5, double nu_inter_5, 
    25     double sld_flat_6, double thick_inter_6, double thick_flat_6, int func_inter_6, double nu_inter_6, 
    26     double sld_flat_7, double thick_inter_7, double thick_flat_7, int func_inter_7, double nu_inter_7, 
    27     double sld_flat_8, double thick_inter_8, double thick_flat_8, int func_inter_8, double nu_inter_8, 
    28     double sld_flat_9, double thick_inter_9, double thick_flat_9, int func_inter_9, double nu_inter_9, 
    29     double sld_flat_10, double thick_inter_10, double thick_flat_10, int func_inter_10, double nu_inter_10); 
     18    int n_shells, double thick_inter_0, int func_inter_0, double sld_core_0, double sld_solv, 
     19    double sld_flat_1, double sld_flat_2, double sld_flat_3, double sld_flat_4, double sld_flat_5, 
     20    double sld_flat_6, double sld_flat_7, double sld_flat_8, double sld_flat_9, double sld_flat_10, 
     21    double thick_inter_1, double thick_inter_2, double thick_inter_3, double thick_inter_4, double thick_inter_5, 
     22    double thick_inter_6, double thick_inter_7, double thick_inter_8, double thick_inter_9, double thick_inter_10, 
     23    double thick_flat_1, double thick_flat_2, double thick_flat_3, double thick_flat_4, double thick_flat_5, 
     24    double thick_flat_6, double thick_flat_7, double thick_flat_8, double thick_flat_9, double thick_flat_10, 
     25    int func_inter_1, int func_inter_2, int func_inter_3, int func_inter_4, int func_inter_5, 
     26    int func_inter_6, int func_inter_7, int func_inter_8, int func_inter_9, int func_inter_10, 
     27    double nu_inter_1, double nu_inter_2,double nu_inter_3, double nu_inter_4, double nu_inter_5, 
     28    double nu_inter_6, double nu_inter_7, double nu_inter_8, double nu_inter_9, double nu_inter_10, 
     29    int npts_inter, double nu_inter_0, double rad_core_0); 
    3030 
    3131//TODO: Check what is for volume for this model 
     
    189189  f2 *= scale; 
    190190  f2 += background; 
    191  
    192191  //free(fun_type); 
    193192  //free(sld); 
     
    206205 */ 
    207206double Iq(double q, 
    208     int n_shells, double sld_solv, int npts_inter, 
    209     double sld_core_0, double rad_core_0, double thick_inter_0, int func_inter_0, double nu_inter_0, 
    210     double sld_flat_1, double thick_inter_1, double thick_flat_1, int func_inter_1, double nu_inter_1, 
    211     double sld_flat_2, double thick_inter_2, double thick_flat_2, int func_inter_2, double nu_inter_2, 
    212     double sld_flat_3, double thick_inter_3, double thick_flat_3, int func_inter_3, double nu_inter_3, 
    213     double sld_flat_4, double thick_inter_4, double thick_flat_4, int func_inter_4, double nu_inter_4, 
    214     double sld_flat_5, double thick_inter_5, double thick_flat_5, int func_inter_5, double nu_inter_5, 
    215     double sld_flat_6, double thick_inter_6, double thick_flat_6, int func_inter_6, double nu_inter_6, 
    216     double sld_flat_7, double thick_inter_7, double thick_flat_7, int func_inter_7, double nu_inter_7, 
    217     double sld_flat_8, double thick_inter_8, double thick_flat_8, int func_inter_8, double nu_inter_8, 
    218     double sld_flat_9, double thick_inter_9, double thick_flat_9, int func_inter_9, double nu_inter_9, 
    219     double sld_flat_10, double thick_inter_10, double thick_flat_10, int func_inter_10, double nu_inter_10) { 
    220  
     207    int n_shells, double thick_inter_0, int func_inter_0, double sld_core_0, double sld_solv, 
     208    double sld_flat_1, double sld_flat_2, double sld_flat_3, double sld_flat_4, double sld_flat_5, 
     209    double sld_flat_6, double sld_flat_7, double sld_flat_8, double sld_flat_9, double sld_flat_10, 
     210    double thick_inter_1, double thick_inter_2, double thick_inter_3, double thick_inter_4, double thick_inter_5, 
     211    double thick_inter_6, double thick_inter_7, double thick_inter_8, double thick_inter_9, double thick_inter_10, 
     212    double thick_flat_1, double thick_flat_2, double thick_flat_3, double thick_flat_4, double thick_flat_5, 
     213    double thick_flat_6, double thick_flat_7, double thick_flat_8, double thick_flat_9, double thick_flat_10, 
     214    int func_inter_1, int func_inter_2, int func_inter_3, int func_inter_4, int func_inter_5, 
     215    int func_inter_6, int func_inter_7, int func_inter_8, int func_inter_9, int func_inter_10, 
     216    double nu_inter_1, double nu_inter_2,double nu_inter_3, double nu_inter_4, double nu_inter_5, 
     217    double nu_inter_6, double nu_inter_7, double nu_inter_8, double nu_inter_9, double nu_inter_10, 
     218    int npts_inter, double nu_inter_0, double rad_core_0) { 
     219 
     220    //printf("Number of points %d\n",npts_inter); 
    221221    double intensity; 
    222222    //TODO: Remove this container at later stage. It is only kept to minimize stupid errors now 
     
    290290    dp[59] = rad_core_0; 
    291291 
    292  
    293292    intensity = sphere_sld_kernel(dp,q); 
    294  
     293    //printf("%10d\n",intensity); 
    295294    return intensity; 
    296295} 
     
    303302 */ 
    304303double Iqxy(double qx, double qy, 
    305     int n_shells, double sld_solve, int npts_inter, 
    306     double sld_core_0, double rad_core_0, double thinck_inter_0, int func_inter_0, double nu_inter_0, 
    307     double sld_flat_1, double thick_inter_1, double thick_flat_1, int func_inter_1, double nu_inter_1, 
    308     double sld_flat_2, double thick_inter_2, double thick_flat_2, int func_inter_2, double nu_inter_2, 
    309     double sld_flat_3, double thick_inter_3, double thick_flat_3, int func_inter_3, double nu_inter_3, 
    310     double sld_flat_4, double thick_inter_4, double thick_flat_4, int func_inter_4, double nu_inter_4, 
    311     double sld_flat_5, double thick_inter_5, double thick_flat_5, int func_inter_5, double nu_inter_5, 
    312     double sld_flat_6, double thick_inter_6, double thick_flat_6, int func_inter_6, double nu_inter_6, 
    313     double sld_flat_7, double thick_inter_7, double thick_flat_7, int func_inter_7, double nu_inter_7, 
    314     double sld_flat_8, double thick_inter_8, double thick_flat_8, int func_inter_8, double nu_inter_8, 
    315     double sld_flat_9, double thick_inter_9, double thick_flat_9, int func_inter_9, double nu_inter_9, 
    316     double sld_flat_10, double thick_inter_10, double thick_flat_10, int func_inter_10, double nu_inter_10) { 
     304    int n_shells, double thick_inter_0, int func_inter_0, double sld_core_0, double sld_solv, 
     305    double sld_flat_1, double sld_flat_2, double sld_flat_3, double sld_flat_4, double sld_flat_5, 
     306    double sld_flat_6, double sld_flat_7, double sld_flat_8, double sld_flat_9, double sld_flat_10, 
     307    double thick_inter_1, double thick_inter_2, double thick_inter_3, double thick_inter_4, double thick_inter_5, 
     308    double thick_inter_6, double thick_inter_7, double thick_inter_8, double thick_inter_9, double thick_inter_10, 
     309    double thick_flat_1, double thick_flat_2, double thick_flat_3, double thick_flat_4, double thick_flat_5, 
     310    double thick_flat_6, double thick_flat_7, double thick_flat_8, double thick_flat_9, double thick_flat_10, 
     311    int func_inter_1, int func_inter_2, int func_inter_3, int func_inter_4, int func_inter_5, 
     312    int func_inter_6, int func_inter_7, int func_inter_8, int func_inter_9, int func_inter_10, 
     313    double nu_inter_1, double nu_inter_2,double nu_inter_3, double nu_inter_4, double nu_inter_5, 
     314    double nu_inter_6, double nu_inter_7, double nu_inter_8, double nu_inter_9, double nu_inter_10, 
     315    int npts_inter, double nu_inter_0, double rad_core_0) { 
    317316 
    318317    double q = sqrt(qx*qx + qy*qy); 
    319     return Iq(q,n_shells, sld_solve, npts_inter, 
    320     sld_core_0, rad_core_0, thinck_inter_0, func_inter_0, nu_inter_0, 
    321     sld_flat_1, thick_inter_1, thick_flat_1, func_inter_1, nu_inter_1, 
    322     sld_flat_2, thick_inter_2, thick_flat_2, func_inter_2, nu_inter_2, 
    323     sld_flat_3, thick_inter_3, thick_flat_3, func_inter_3, nu_inter_3, 
    324     sld_flat_4, thick_inter_4, thick_flat_4, func_inter_4, nu_inter_4, 
    325     sld_flat_5, thick_inter_5, thick_flat_5, func_inter_5, nu_inter_5, 
    326     sld_flat_6, thick_inter_6, thick_flat_6, func_inter_6, nu_inter_6, 
    327     sld_flat_7, thick_inter_7, thick_flat_7, func_inter_7, nu_inter_7, 
    328     sld_flat_8, thick_inter_8, thick_flat_8, func_inter_8, nu_inter_8, 
    329     sld_flat_9, thick_inter_9, thick_flat_9, func_inter_9, nu_inter_9, 
    330     sld_flat_10, thick_inter_10, thick_flat_10, func_inter_10, nu_inter_10); 
     318    return Iq(q, n_shells, thick_inter_0, func_inter_0, sld_core_0, sld_solv, 
     319    sld_flat_1, sld_flat_2, sld_flat_3, sld_flat_4, sld_flat_5, 
     320    sld_flat_6, sld_flat_7, sld_flat_8, sld_flat_9, sld_flat_10, 
     321    thick_inter_1, thick_inter_2, thick_inter_3, thick_inter_4, thick_inter_5, 
     322    thick_inter_6, thick_inter_7, thick_inter_8, thick_inter_9, thick_inter_10, 
     323    thick_flat_1, thick_flat_2, thick_flat_3, thick_flat_4, thick_flat_5, 
     324    thick_flat_6, thick_flat_7, thick_flat_8, thick_flat_9, thick_flat_10, 
     325    func_inter_1, func_inter_2, func_inter_3, func_inter_4, func_inter_5, 
     326    func_inter_6, func_inter_7, func_inter_8, func_inter_9, func_inter_10, 
     327    nu_inter_1, nu_inter_2, nu_inter_3, nu_inter_4, nu_inter_5, 
     328    nu_inter_6, nu_inter_7, nu_inter_8, nu_inter_9, nu_inter_10, 
     329    npts_inter, nu_inter_0, rad_core_0); 
    331330 
    332331} 
  • sasmodels/models/spherical_sld.py

    r7ef3589 r4a82d4d  
    6464category = "shere-based" 
    6565 
     66 
    6667# pylint: disable=bad-whitespace, line-too-long 
    6768#            ["name", "units", default, [lower, upper], "type", "description"], 
    6869parameters = [["n_shells",       "",         1, [0, 9], "", "number of shells"], 
     70              ["thick_inter_0",       "Ang",         50, [-inf, inf], "", "intern layer thickness"], 
     71              ["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"], 
     72              ["sld_core_0",       "1/Ang^2",         2.07E-6, [-inf, inf],"", "sld function flat"], 
     73              ["sld_solv",     "1/Ang^2",    1E-6,[-inf, inf], "","sld function solvent"], 
     74              ["sld_flat_1",       "1/Ang^2",         4.06E-6, [-inf, inf],"", "sld function flat"], 
     75              ["sld_flat_2",       "1/Ang^2",         3.5E-6, [-inf, inf],"", "sld function flat"], 
     76              ["sld_flat_3",       "1/Ang^2",         4.06E-6, [-inf, inf],"", "sld function flat"], 
     77              ["sld_flat_4",       "1/Ang^2",         3.5E-6, [-inf, inf],"", "sld function flat"], 
     78              ["sld_flat_5",       "1/Ang^2",         4.06E-6, [-inf, inf],"", "sld function flat"], 
     79              ["sld_flat_6",       "1/Ang^2",         3.5E-6, [-inf, inf],"", "sld function flat"], 
     80              ["sld_flat_7",       "1/Ang^2",         4.06E-6, [-inf, inf],"", "sld function flat"], 
     81              ["sld_flat_8",       "1/Ang^2",         3.5E-6, [-inf, inf],"", "sld function flat"], 
     82              ["sld_flat_9",       "1/Ang^2",         4.06E-6, [-inf, inf],"", "sld function flat"], 
     83              ["sld_flat_10",      "1/Ang^2",         3.5E-6, [-inf, inf],"", "sld function flat"], 
     84              ["thick_inter_1",       "Ang",         50.0, [-inf, inf], "", "intern layer thickness"], 
     85              ["thick_inter_2",       "Ang",         50.0, [-inf, inf], "", "intern layer thickness"], 
     86              ["thick_inter_3",       "Ang",         50.0, [-inf, inf], "", "intern layer thickness"], 
     87              ["thick_inter_4",       "Ang",         50.0, [-inf, inf], "", "intern layer thickness"], 
     88              ["thick_inter_5",       "Ang",         50.0, [-inf, inf], "", "intern layer thickness"], 
     89              ["thick_inter_6",       "Ang",         50.0, [-inf, inf], "", "intern layer thickness"], 
     90              ["thick_inter_7",       "Ang",         50.0, [-inf, inf], "", "intern layer thickness"], 
     91              ["thick_inter_8",       "Ang",         50.0, [-inf, inf], "", "intern layer thickness"], 
     92              ["thick_inter_9",       "Ang",         50.0, [-inf, inf], "", "intern layer thickness"], 
     93              ["thick_inter_10",       "Ang",         50.0, [-inf, inf], "", "intern layer thickness"], 
     94              ["thick_flat_1",       "Ang",         100.0, [-inf, inf], "", "flat layer_thickness"], 
     95              ["thick_flat_2",       "Ang",         100.0, [-inf, inf], "", "flat layer_thickness"], 
     96              ["thick_flat_3",       "Ang",         100.0, [-inf, inf], "", "flat layer_thickness"], 
     97              ["thick_flat_4",       "Ang",         100.0, [-inf, inf], "", "flat layer_thickness"], 
     98              ["thick_flat_5",       "Ang",         100.0, [-inf, inf], "", "flat layer_thickness"], 
     99              ["thick_flat_6",       "Ang",         100.0, [-inf, inf], "", "flat layer_thickness"], 
     100              ["thick_flat_7",       "Ang",         100.0, [-inf, inf], "", "flat layer_thickness"], 
     101              ["thick_flat_8",       "Ang",         100.0, [-inf, inf], "", "flat layer_thickness"], 
     102              ["thick_flat_9",       "Ang",         100.0, [-inf, inf], "", "flat layer_thickness"], 
     103              ["thick_flat_10",       "Ang",         100.0, [-inf, inf], "", "flat layer_thickness"], 
     104              ["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"], 
     105              ["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"], 
     106              ["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"], 
     107              ["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"], 
     108              ["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"], 
     109              ["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"], 
     110              ["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"], 
     111              ["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"], 
     112              ["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"], 
     113              ["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"], 
     114              ["nu_inter_1",       "",         2.5, [-inf, inf], "", "steepness parameter"], 
     115              ["nu_inter_2",       "",         2.5, [-inf, inf], "", "steepness parameter"], 
     116              ["nu_inter_3",       "",         2.5, [-inf, inf], "", "steepness parameter"], 
     117              ["nu_inter_4",       "",         2.5, [-inf, inf], "", "steepness parameter"], 
     118              ["nu_inter_5",       "",         2.5, [-inf, inf], "", "steepness parameter"], 
     119              ["nu_inter_6",       "",         2.5, [-inf, inf], "", "steepness parameter"], 
     120              ["nu_inter_7",       "",         2.5, [-inf, inf], "", "steepness parameter"], 
     121              ["nu_inter_8",       "",         2.5, [-inf, inf], "", "steepness parameter"], 
     122              ["nu_inter_9",       "",         2.5, [-inf, inf], "", "steepness parameter"], 
     123              ["nu_inter_10",       "",         2.5, [-inf, inf], "", "steepness parameter"], 
    69124              ["npts_inter",  "",         35, [0, inf], "", "number of points in each sublayer"], 
    70               ["sld_solv",     "1/Ang^2",    1E-6,[-inf, inf], "","sld function solvent"], 
    71               ["func_inter_0",       "",         3, [0, 4], "", "'Erf(|nu|*z)':0, 'RPower(z^|nu|)':1, 'LPower(z^|nu|)':2, 'RExp(-|nu|*z)':3, 'LExp(-|nu|*z)':4"], 
    72125              ["nu_inter_0",       "",         2.5, [-inf, inf], "", "steepness parameter"], 
    73               ["thick_inter_0",       "Ang",         50, [-inf, inf], "", "intern layer thickness"], 
    74               ["sld_core_0",       "1/Ang^2",         2.07E-6, [-inf, inf],"", "sld function flat"], 
    75126              ["rad_core_0",       "Ang",         50.0, [-inf, inf], "", "intern layer thickness"], 
    76               ["func_inter_1",       "",         3, [0, 4], "", "'Erf(|nu|*z)':0, 'RPower(z^|nu|)':1, 'LPower(z^|nu|)':2, 'RExp(-|nu|*z)':3, 'LExp(-|nu|*z)':4"], 
    77               ["nu_inter_1",       "",         2.5, [-inf, inf], "", "steepness parameter"], 
    78               ["thick_inter_1",       "Ang",         50.0, [-inf, inf], "", "intern layer thickness"], 
    79               ["sld_flat_1",       "1/Ang^2",         4.06E-6, [-inf, inf],"", "sld function flat"], 
    80               ["thick_flat_1",       "Ang",         100.0, [-inf, inf], "", "flat layer_thickness"], 
    81               ["func_inter_2",       "",         3, [0, 4], "", "'Erf(|nu|*z)':0, 'RPower(z^|nu|)':1, 'LPower(z^|nu|)':2, 'RExp(-|nu|*z)':3, 'LExp(-|nu|*z)':4"], 
    82               ["nu_inter_2",       "",         2.5, [-inf, inf], "", "steepness parameter"], 
    83               ["thick_inter_2",       "Ang",         50.0, [-inf, inf], "", "intern layer thickness"], 
    84               ["sld_flat_2",       "1/Ang^2",         3.56E-6, [-inf, inf],"", "sld function flat"], 
    85               ["thick_flat_2",       "Ang",         100.0, [-inf, inf], "", "flat layer_thickness"], 
    86               ["func_inter_3",       "",         3, [0, 4], "", "'Erf(|nu|*z)':0, 'RPower(z^|nu|)':1, 'LPower(z^|nu|)':2, 'RExp(-|nu|*z)':3, 'LExp(-|nu|*z)':4"], 
    87               ["nu_inter_3",       "",         2.5, [-inf, inf], "", "steepness parameter"], 
    88               ["thick_inter_3",       "Ang",         50.0, [-inf, inf], "", "intern layer thickness"], 
    89               ["sld_flat_3",       "1/Ang^2",         4.06E-6, [-inf, inf],"", "sld function flat"], 
    90               ["thick_flat_3",       "Ang",         100.0, [-inf, inf], "", "flat layer_thickness"], 
    91               ["func_inter_4",       "",         3, [0, 4], "", "'Erf(|nu|*z)':0, 'RPower(z^|nu|)':1, 'LPower(z^|nu|)':2, 'RExp(-|nu|*z)':3, 'LExp(-|nu|*z)':4"], 
    92               ["nu_inter_4",       "",         2.5, [-inf, inf], "", "steepness parameter"], 
    93               ["thick_inter_4",       "Ang",         50.0, [-inf, inf], "", "intern layer thickness"], 
    94               ["sld_flat_4",       "1/Ang^2",         3.5E-6, [-inf, inf],"", "sld function flat"], 
    95               ["thick_flat_4",       "Ang",         100.0, [-inf, inf], "", "flat layer_thickness"], 
    96               ["func_inter_5",       "",         3, [0, 4], "", "'Erf(|nu|*z)':0, 'RPower(z^|nu|)':1, 'LPower(z^|nu|)':2, 'RExp(-|nu|*z)':3, 'LExp(-|nu|*z)':4"], 
    97               ["nu_inter_5",       "",         2.5, [-inf, inf], "", "steepness parameter"], 
    98               ["thick_inter_5",       "Ang",         50.0, [-inf, inf], "", "intern layer thickness"], 
    99               ["sld_flat_5",       "1/Ang^2",         4.06E-6, [-inf, inf],"", "sld function flat"], 
    100               ["thick_flat_5",       "Ang",         100.0, [-inf, inf], "", "flat layer_thickness"], 
    101               ["func_inter_6",       "",         3, [0, 4], "", "'Erf(|nu|*z)':0, 'RPower(z^|nu|)':1, 'LPower(z^|nu|)':2, 'RExp(-|nu|*z)':3, 'LExp(-|nu|*z)':4"], 
    102               ["nu_inter_6",       "",         2.5, [-inf, inf], "", "steepness parameter"], 
    103               ["thick_inter_6",       "Ang",         50.0, [-inf, inf], "", "intern layer thickness"], 
    104               ["sld_flat_6",       "1/Ang^2",         3.5E-6, [-inf, inf],"", "sld function flat"], 
    105               ["thick_flat_6",       "Ang",         100.0, [-inf, inf], "", "flat layer_thickness"], 
    106               ["func_inter_7",       "",         3, [0, 4], "", "'Erf(|nu|*z)':0, 'RPower(z^|nu|)':1, 'LPower(z^|nu|)':2, 'RExp(-|nu|*z)':3, 'LExp(-|nu|*z)':4"], 
    107               ["nu_inter_7",       "",         2.5, [-inf, inf], "", "steepness parameter"], 
    108               ["thick_inter_7",       "Ang",         50.0, [-inf, inf], "", "intern layer thickness"], 
    109               ["sld_flat_7",       "1/Ang^2",         4.06E-6, [-inf, inf],"", "sld function flat"], 
    110               ["thick_flat_7",       "Ang",         100.0, [-inf, inf], "", "flat layer_thickness"], 
    111               ["func_inter_8",       "",         3, [0, 4], "", "'Erf(|nu|*z)':0, 'RPower(z^|nu|)':1, 'LPower(z^|nu|)':2, 'RExp(-|nu|*z)':3, 'LExp(-|nu|*z)':4"], 
    112               ["nu_inter_8",       "",         2.5, [-inf, inf], "", "steepness parameter"], 
    113               ["thick_inter_8",       "Ang",         50.0, [-inf, inf], "", "intern layer thickness"], 
    114               ["sld_flat_8",       "1/Ang^2",         3.5E-6, [-inf, inf],"", "sld function flat"], 
    115               ["thick_flat_8",       "Ang",         100.0, [-inf, inf], "", "flat layer_thickness"], 
    116               ["func_inter_9",       "",         3, [0, 4], "", "'Erf(|nu|*z)':0, 'RPower(z^|nu|)':1, 'LPower(z^|nu|)':2, 'RExp(-|nu|*z)':3, 'LExp(-|nu|*z)':4"], 
    117               ["nu_inter_9",       "",         2.5, [-inf, inf], "", "steepness parameter"], 
    118               ["thick_inter_9",       "Ang",         50.0, [-inf, inf], "", "intern layer thickness"], 
    119               ["sld_flat_9",       "1/Ang^2",         4.06E-6, [-inf, inf],"", "sld function flat"], 
    120               ["thick_flat_9",       "Ang",         100.0, [-inf, inf], "", "flat layer_thickness"], 
    121               ["func_inter_10",       "",         3, [0, 4], "", "'Erf(|nu|*z)':0, 'RPower(z^|nu|)':1, 'LPower(z^|nu|)':2, 'RExp(-|nu|*z)':3, 'LExp(-|nu|*z)':4"], 
    122               ["nu_inter_10",       "",         2.5, [-inf, inf], "", "steepness parameter"], 
    123               ["thick_inter_10",       "Ang",         50.0, [-inf, inf], "", "intern layer thickness"], 
    124               ["sld_flat_10",       "1/Ang^2",         3.5E-6, [-inf, inf],"", "sld function flat"], 
    125               ["thick_flat_10",       "Ang",         100.0, [-inf, inf], "", "flat layer_thickness"], 
    126127              ] 
    127128# pylint: enable=bad-whitespace, line-too-long 
     
    159160        return radius 
    160161 
    161  
    162162demo = dict(scale=1, background=0.0, 
    163         n_shells=1, 
     163        n_shells=10, 
    164164        sld_solv=1E-6, 
    165165        npts_inter=35, 
    166         func_inter_0=3, 
     166        func_inter_0=0, 
    167167        nu_inter_0=2.5, 
    168168        rad_core_0=50.0, 
    169169        sld_core_0=2.07E-6, 
    170170        thick_inter_0=50, 
    171         func_inter_1=3, 
     171        func_inter_1=0, 
    172172        nu_inter_1=2.5, 
    173173        thick_inter_1=50, 
    174174        sld_flat_1=4E-6, 
    175175        thick_flat_1=100, 
    176         func_inter_2=3, 
     176        func_inter_2=0, 
    177177        nu_inter_2=2.5, 
    178178        thick_inter_2=50, 
    179179        sld_flat_2=3.5E-6, 
    180180        thick_flat_2=100, 
    181         func_inter_3=3, 
     181        func_inter_3=0, 
    182182        nu_inter_3=2.5, 
    183183        thick_inter_3=50, 
    184184        sld_flat_3=4E-6, 
    185185        thick_flat_3=100, 
    186         func_inter_4=3, 
     186        func_inter_4=0, 
    187187        nu_inter_4=2.5, 
    188188        thick_inter_4=50, 
    189189        sld_flat_4=3.5E-6, 
    190190        thick_flat_4=100, 
    191         func_inter_5=3, 
     191        func_inter_5=0, 
    192192        nu_inter_5=2.5, 
    193193        thick_inter_5=50, 
    194         sld_flat_5=3.5E-6, 
     194        sld_flat_5=4E-6, 
    195195        thick_flat_5=100, 
    196         func_inter_6=3, 
     196        func_inter_6=0, 
    197197        nu_inter_6=2.5, 
    198198        thick_inter_6=50, 
    199199        sld_flat_6=3.5E-6, 
    200200        thick_flat_6=100, 
    201         func_inter_7=3, 
     201        func_inter_7=0, 
    202202        nu_inter_7=2.5, 
    203203        thick_inter_7=50, 
    204204        sld_flat_7=4E-6, 
    205205        thick_flat_7=100, 
    206         func_inter_8=3, 
     206        func_inter_8=0, 
    207207        nu_inter_8=2.5, 
    208208        thick_inter_8=50, 
    209209        sld_flat_8=3.5E-6, 
    210210        thick_flat_8=100, 
    211         func_inter_9=3, 
     211        func_inter_9=0, 
    212212        nu_inter_9=2.5, 
    213213        thick_inter_9=50, 
    214214        sld_flat_9=4E-6, 
    215215        thick_flat_9=100, 
    216         func_inter_10=3, 
     216        func_inter_10=0, 
    217217        nu_inter_10=2.5, 
    218218        thick_inter_10=50, 
     
    221221        ) 
    222222 
    223 oldname = "SphericalSLDModel" 
     223oldname = "SphereSLDModel" 
    224224oldpars = dict( 
    225225        scale="scale", 
    226226        background="background", 
    227         rad_core_0 ="rad_core0", 
    228         thick_inter_0 = "thick_inter0", 
    229         nu_inter_0 = "nu_inter0", 
    230         func_inter_0 = "func_inter0", 
    231         thick_inter_1 = "thick_inter1", 
    232         nu_inter_1 = "nu_inter1", 
    233         func_inter_1 = "func_inter1") 
    234  
    235         # n_shells="n_shells", 
    236         # npts_inter='npts_inter', 
    237         # sld_solv='sld_solv', 
    238         # func_inter_0='func_inter0', 
    239         # nu_inter_0='nu_inter0', 
    240         # rad_core_0='rad_core0', 
    241         # sld_core_0='sld_core0', 
    242         # thick_inter_0='thick_inter0', 
    243         # func_inter_1='func_inter1', 
    244         # nu_inter_1='nu_inter1', 
    245         # thick_inter_1='thick_inter1', 
    246         # sld_flat_1='sld_flat1', 
    247         # thick_flat_1='thick_flat1', 
    248         # func_inter_2='func_inter2', 
    249         # nu_inter_2='nu_inter2', 
    250         # thick_inter_2='thick_inter2', 
    251         # sld_flat_2='sld_flat2', 
    252         # thick_flat_2='thick_flat2', 
    253         # func_inter_3='func_inter3', 
    254         # nu_inter_3='nu_inter3', 
    255         # thick_inter_3='thick_inter3', 
    256         # sld_flat_3='sld_flat3', 
    257         # thick_flat_3='thick_flat3', 
    258         # func_inter_4='func_inter4', 
    259         # nu_inter_4='nu_inter4', 
    260         # thick_inter_4='thick_inter4', 
    261         # sld_flat_4='sld_flat4', 
    262         # thick_flat_4='thick_flat4', 
    263         # func_inter_5='func_inter5', 
    264         # nu_inter_5='nu_inter5', 
    265         # thick_inter_5='thick_inter5', 
    266         # sld_flat_5='sld_flat5', 
    267         # thick_flat_5='thick_flat5', 
    268         # func_inter_6='func_inter6', 
    269         # nu_inter_6='nu_inter6', 
    270         # thick_inter_6='thick_inter6', 
    271         # sld_flat_6='sld_flat6', 
    272         # thick_flat_6='thick_flat6', 
    273         # func_inter_7='func_inter7', 
    274         # nu_inter_7='nu_inter7', 
    275         # thick_inter_7='thick_inter7', 
    276         # sld_flat_7='sld_flat7', 
    277         # thick_flat_7='thick_flat7', 
    278         # func_inter_8='func_inter8', 
    279         # nu_inter_8='nu_inter8', 
    280         # thick_inter_8='thick_inter8', 
    281         # sld_flat_8='sld_flat8', 
    282         # thick_flat_8='thick_flat8', 
    283         # func_inter_9='func_inter9', 
    284         # nu_inter_9='nu_inter9', 
    285         # thick_inter_9='thick_inter9', 
    286         # sld_flat_9='sld_flat9', 
    287         # thick_flat_9='thick_flat9', 
    288         # func_inter_10='func_inter10', 
    289         # nu_inter_10='nu_inter10', 
    290         # thick_inter_10='thick_inter10', 
    291         # sld_flat_10='sld_flat10', 
    292         # thick_flat_10='thick_flat10') 
     227        n_shells="n_shells", 
     228        npts_inter='npts_inter', 
     229        sld_solv='sld_solv', 
     230        func_inter_0='func_inter0', 
     231        nu_inter_0='nu_inter0', 
     232        rad_core_0='rad_core0', 
     233        sld_core_0='sld_core0', 
     234        thick_inter_0='thick_inter0', 
     235        func_inter_1='func_inter1', 
     236        nu_inter_1='nu_inter1', 
     237        thick_inter_1='thick_inter1', 
     238        sld_flat_1='sld_flat1', 
     239        thick_flat_1='thick_flat1', 
     240        func_inter_2='func_inter2', 
     241        nu_inter_2='nu_inter2', 
     242        thick_inter_2='thick_inter2', 
     243        sld_flat_2='sld_flat2', 
     244        thick_flat_2='thick_flat2', 
     245        func_inter_3='func_inter3', 
     246        nu_inter_3='nu_inter3', 
     247        thick_inter_3='thick_inter3', 
     248        sld_flat_3='sld_flat3', 
     249        thick_flat_3='thick_flat3', 
     250        func_inter_4='func_inter4', 
     251        nu_inter_4='nu_inter4', 
     252        thick_inter_4='thick_inter4', 
     253        sld_flat_4='sld_flat4', 
     254        thick_flat_4='thick_flat4', 
     255        func_inter_5='func_inter5', 
     256        nu_inter_5='nu_inter5', 
     257        thick_inter_5='thick_inter5', 
     258        sld_flat_5='sld_flat5', 
     259        thick_flat_5='thick_flat5', 
     260        func_inter_6='func_inter6', 
     261        nu_inter_6='nu_inter6', 
     262        thick_inter_6='thick_inter6', 
     263        sld_flat_6='sld_flat6', 
     264        thick_flat_6='thick_flat6', 
     265        func_inter_7='func_inter7', 
     266        nu_inter_7='nu_inter7', 
     267        thick_inter_7='thick_inter7', 
     268        sld_flat_7='sld_flat7', 
     269        thick_flat_7='thick_flat7', 
     270        func_inter_8='func_inter8', 
     271        nu_inter_8='nu_inter8', 
     272        thick_inter_8='thick_inter8', 
     273        sld_flat_8='sld_flat8', 
     274        thick_flat_8='thick_flat8', 
     275        func_inter_9='func_inter9', 
     276        nu_inter_9='nu_inter9', 
     277        thick_inter_9='thick_inter9', 
     278        sld_flat_9='sld_flat9', 
     279        thick_flat_9='thick_flat9', 
     280        func_inter_10='func_inter10', 
     281        nu_inter_10='nu_inter10', 
     282        thick_inter_10='thick_inter10', 
     283        sld_flat_10='sld_flat10', 
     284        thick_flat_10='thick_flat10') 
    293285 
    294286tests = [ 
Note: See TracChangeset for help on using the changeset viewer.