Changeset d1c4760 in sasmodels for sasmodels/models


Ignore:
Timestamp:
Mar 29, 2016 1:55:57 PM (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:
d0876c9d
Parents:
ce896fd (diff), 1448a6cd (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' into polydisp

Location:
sasmodels/models
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/_spherepy.py

    r49da079 rd7028dc  
    11r""" 
    2 For information about polarised and magnetic scattering, click here_. 
    3  
    4 .. _here: polar_mag_help.html 
     2For information about polarised and magnetic scattering, see  
     3the :doc:`magnetic help <../sasgui/perspectives/fitting/mag_help>` documentation. 
    54 
    65Definition 
  • sasmodels/models/fuzzy_sphere.py

    r0cc31e1 rd7028dc  
    11r""" 
    2 For information about polarised and magnetic scattering, click here_. 
    3  
    4 .. _here: polar_mag_help.html 
     2For information about polarised and magnetic scattering, see  
     3the :doc:`magnetic help <../sasgui/perspectives/fitting/mag_help>` documentation. 
    54 
    65Definition 
  • sasmodels/models/multilayer_vesicle.py

    rc6ca41e rd7028dc  
    2929    is used as the effective radius for *S(Q)* when $P(Q) * S(Q)$ is applied. 
    3030 
    31  
    32  
    33 For information about polarised and magnetic scattering, click here_. 
    34  
    35 .. _here: polar_mag_help.html 
     31For information about polarised and magnetic scattering, see  
     32the :doc:`magnetic help <../sasgui/perspectives/fitting/mag_help>` documentation. 
    3633 
    3734This code is based on the form factor calculations implemented in the NIST 
  • sasmodels/models/sphere.py

    r49da079 rd7028dc  
    11r""" 
    2 For information about polarised and magnetic scattering, click here_. 
    3  
    4 .. _here: polar_mag_help.html 
     2For information about polarised and magnetic scattering, see  
     3the :doc:`magnetic help <../sasgui/perspectives/fitting/mag_help>` documentation. 
    54 
    65Definition 
  • sasmodels/models/stacked_disks.py

    re664a11 r53215cf  
    100100J S Higgins and H C Benoit, *Polymers and Neutron Scattering*, Clarendon, Oxford, 1994 
    101101 
     102**Author:** NIST IGOR/DANSE **on:** pre 2010 
     103 
     104**Last Modified by:** Piotr Rozyczko **on:** February 18, 2016 
     105 
     106**Last Reviewed by:** Richard Heenan **on:** March 22, 2016 
    102107""" 
    103108 
     
    157162 
    158163tests = [ 
    159     # Accuracy tests based on content in test/utest_extra_models.py 
     164    # Accuracy tests based on content in test/utest_extra_models.py. 
     165    # Added 2 tests with n_stacked = 5 using SasView 3.1.2 - PDB 
    160166    [{'core_thick': 10.0, 
    161167      'layer_thick': 15.0, 
     
    171177      'background': 0.001, 
    172178     }, 0.001, 5075.12], 
     179 
     180    [{'core_thick': 10.0, 
     181      'layer_thick': 15.0, 
     182      'radius': 3000.0, 
     183      'n_stacking': 5.0, 
     184      'sigma_d': 0.0, 
     185      'sld_core': 4.0, 
     186      'sld_layer': -0.4, 
     187      'solvent_sd': 5.0, 
     188      'theta': 0.0, 
     189      'phi': 0.0, 
     190      'scale': 0.01, 
     191      'background': 0.001, 
     192     }, 0.001, 5065.12793824], 
     193 
     194    [{'core_thick': 10.0, 
     195      'layer_thick': 15.0, 
     196      'radius': 3000.0, 
     197      'n_stacking': 5.0, 
     198      'sigma_d': 0.0, 
     199      'sld_core': 4.0, 
     200      'sld_layer': -0.4, 
     201      'solvent_sd': 5.0, 
     202      'theta': 0.0, 
     203      'phi': 0.0, 
     204      'scale': 0.01, 
     205      'background': 0.001, 
     206     }, 0.164, 0.0127673597265], 
    173207 
    174208    [{'core_thick': 10.0, 
  • sasmodels/models/cylinder.c

    r26141cb re9b1663d  
    33double Iqxy(double qx, double qy, double sld, double solvent_sld, 
    44    double radius, double length, double theta, double phi); 
     5 
     6#define INVALID(v) (v.radius<0 || v.length<0) 
    57 
    68double form_volume(double radius, double length) 
     
    1517    double length) 
    1618{ 
    17     // TODO: return NaN if radius<0 or length<0? 
    1819    // precompute qr and qh to save time in the loop 
    1920    const double qr = q*radius; 
     
    4748    double phi) 
    4849{ 
    49     // TODO: return NaN if radius<0 or length<0? 
    5050    double sn, cn; // slots to hold sincos function output 
    5151 
  • sasmodels/models/gel_fit.c

    r30b4ddf r03cac08  
    1 double form_volume(void); 
    2  
    3 double Iq(double q, 
    4           double guinier_scale, 
    5           double lorentzian_scale, 
    6           double gyration_radius, 
    7           double fractal_exp, 
    8           double cor_length); 
    9  
    10 double Iqxy(double qx, double qy, 
    11           double guinier_scale, 
    12           double lorentzian_scale, 
    13           double gyration_radius, 
    14           double fractal_exp, 
    15           double cor_length); 
    16  
    17 static double _gel_fit_kernel(double q, 
     1static double Iq(double q, 
    182          double guinier_scale, 
    193          double lorentzian_scale, 
     
    248    // Lorentzian Term 
    259    ////////////////////////double a(x[i]*x[i]*zeta*zeta); 
    26     double lorentzian_term = q*q*cor_length*cor_length; 
     10    double lorentzian_term = square(q*cor_length); 
    2711    lorentzian_term = 1.0 + ((fractal_exp + 1.0)/3.0)*lorentzian_term; 
    2812    lorentzian_term = pow(lorentzian_term, (fractal_exp/2.0) ); 
     
    3014    // Exponential Term 
    3115    ////////////////////////double d(x[i]*x[i]*rg*rg); 
    32     double exp_term = q*q*gyration_radius*gyration_radius; 
     16    double exp_term = square(q*gyration_radius); 
    3317    exp_term = exp(-1.0*(exp_term/3.0)); 
    3418 
     
    3721    return result; 
    3822} 
    39 double form_volume(void){ 
    40     // Unused, so free to return garbage. 
    41     return NAN; 
    42 } 
    43  
    44 double Iq(double q, 
    45           double guinier_scale, 
    46           double lorentzian_scale, 
    47           double gyration_radius, 
    48           double fractal_exp, 
    49           double cor_length) 
    50 { 
    51     return _gel_fit_kernel(q, 
    52                           guinier_scale, 
    53                           lorentzian_scale, 
    54                           gyration_radius, 
    55                           fractal_exp, 
    56                           cor_length); 
    57 } 
    58  
    59 // Iqxy is never called since no orientation or magnetic parameters. 
    60 double Iqxy(double qx, double qy, 
    61           double guinier_scale, 
    62           double lorentzian_scale, 
    63           double gyration_radius, 
    64           double fractal_exp, 
    65           double cor_length) 
    66 { 
    67     double q = sqrt(qx*qx + qy*qy); 
    68     return _gel_fit_kernel(q, 
    69                           guinier_scale, 
    70                           lorentzian_scale, 
    71                           gyration_radius, 
    72                           fractal_exp, 
    73                           cor_length); 
    74 } 
    75  
  • sasmodels/models/lib/Si.c

    re7678b2 rba32cdd  
     1// integral of sin(x)/x Taylor series approximated to w/i 0.1% 
    12double Si(double x); 
    23 
    3 // integral of sin(x)/x Taylor series approximated to w/i 0.1% 
    44double Si(double x) 
    55{ 
  • sasmodels/models/lib/polevl.c

    r0b05c24 rba32cdd  
    5151*/ 
    5252 
    53 double polevl( double x, constant double *coef, int N ) { 
     53double polevl( double x, constant double *coef, int N ); 
     54double p1evl( double x, constant double *coef, int N ); 
     55 
     56 
     57double polevl( double x, constant double *coef, int N ) 
     58{ 
    5459 
    5560    int i = 0; 
     
    7075 */ 
    7176 
    72 double p1evl( double x, constant double *coef, int N ) { 
     77double p1evl( double x, constant double *coef, int N ) 
     78{ 
    7379    int i=0; 
    7480    double ans = x+coef[i]; 
  • sasmodels/models/lib/sas_J0.c

    ra776125 rba32cdd  
    4949Copyright 1984, 1987, 1989, 2000 by Stephen L. Moshier 
    5050*/ 
     51 
     52double sas_J0(double x); 
    5153 
    5254/* Note: all coefficients satisfy the relative error criterion 
     
    177179 }; 
    178180 
    179 double sas_J0(double x) { 
     181double sas_J0(double x) 
     182{ 
    180183 
    181184//Cephes single precission 
  • sasmodels/models/lib/sas_J1.c

    r19b9005 rba32cdd  
    3939Copyright 1984, 1987, 1989, 2000 by Stephen L. Moshier 
    4040*/ 
     41double sas_J1(double x); 
     42double sas_J1c(double x); 
    4143 
    4244constant double RPJ1[8] = { 
     
    135137    }; 
    136138 
    137 double sas_J1(double x) { 
     139double sas_J1(double x) 
     140{ 
    138141 
    139142//Cephes double pression function 
  • sasmodels/models/lib/sas_JN.c

    ra776125 rba32cdd  
    4747Copyright 1984, 1987, 2000 by Stephen L. Moshier 
    4848*/ 
    49  
    5049double sas_JN( int n, double x ); 
    5150 
    52 double sas_JN( int n, double x ) { 
     51double sas_JN( int n, double x ) 
     52{ 
    5353 
    5454    const double MACHEP = 1.11022302462515654042E-16; 
  • sasmodels/models/lib/sph_j1c.c

    re6f1410 rba32cdd  
    77* using double precision that are the source. 
    88*/ 
     9double sph_j1c(double q); 
    910 
    1011// The choice of the number of terms in the series and the cutoff value for 
     
    4344#endif 
    4445 
    45 double sph_j1c(double q); 
    4646double sph_j1c(double q) 
    4747{ 
  • sasmodels/models/lib/sphere_form.c

    rad90df9 rba32cdd  
    1 inline double 
    2 sphere_volume(double radius) 
     1double sphere_volume(double radius); 
     2double sphere_form(double q, double radius, double sld, double solvent_sld); 
     3 
     4double sphere_volume(double radius) 
    35{ 
    46    return M_4PI_3*cube(radius); 
    57} 
    68 
    7 inline double 
    8 sphere_form(double q, double radius, double sld, double solvent_sld) 
     9double sphere_form(double q, double radius, double sld, double solvent_sld) 
    910{ 
    1011    const double fq = sphere_volume(radius) * sph_j1c(q*radius); 
  • sasmodels/models/lib/wrc_cyl.c

    re7678b2 rba32cdd  
    22    Functions for WRC implementation of flexible cylinders 
    33*/ 
     4double Sk_WR(double q, double L, double b); 
     5 
     6 
    47static double 
    58AlphaSquare(double x) 
     
    363366} 
    364367 
    365 double Sk_WR(double q, double L, double b); 
    366368double Sk_WR(double q, double L, double b) 
    367369{ 
  • sasmodels/models/onion.c

    rfdb1487 rce896fd  
    44    double thickness, double A) 
    55{ 
    6   const double vol = 4.0/3.0 * M_PI * r * r * r; 
     6  const double vol = M_4PI_3 * cube(r); 
    77  const double qr = q * r; 
    88  const double alpha = A * r/thickness; 
     
    1919    double sinqr, cosqr; 
    2020    SINCOS(qr, sinqr, cosqr); 
    21     fun = -3.0( 
     21    fun = -3.0*( 
    2222            ((alphasq - qrsq)*sinqr/qr - 2.0*alpha*cosqr) / sumsq 
    2323                - (alpha*sinqr/qr - cosqr) 
     
    3232f_linear(double q, double r, double sld, double slope) 
    3333{ 
    34   const double vol = 4.0/3.0 * M_PI * r * r * r; 
     34  const double vol = M_4PI_3 * cube(r); 
    3535  const double qr = q * r; 
    3636  const double bes = sph_j1c(qr); 
     
    5252{ 
    5353  const double bes = sph_j1c(q * r); 
    54   const double vol = 4.0/3.0 * M_PI * r * r * r; 
     54  const double vol = M_4PI_3 * cube(r); 
    5555  return sld * vol * bes; 
    5656} 
     
    6464    r += thickness[i]; 
    6565  } 
    66   return 4.0/3.0 * M_PI * r * r * r; 
     66  return M_4PI_3*cube(r); 
    6767} 
    6868 
    6969static double 
    70 Iq(double q, double core_sld, double core_radius, double solvent_sld, 
    71     double n, double in_sld[], double out_sld[], double thickness[], 
     70Iq(double q, double sld_core, double core_radius, double sld_solvent, 
     71    double n, double sld_in[], double sld_out[], double thickness[], 
    7272    double A[]) 
    7373{ 
    7474  int i; 
    75   r = core_radius; 
    76   f = f_constant(q, r, core_sld); 
     75  double r = core_radius; 
     76  double f = f_constant(q, r, sld_core); 
    7777  for (i=0; i<n; i++){ 
    7878    const double r0 = r; 
     
    9292    } 
    9393  } 
    94   f -= f_constant(q, r, solvent_sld); 
    95   f2 = f * f * 1.0e-4; 
     94  f -= f_constant(q, r, sld_solvent); 
     95  const double f2 = f * f * 1.0e-4; 
    9696 
    9797  return f2; 
  • sasmodels/models/onion.py

    r6a8fdfe rce896fd  
    292292 
    293293#             ["name", "units", default, [lower, upper], "type","description"], 
    294 parameters = [["core_sld", "1e-6/Ang^2", 1.0, [-inf, inf], "", 
     294parameters = [["sld_core", "1e-6/Ang^2", 1.0, [-inf, inf], "", 
    295295               "Core scattering length density"], 
    296               ["core_radius", "Ang", 200., [0, inf], "", 
     296              ["core_radius", "Ang", 200., [0, inf], "volume", 
    297297               "Radius of the core"], 
    298               ["solvent_sld", "1e-6/Ang^2", 6.4, [-inf, inf], "", 
     298              ["sld_solvent", "1e-6/Ang^2", 6.4, [-inf, inf], "", 
    299299               "Solvent scattering length density"], 
    300300              ["n", "", 1, [0, 10], "volume", 
    301301               "number of shells"], 
    302               ["in_sld[n]", "1e-6/Ang^2", 1.7, [-inf, inf], "", 
     302              ["sld_in[n]", "1e-6/Ang^2", 1.7, [-inf, inf], "", 
    303303               "scattering length density at the inner radius of shell k"], 
    304               ["out_sld[n]", "1e-6/Ang^2", 2.0, [-inf, inf], "", 
     304              ["sld_out[n]", "1e-6/Ang^2", 2.0, [-inf, inf], "", 
    305305               "scattering length density at the outer radius of shell k"], 
    306306              ["thickness[n]", "Ang", 40., [0, inf], "volume", 
     
    310310              ] 
    311311 
    312 #source = ["lib/sph_j1c.c", "onion.c"] 
    313  
    314 def Iq(q, *args, **kw): 
    315     return q 
    316  
    317 def Iqxy(qx, *args, **kw): 
    318     return qx 
    319  
    320  
    321 def shape(core_sld, core_radius, solvent_sld, n, in_sld, out_sld, thickness, A): 
     312source = ["lib/sph_j1c.c", "onion.c"] 
     313 
     314#def Iq(q, *args, **kw): 
     315#    return q 
     316 
     317profile_axes = ['Radius (A)', 'SLD (1e-6/A^2)'] 
     318def profile(core_sld, core_radius, solvent_sld, n, in_sld, out_sld, thickness, A): 
    322319    """ 
    323320    SLD profile 
     
    373370 
    374371demo = { 
    375     "solvent_sld": 2.2, 
    376     "core_sld": 1.0, 
     372    "sld_solvent": 2.2, 
     373    "sld_core": 1.0, 
    377374    "core_radius": 100, 
    378375    "n": 4, 
    379     "in_sld": [0.5, 1.5, 0.9, 2.0], 
    380     "out_sld": [nan, 0.9, 1.2, 1.6], 
     376    "sld_in": [0.5, 1.5, 0.9, 2.0], 
     377    "sld_out": [nan, 0.9, 1.2, 1.6], 
    381378    "thickness": [50, 75, 150, 75], 
    382379    "A": [0, -1, 1e-4, 1], 
  • sasmodels/models/rpa.py

    raad336c re9b1663d  
    8686#   ["name", "units", default, [lower, upper], "type","description"], 
    8787parameters = [ 
    88     ["case_num", CASES, 0, [0, 10], "", "Component organization"], 
     88    ["case_num", "", 1, CASES, "", "Component organization"], 
    8989 
    90     ["Na", "", 1000.0, [1, inf], "", "Degree of polymerization"], 
    91     ["Phia", "", 0.25, [0, 1], "", "volume fraction"], 
    92     ["va", "mL/mol", 100.0, [0, inf], "", "specific volume"], 
    93     ["La", "fm", 10.0, [-inf, inf], "", "scattering length"], 
    94     ["ba", "Ang", 5.0, [0, inf], "", "segment length"], 
    95  
    96     ["Nb", "", 1000.0, [1, inf], "", "Degree of polymerization"], 
    97     ["Phib", "", 0.25, [0, 1], "", "volume fraction"], 
    98     ["vb", "mL/mol", 100.0, [0, inf], "", "specific volume"], 
    99     ["Lb", "fm", 10.0, [-inf, inf], "", "scattering length"], 
    100     ["bb", "Ang", 5.0, [0, inf], "", "segment length"], 
    101  
    102     ["Nc", "", 1000.0, [1, inf], "", "Degree of polymerization"], 
    103     ["Phic", "", 0.25, [0, 1], "", "volume fraction"], 
    104     ["vc", "mL/mol", 100.0, [0, inf], "", "specific volume"], 
    105     ["Lc", "fm", 10.0, [-inf, inf], "", "scattering length"], 
    106     ["bc", "Ang", 5.0, [0, inf], "", "segment length"], 
    107  
    108     ["Nd", "", 1000.0, [1, inf], "", "Degree of polymerization"], 
    109     ["Phid", "", 0.25, [0, 1], "", "volume fraction"], 
    110     ["vd", "mL/mol", 100.0, [0, inf], "", "specific volume"], 
    111     ["Ld", "fm", 10.0, [-inf, inf], "", "scattering length"], 
    112     ["bd", "Ang", 5.0, [0, inf], "", "segment length"], 
     90    ["N[4]", "", 1000.0, [1, inf], "", "Degree of polymerization"], 
     91    ["Phi[4]", "", 0.25, [0, 1], "", "volume fraction"], 
     92    ["v[4]", "mL/mol", 100.0, [0, inf], "", "specific volume"], 
     93    ["L[4]", "fm", 10.0, [-inf, inf], "", "scattering length"], 
     94    ["b[4]", "Ang", 5.0, [0, inf], "", "segment length"], 
    11395 
    11496    ["Kab", "", -0.0004, [-inf, inf], "", "Interaction parameter"], 
  • sasmodels/models/spherical_sld.py

    re42b0b9 rce896fd  
    163163title = "Sperical SLD intensity calculation" 
    164164description = """ 
    165             I(q) = 
    166                background = Incoherent background [1/cm] 
    167         """ 
     165    I(q) = 
     166    background = Incoherent background [1/cm] 
     167    """ 
    168168category = "sphere-based" 
    169169 
    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[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"], 
     172parameters = [["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              ["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_shells]",      "1e-6/Ang^2",     4.06,   [-inf, inf], "", "sld function flat"], 
     178              ["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"], 
    183183              ] 
    184184# pylint: enable=bad-whitespace, line-too-long 
     185 
    185186#source = ["lib/librefl.c",  "lib/sph_j1c.c", "spherical_sld.c"] 
    186  
    187187def Iq(q, *args, **kw): 
    188188    return q 
    189189 
    190 def Iqxy(qx, *args, **kw): 
    191     return qx 
    192  
    193  
    194190demo = dict( 
    195         n_shells=4, 
    196         scale=1.0, 
    197         solvent_sld=1.0, 
    198         background=0.0, 
    199         npts_inter=35.0, 
    200         func_inter_0=0, 
    201         nu_inter_0=2.5, 
    202         rad_core_0=50.0, 
    203         core0_sld=2.07, 
    204         thick_inter_0=50.0, 
    205         func_inter_1=0, 
    206         nu_inter_1=2.5, 
    207         thick_inter_1=50.0, 
    208         flat1_sld=4.0, 
    209         thick_flat_1=100.0, 
    210         func_inter_2=0, 
    211         nu_inter_2=2.5, 
    212         thick_inter_2=50.0, 
    213         flat2_sld=3.5, 
    214         thick_flat_2=100.0, 
    215         func_inter_3=0, 
    216         nu_inter_3=2.5, 
    217         thick_inter_3=50.0, 
    218         flat3_sld=4.0, 
    219         thick_flat_3=100.0, 
    220         func_inter_4=0, 
    221         nu_inter_4=2.5, 
    222         thick_inter_4=50.0, 
    223         flat4_sld=3.5, 
    224         thick_flat_4=100.0, 
    225         func_inter_5=0, 
    226         nu_inter_5=2.5, 
    227         thick_inter_5=50.0, 
    228         flat5_sld=4.0, 
    229         thick_flat_5=100.0, 
    230         func_inter_6=0, 
    231         nu_inter_6=2.5, 
    232         thick_inter_6=50.0, 
    233         flat6_sld=3.5, 
    234         thick_flat_6=100.0, 
    235         func_inter_7=0, 
    236         nu_inter_7=2.5, 
    237         thick_inter_7=50.0, 
    238         flat7_sld=4.0, 
    239         thick_flat_7=100.0, 
    240         func_inter_8=0, 
    241         nu_inter_8=2.5, 
    242         thick_inter_8=50.0, 
    243         flat8_sld=3.5, 
    244         thick_flat_8=100.0, 
    245         func_inter_9=0, 
    246         nu_inter_9=2.5, 
    247         thick_inter_9=50.0, 
    248         flat9_sld=4.0, 
    249         thick_flat_9=100.0, 
    250         func_inter_10=0, 
    251         nu_inter_10=2.5, 
    252         thick_inter_10=50.0, 
    253         flat10_sld=3.5, 
    254         thick_flat_10=100.0 
    255         ) 
     191    n_shells=4, 
     192    scale=1.0, 
     193    solvent_sld=1.0, 
     194    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 
     251    ) 
    256252 
    257253oldname = "SphereSLDModel" 
    258254oldpars = dict( 
    259         n_shells="n_shells", 
    260         scale="scale", 
    261         npts_inter='npts_inter', 
    262         solvent_sld='sld_solv', 
    263         func_inter_0='func_inter0', 
    264         nu_inter_0='nu_inter0', 
    265         background='background', 
    266         rad_core_0='rad_core0', 
    267         core0_sld='sld_core0', 
    268         thick_inter_0='thick_inter0', 
    269         func_inter_1='func_inter1', 
    270         nu_inter_1='nu_inter1', 
    271         thick_inter_1='thick_inter1', 
    272         flat1_sld='sld_flat1', 
    273         thick_flat_1='thick_flat1', 
    274         func_inter_2='func_inter2', 
    275         nu_inter_2='nu_inter2', 
    276         thick_inter_2='thick_inter2', 
    277         flat2_sld='sld_flat2', 
    278         thick_flat_2='thick_flat2', 
    279         func_inter_3='func_inter3', 
    280         nu_inter_3='nu_inter3', 
    281         thick_inter_3='thick_inter3', 
    282         flat3_sld='sld_flat3', 
    283         thick_flat_3='thick_flat3', 
    284         func_inter_4='func_inter4', 
    285         nu_inter_4='nu_inter4', 
    286         thick_inter_4='thick_inter4', 
    287         flat4_sld='sld_flat4', 
    288         thick_flat_4='thick_flat4', 
    289         func_inter_5='func_inter5', 
    290         nu_inter_5='nu_inter5', 
    291         thick_inter_5='thick_inter5', 
    292         flat5_sld='sld_flat5', 
    293         thick_flat_5='thick_flat5', 
    294         func_inter_6='func_inter6', 
    295         nu_inter_6='nu_inter6', 
    296         thick_inter_6='thick_inter6', 
    297         flat6_sld='sld_flat6', 
    298         thick_flat_6='thick_flat6', 
    299         func_inter_7='func_inter7', 
    300         nu_inter_7='nu_inter7', 
    301         thick_inter_7='thick_inter7', 
    302         flat7_sld='sld_flat7', 
    303         thick_flat_7='thick_flat7', 
    304         func_inter_8='func_inter8', 
    305         nu_inter_8='nu_inter8', 
    306         thick_inter_8='thick_inter8', 
    307         flat8_sld='sld_flat8', 
    308         thick_flat_8='thick_flat8', 
    309         func_inter_9='func_inter9', 
    310         nu_inter_9='nu_inter9', 
    311         thick_inter_9='thick_inter9', 
    312         flat9_sld='sld_flat9', 
    313         thick_flat_9='thick_flat9', 
    314         func_inter_10='func_inter10', 
    315         nu_inter_10='nu_inter10', 
    316         thick_inter_10='thick_inter10', 
    317         flat10_sld='sld_flat10', 
    318         thick_flat_10='thick_flat10') 
     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') 
    319316 
    320317#TODO: Not working yet 
Note: See TracChangeset for help on using the changeset viewer.