Changeset f10063e in sasview for sansmodels/src/sans


Ignore:
Timestamp:
Mar 30, 2010 7:56:04 PM (15 years ago)
Author:
Jae Cho <jhjcho@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
8d97277
Parents:
6e93a02
Message:

Updated the definition of SLD params according to new libigor functions

Location:
sansmodels/src/sans/models
Files:
46 edited

Legend:

Unmodified
Added
Removed
  • sansmodels/src/sans/models/CoreShellEllipsoidModel.py

    rf9a1279 rf10063e  
    3737         equat_shell     = 250.0 [A] 
    3838         polar_shell     = 30.0 [A] 
    39          contrast        = 1e-006 [1/A^(2)] 
     39         sld_core        = 2e-006 [1/A^(2)] 
     40         sld_shell       = 1e-006 [1/A^(2)] 
    4041         sld_solvent     = 6.3e-006 [1/A^(2)] 
    4142         background      = 0.001 [1/cm] 
     
    6667                equat_shell = equatorial radius of shell, 
    6768                polar_shell = polar radius (revolution axis) of shell, 
    68                 contrast = SLD_core - SLD_shell 
     69                sld_core = SLD_core 
     70                sld_shell = SLD_shell 
    6971                sld_solvent = SLD_solvent 
    7072                background = Incoherent bkg 
     
    8284        self.details['equat_shell'] = ['[A]', None, None] 
    8385        self.details['polar_shell'] = ['[A]', None, None] 
    84         self.details['contrast'] = ['[1/A^(2)]', None, None] 
     86        self.details['sld_core'] = ['[1/A^(2)]', None, None] 
     87        self.details['sld_shell'] = ['[1/A^(2)]', None, None] 
    8588        self.details['sld_solvent'] = ['[1/A^(2)]', None, None] 
    8689        self.details['background'] = ['[1/cm]', None, None] 
  • sansmodels/src/sans/models/CylinderModel.py

    rf9a1279 rf10063e  
    3535         radius          = 20.0 [A] 
    3636         length          = 400.0 [A] 
    37          contrast        = 3e-006 [1/A^(2)] 
     37         sldCyl          = 4e-006 [1/A^(2)] 
     38         sldSolv         = 1e-006 [1/A^(2)] 
    3839         background      = 0.0 [1/cm] 
    3940         cyl_theta       = 1.0 [rad] 
     
    5253        self.name = "CylinderModel" 
    5354        ## Model description 
    54         self.description =""" f(q)= 2*(scatter_sld - solvent_sld)*V*sin(qLcos(alpha/2)) 
     55        self.description =""" f(q)= 2*(sldCyl - sldSolv)*V*sin(qLcos(alpha/2)) 
    5556                /[qLcos(alpha/2)]*J1(qRsin(alpha/2))/[qRsin(alpha)] 
    5657                 
     
    7172        self.details['radius'] = ['[A]', None, None] 
    7273        self.details['length'] = ['[A]', None, None] 
    73         self.details['contrast'] = ['[1/A^(2)]', None, None] 
     74        self.details['sldCyl'] = ['[1/A^(2)]', None, None] 
     75        self.details['sldSolv'] = ['[1/A^(2)]', None, None] 
    7476        self.details['background'] = ['[1/cm]', None, None] 
    7577        self.details['cyl_theta'] = ['[rad]', None, None] 
  • sansmodels/src/sans/models/EllipsoidModel.py

    rf9a1279 rf10063e  
    3535         radius_a        = 20.0 [A] 
    3636         radius_b        = 400.0 [A] 
    37          contrast        = 3e-006 [1/A^(2)] 
     37         sldEll          = 4e-006 [1/A^(2)] 
     38         sldSolv         = 1e-006 [1/A^(2)] 
    3839         background      = 0.0 [1/cm] 
    3940         axis_theta      = 1.57 [rad] 
     
    5253        self.name = "EllipsoidModel" 
    5354        ## Model description 
    54         self.description =""""P(q.alpha)= scale*f(q)^(2)+ bkg, where f(q)= 3*(scatter_sld 
    55                 - scatter_solvent)*V*[sin(q*r(Ra,Rb,alpha)) 
     55        self.description =""""P(q.alpha)= scale*f(q)^(2)+ bkg, where f(q)= 3*(sld_ell 
     56                - sld_solvent)*V*[sin(q*r(Ra,Rb,alpha)) 
    5657                -q*r*cos(qr(Ra,Rb,alpha))] 
    5758                /[qr(Ra,Rb,alpha)]^(3)" 
     
    6263                scatter_sld: SLD of the scatter 
    6364                solvent_sld: SLD of the solvent 
    64                 contrast: SLD difference between scatter 
    65                 and solvent 
     65                sldEll: SLD of ellipsoid 
     66                sldSolv: SLD of solvent 
    6667                V: volune of the Eliipsoid 
    6768                Ra: radius along the rotation axis 
     
    7576        self.details['radius_a'] = ['[A]', None, None] 
    7677        self.details['radius_b'] = ['[A]', None, None] 
    77         self.details['contrast'] = ['[1/A^(2)]', None, None] 
     78        self.details['sldEll'] = ['[1/A^(2)]', None, None] 
     79        self.details['sldSolv'] = ['[1/A^(2)]', None, None] 
    7880        self.details['background'] = ['[1/cm]', None, None] 
    7981        self.details['axis_theta'] = ['[rad]', None, None] 
  • sansmodels/src/sans/models/EllipticalCylinderModel.py

    rf9a1279 rf10063e  
    3636         r_ratio         = 1.5  
    3737         length          = 400.0 [A] 
    38          contrast        = 3e-006 [1/A^(2)] 
     38         sldCyl          = 4e-006 [1/A^(2)] 
     39         sldSolv         = 1e-006 [1/A^(2)] 
    3940         background      = 0.0 [1/cm] 
    4041         cyl_theta       = 1.57 [rad] 
     
    5758                r_ratio = the ratio of (r_major /r_minor >= 1) 
    5859                length = the length of the cylinder 
    59                 contrast = SLD of solvent - SLD of the cylinder 
     60                sldCyl = SLD of the cylinder 
     61                sldSolv = SLD of solvent - 
    6062                background = incoherent background""" 
    6163        
     
    6668        self.details['r_ratio'] = ['', None, None] 
    6769        self.details['length'] = ['[A]', None, None] 
    68         self.details['contrast'] = ['[1/A^(2)]', None, None] 
     70        self.details['sldCyl'] = ['[1/A^(2)]', None, None] 
     71        self.details['sldSolv'] = ['[1/A^(2)]', None, None] 
    6972        self.details['background'] = ['[1/cm]', None, None] 
    7073        self.details['cyl_theta'] = ['[rad]', None, None] 
  • sansmodels/src/sans/models/FlexibleCylinderModel.py

    rf9a1279 rf10063e  
    3636         kuhn_length     = 100.0 [A] 
    3737         radius          = 20.0 [A] 
    38          contrast        = 5.3e-006 [1/A^(2)] 
     38         sldCyl          = 6.3e-006 [1/A^(2)] 
     39         sldSolv         = 1e-006 [1/A^(2)] 
    3940         background      = 0.0001 [1/cm] 
    4041 
     
    6263        self.details['kuhn_length'] = ['[A]', None, None] 
    6364        self.details['radius'] = ['[A]', None, None] 
    64         self.details['contrast'] = ['[1/A^(2)]', None, None] 
     65        self.details['sldCyl'] = ['[1/A^(2)]', None, None] 
     66        self.details['sldSolv'] = ['[1/A^(2)]', None, None] 
    6567        self.details['background'] = ['[1/cm]', None, None] 
    6668 
  • sansmodels/src/sans/models/HollowCylinderModel.py

    rf9a1279 rf10063e  
    3636         radius          = 30.0 [A] 
    3737         length          = 400.0 [A] 
    38          contrast        = 5.3e-006 [1/A^(2)] 
     38         sldCyl          = 6.3e-006 [1/A^(2)] 
     39         sldSolv         = 1e-006 [1/A^(2)] 
    3940         background      = 0.01 [1/cm] 
    4041         axis_theta      = 1.57 [rad] 
     
    5758                radius = the radius of shell 
    5859                length = the total length of the cylinder 
    59                 contrast = SLD of solvent - SLD of shell 
     60                sldCyl = SLD of the shell 
     61                sldSolv = SLD of the solvent 
    6062                background = incoherent background""" 
    6163        
     
    6668        self.details['radius'] = ['[A]', None, None] 
    6769        self.details['length'] = ['[A]', None, None] 
    68         self.details['contrast'] = ['[1/A^(2)]', None, None] 
     70        self.details['sldCyl'] = ['[1/A^(2)]', None, None] 
     71        self.details['sldSolv'] = ['[1/A^(2)]', None, None] 
    6972        self.details['background'] = ['[1/cm]', None, None] 
    7073        self.details['axis_theta'] = ['[rad]', None, None] 
  • sansmodels/src/sans/models/LamellarPSModel.py

    rf9a1279 rf10063e  
    3535         spacing         = 400.0 [A] 
    3636         delta           = 30.0 [A] 
    37          contrast        = 5.3e-006 [1/A^(2)] 
     37         sld_bi          = 6.3e-006 [1/A^(2)] 
     38         sld_sol         = 1e-006 [1/A^(2)] 
    3839         n_plates        = 20.0  
    3940         caille          = 0.1  
     
    6566                *Parameters: spacing = repeat spacing, 
    6667                delta = bilayer thickness, 
    67                 contrast = SLD_solvent - SLD_bilayer 
     68                sld_bi = SLD_bilayer 
     69                sld_sol = SLD_solvent 
    6870                n_plate = # of Lamellar plates 
    6971                caille = Caille parameter (<0.8 or <1) 
     
    7678        self.details['spacing'] = ['[A]', None, None] 
    7779        self.details['delta'] = ['[A]', None, None] 
    78         self.details['contrast'] = ['[1/A^(2)]', None, None] 
     80        self.details['sld_bi'] = ['[1/A^(2)]', None, None] 
     81        self.details['sld_sol'] = ['[1/A^(2)]', None, None] 
    7982        self.details['n_plates'] = ['', None, None] 
    8083        self.details['caille'] = ['', None, None] 
  • sansmodels/src/sans/models/ParallelepipedModel.py

    rf9a1279 rf10063e  
    3636         short_b         = 75.0 [A] 
    3737         long_c          = 400.0 [A] 
    38          contrast        = 5.3e-006 [1/A^(2)] 
     38         sldPipe         = 6.3e-006 [1/A^(2)] 
     39         sldSolv         = 1e-006 [1/A^(2)] 
    3940         background      = 0.0 [1/cm] 
    4041         parallel_theta  = 0.0 [rad] 
     
    6061                short_b: length of another short edge [A] 
    6162                long_c: length of long edge  of the parallelepiped [A] 
    62                 contrast: particle_sld - solvent_sld 
     63                sldPipe: Pipe_sld 
     64                sldSolv: solvent_sld 
    6365                background:Incoherent Background [1/cm]""" 
    6466        
     
    6971        self.details['short_b'] = ['[A]', None, None] 
    7072        self.details['long_c'] = ['[A]', None, None] 
    71         self.details['contrast'] = ['[1/A^(2)]', None, None] 
     73        self.details['sldPipe'] = ['[1/A^(2)]', None, None] 
     74        self.details['sldSolv'] = ['[1/A^(2)]', None, None] 
    7275        self.details['background'] = ['[1/cm]', None, None] 
    7376        self.details['parallel_theta'] = ['[rad]', None, None] 
  • sansmodels/src/sans/models/SphereModel.py

    rf9a1279 rf10063e  
    3434         scale           = 1.0  
    3535         radius          = 60.0 [A] 
    36          contrast        = 1e-006 [1/A^(2)] 
     36         sldSph          = 2e-006 [1/A^(2)] 
     37         sldSolv         = 1e-006 [1/A^(2)] 
    3738         background      = 0.0 [1/cm] 
    3839 
     
    4950        self.name = "SphereModel" 
    5051        ## Model description 
    51         self.description ="""P(q)=(scale/V)*[3V(scatter_sld-solvent_sld)*(sin(qR)-qRcos(qR)) 
     52        self.description ="""P(q)=(scale/V)*[3V(sldSph-sldSolv)*(sin(qR)-qRcos(qR)) 
    5253                /(qR)^3]^(2)+bkg 
    5354                 
    5455                bkg:background, R: radius of sphere 
    5556                V:The volume of the scatter 
    56                 contrast:SLD difference between 
    57                 scatter and solvent 
    58                 scatter_sld: the SLD of the scatter 
    59                 solvent_sld: the SLD of the solvent 
     57                sldSph: the SLD of the sphere 
     58                sldSolv: the SLD of the solvent 
    6059                """ 
    6160        
     
    6463        self.details['scale'] = ['', None, None] 
    6564        self.details['radius'] = ['[A]', None, None] 
    66         self.details['contrast'] = ['[1/A^(2)]', None, None] 
     65        self.details['sldSph'] = ['[1/A^(2)]', None, None] 
     66        self.details['sldSolv'] = ['[1/A^(2)]', None, None] 
    6767        self.details['background'] = ['[1/cm]', None, None] 
    6868 
  • sansmodels/src/sans/models/c_extensions/cylinder.c

    rae3ce4e rf10063e  
    1818 */ 
    1919double cylinder_analytical_1D(CylinderParameters *pars, double q) { 
    20         double dp[5]; 
    21          
     20        double dp[6]; 
     21 
    2222        // Fill paramater array 
    2323        dp[0] = pars->scale; 
    2424        dp[1] = pars->radius; 
    2525        dp[2] = pars->length; 
    26         dp[3] = pars->contrast; 
    27         dp[4] = pars->background; 
    28          
     26        dp[3] = pars->sldCyl; 
     27        dp[4] = pars->sldSolv; 
     28        dp[5] = pars->background; 
     29 
    2930        // Call library function to evaluate model 
    30         return CylinderForm(dp, q);      
     31        return CylinderForm(dp, q); 
    3132} 
    3233 
     
    4142        q = sqrt(qx*qx+qy*qy); 
    4243    return cylinder_analytical_2D_scaled(pars, q, qx/q, qy/q); 
    43 }  
     44} 
    4445 
    4546 
     
    5354double cylinder_analytical_2D(CylinderParameters *pars, double q, double phi) { 
    5455    return cylinder_analytical_2D_scaled(pars, q, cos(phi), sin(phi)); 
    55 }  
    56          
     56} 
     57 
    5758/** 
    5859 * Function to evaluate 2D scattering function 
     
    6869        double alpha, vol, cos_val; 
    6970        double answer; 
    70          
     71 
    7172    // Cylinder orientation 
    7273    cyl_x = sin(pars->cyl_theta) * cos(pars->cyl_phi); 
    7374    cyl_y = sin(pars->cyl_theta) * sin(pars->cyl_phi); 
    7475    cyl_z = cos(pars->cyl_theta); 
    75       
     76 
    7677    // q vector 
    7778    q_z = 0; 
    78          
     79 
    7980    // Compute the angle btw vector q and the 
    8081    // axis of the cylinder 
    8182    cos_val = cyl_x*q_x + cyl_y*q_y + cyl_z*q_z; 
    82      
     83 
    8384    // The following test should always pass 
    8485    if (fabs(cos_val)>1.0) { 
     
    8687        return 0; 
    8788    } 
    88      
     89 
    8990    // Note: cos(alpha) = 0 and 1 will get an 
    9091    // undefined value from CylKernel 
    9192        alpha = acos( cos_val ); 
    92          
     93 
    9394        // Call the IGOR library function to get the kernel 
    9495        answer = CylKernel(q, pars->radius, pars->length/2.0, alpha) / sin(alpha); 
    95          
     96 
    9697        // Multiply by contrast^2 
    97         answer *= pars->contrast*pars->contrast; 
    98          
     98        answer *= (pars->sldCyl - pars->sldSolv)*(pars->sldCyl - pars->sldSolv); 
     99 
    99100        //normalize by cylinder volume 
    100101        //NOTE that for this (Fournet) definition of the integral, one must MULTIPLY by Vcyl 
    101102    vol = acos(-1.0) * pars->radius * pars->radius * pars->length; 
    102103        answer *= vol; 
    103          
     104 
    104105        //convert to [cm-1] 
    105106        answer *= 1.0e8; 
    106          
     107 
    107108        //Scale 
    108109        answer *= pars->scale; 
    109          
     110 
    110111        // add in the background 
    111112        answer += pars->background; 
    112          
     113 
    113114        return answer; 
    114115} 
    115      
     116 
  • sansmodels/src/sans/models/c_extensions/cylinder.h

    r27972c1d rf10063e  
    44 * [PYTHONCLASS] = CylinderModel 
    55 * [DISP_PARAMS] = radius, length, cyl_theta, cyl_phi 
    6    [DESCRIPTION] = <text> f(q)= 2*(scatter_sld - solvent_sld)*V*sin(qLcos(alpha/2)) 
     6   [DESCRIPTION] = <text> f(q)= 2*(sldCyl - sldSolv)*V*sin(qLcos(alpha/2)) 
    77                                /[qLcos(alpha/2)]*J1(qRsin(alpha/2))/[qRsin(alpha)] 
    88 
     
    3434    double length; 
    3535    /// Contrast [1/A^(2)] 
    36     //  [DEFAULT]=contrast=3.0e-6 [1/A^(2)] 
    37     double contrast; 
     36    //  [DEFAULT]=sldCyl=4.0e-6 [1/A^(2)] 
     37    double sldCyl; 
     38    /// sldCyl [1/A^(2)] 
     39    //  [DEFAULT]=sldSolv=1.0e-6 [1/A^(2)] 
     40    double sldSolv; 
    3841        /// Incoherent Background [1/cm] 0.00 
    3942        //  [DEFAULT]=background=0.0 [1/cm] 
  • sansmodels/src/sans/models/c_extensions/ellipsoid.c

    rdf4702f rf10063e  
    4444 */ 
    4545double ellipsoid_analytical_1D(EllipsoidParameters *pars, double q) { 
    46         double dp[5]; 
     46        double dp[6]; 
    4747 
    4848        dp[0] = pars->scale; 
    4949        dp[1] = pars->radius_a; 
    5050        dp[2] = pars->radius_b; 
    51         dp[3] = pars->contrast; 
    52         dp[4] = pars->background; 
     51        dp[3] = pars->sldEll; 
     52        dp[4] = pars->sldSolv; 
     53        dp[5] = pars->background; 
    5354 
    5455        return EllipsoidForm(dp, q); 
     
    117118 
    118119        // Multiply by contrast^2 
    119         answer *= pars->contrast*pars->contrast; 
     120        answer *= (pars->sldEll - pars->sldSolv) * (pars->sldEll - pars->sldSolv); 
    120121 
    121122        //normalize by cylinder volume 
  • sansmodels/src/sans/models/c_extensions/ellipsoid.h

    r27972c1d rf10063e  
    99 //[PYTHONCLASS] = EllipsoidModel 
    1010 //[DISP_PARAMS] = radius_a, radius_b, axis_theta, axis_phi 
    11  //[DESCRIPTION] = <text>"P(q.alpha)= scale*f(q)^(2)+ bkg, where f(q)= 3*(scatter_sld 
    12  //             - scatter_solvent)*V*[sin(q*r(Ra,Rb,alpha)) 
     11 //[DESCRIPTION] = <text>"P(q.alpha)= scale*f(q)^(2)+ bkg, where f(q)= 3*(sld_ell 
     12 //             - sld_solvent)*V*[sin(q*r(Ra,Rb,alpha)) 
    1313 //             -q*r*cos(qr(Ra,Rb,alpha))] 
    1414 //             /[qr(Ra,Rb,alpha)]^(3)" 
     
    1919 //             scatter_sld: SLD of the scatter 
    2020 //             solvent_sld: SLD of the solvent 
    21  //     contrast: SLD difference between scatter 
    22  //             and solvent 
     21 //     sldEll: SLD of ellipsoid 
     22 //             sldSolv: SLD of solvent 
    2323 //             V: volune of the Eliipsoid 
    2424 //             Ra: radius along the rotation axis 
     
    4646    double radius_b; 
    4747 
    48     /// Contrast [1/A^(2)] 
    49     //  [DEFAULT]=contrast=3.0e-6 [1/A^(2)] 
    50     double contrast; 
     48    /// sldEll [1/A^(2)] 
     49    //  [DEFAULT]=sldEll=4.0e-6 [1/A^(2)] 
     50    double sldEll; 
     51 
     52    /// sld of solvent [1/A^(2)] 
     53    //  [DEFAULT]=sldSolv=1.0e-6 [1/A^(2)] 
     54    double sldSolv; 
    5155 
    5256        /// Incoherent Background [1/cm] 
  • sansmodels/src/sans/models/c_extensions/elliptical_cylinder.c

    r975ec8e rf10063e  
    1717 */ 
    1818double elliptical_cylinder_analytical_1D(EllipticalCylinderParameters *pars, double q) { 
    19         double dp[6]; 
     19        double dp[7]; 
    2020 
    2121        // Fill paramater array 
     
    2424        dp[2] = pars->r_ratio; 
    2525        dp[3] = pars->length; 
    26         dp[4] = pars->contrast; 
    27         dp[5] = pars->background; 
     26        dp[4] = pars->sldCyl; 
     27        dp[5] = pars->sldSolv; 
     28        dp[6] = pars->background; 
    2829 
    2930        // Call library function to evaluate model 
     
    145146 
    146147        // Multiply by contrast^2 
    147         answer *= pars->contrast*pars->contrast; 
     148        answer *= (pars->sldCyl - pars->sldSolv) * (pars->sldCyl - pars->sldSolv); 
    148149 
    149150        //normalize by cylinder volume 
  • sansmodels/src/sans/models/c_extensions/elliptical_cylinder.h

    r27972c1d rf10063e  
    88r_ratio = the ratio of (r_major /r_minor >= 1) 
    99length = the length of the cylinder 
    10 contrast = SLD of solvent - SLD of the cylinder 
     10sldCyl = SLD of the cylinder 
     11sldSolv = SLD of solvent - 
    1112background = incoherent background 
    1213  *</text> 
     
    3132    //  [DEFAULT]=length=400.0 [A] 
    3233    double length; 
    33     /// Contrast [1/A^(2)] 
    34     //  [DEFAULT]=contrast=3.0e-6 [1/A^(2)] 
    35     double contrast; 
     34    /// SLD of cylinder [1/A^(2)] 
     35    //  [DEFAULT]=sldCyl=4.0e-6 [1/A^(2)] 
     36    double sldCyl; 
     37    /// SLD of solvent [1/A^(2)] 
     38    //  [DEFAULT]=sldSolv=1.0e-6 [1/A^(2)] 
     39    double sldSolv; 
    3640        /// Incoherent Background [1/cm] 0.000 
    3741        //  [DEFAULT]=background=0 [1/cm] 
  • sansmodels/src/sans/models/c_extensions/flexible_cylinder.c

    rea07075 rf10063e  
    1818 */ 
    1919double flexible_cylinder_analytical_1D(FlexibleCylinderParameters *pars, double q) { 
    20         double dp[6]; 
     20        double dp[7]; 
    2121 
    2222        // Fill paramater array 
     
    2525        dp[2] = pars->kuhn_length; 
    2626        dp[3] = pars->radius; 
    27         dp[4] = pars->contrast; 
    28         dp[5] = pars->background; 
     27        dp[4] = pars->sldCyl; 
     28        dp[5] = pars->sldSolv; 
     29        dp[6] = pars->background; 
    2930 
    3031        // Call library function to evaluate model 
  • sansmodels/src/sans/models/c_extensions/flexible_cylinder.h

    r27972c1d rf10063e  
    3131    //  [DEFAULT]=radius=20.0 [A] 
    3232    double radius; 
    33     /// Contrast [1/A^(2)] 
    34     //  [DEFAULT]=contrast=5.3e-6 [1/A^(2)] 
    35     double contrast; 
     33    /// SLD of cylinder [1/A^(2)] 
     34    //  [DEFAULT]=sldCyl=6.3e-6 [1/A^(2)] 
     35    double sldCyl; 
     36    /// SLD of solvent [1/A^(2)] 
     37    //  [DEFAULT]=sldSolv=1.0e-6 [1/A^(2)] 
     38    double sldSolv; 
    3639        /// Incoherent Background [1/cm] 
    3740        //  [DEFAULT]=background=0.0001 [1/cm] 
  • sansmodels/src/sans/models/c_extensions/hollow_cylinder.c

    re2afadf rf10063e  
    1717 */ 
    1818double hollow_cylinder_analytical_1D(HollowCylinderParameters *pars, double q) { 
    19         double dp[6]; 
     19        double dp[7]; 
    2020 
    2121        dp[0] = pars->scale; 
     
    2323        dp[2] = pars->radius; 
    2424        dp[3] = pars->length; 
    25         dp[4] = pars->contrast; 
    26         dp[5] = pars->background; 
     25        dp[4] = pars->sldCyl; 
     26        dp[5] = pars->sldSolv; 
     27        dp[6] = pars->background; 
    2728 
    2829        return HollowCylinder(dp, q); 
     
    8990        answer = HolCylKernel(q, pars->core_radius, pars->radius, pars->length, cos_val); 
    9091 
     92        // Multiply by contrast^2 
     93        answer *= (pars->sldCyl - pars->sldSolv)*(pars->sldCyl - pars->sldSolv); 
     94 
    9195        //normalize by cylinder volume 
    92         vol=acos(-1.0)*((pars->core_radius *pars->core_radius)-(pars->radius*pars->radius)) 
     96        vol=acos(-1.0)*((pars->radius*pars->radius)-(pars->core_radius *pars->core_radius)) 
    9397                        *(pars->length); 
    94         answer /= vol; 
     98        answer *= vol; 
    9599 
    96100        //convert to [cm-1] 
  • sansmodels/src/sans/models/c_extensions/hollow_cylinder.h

    r27972c1d rf10063e  
    1111 //                             radius = the radius of shell 
    1212 //                     length = the total length of the cylinder 
    13  //                             contrast = SLD of solvent - SLD of shell 
     13 //                             sldCyl = SLD of the shell 
     14 //                             sldSolv = SLD of the solvent 
    1415 //                             background = incoherent background 
    1516 //     </text> 
     
    3536    double length; 
    3637 
    37     /// Contrast  [1/A^(2)] 
    38     //  [DEFAULT]=contrast=5.3e-6 [1/A^(2)] 
    39     double contrast; 
     38    /// SLD_cylinder  [1/A^(2)] 
     39    //  [DEFAULT]=sldCyl=6.3e-6 [1/A^(2)] 
     40    double sldCyl; 
     41 
     42    /// SLD_solvent  [1/A^(2)] 
     43    //  [DEFAULT]=sldSolv=1.0e-6 [1/A^(2)] 
     44    double sldSolv; 
    4045 
    4146        /// Incoherent Background [1/cm] 
  • sansmodels/src/sans/models/c_extensions/lamellarPS.c

    rc1c29b6 rf10063e  
    1919LamellarPS_kernel(double dp[], double q) 
    2020{ 
    21         double scale,dd,del,contr,NN,Cp,bkg;            //local variables of coefficient wave 
     21        double scale,dd,del,sld_bi,sld_sol,contr,NN,Cp,bkg;             //local variables of coefficient wave 
    2222        double inten, qval,Pq,Sq,alpha,temp,t1,t2,t3,dQ; 
    2323        double Pi,Euler,dQDefault,fii; 
    2424        int ii,NNint; 
    2525        Euler = 0.5772156649;           // Euler's constant 
    26         dQDefault = 0.0;//0.0025;               //[=] 1/A, q-resolution, default value 
     26        dQDefault = 0.0;                //[=] 1/A, q-resolution, default value 
    2727        dQ = dQDefault; 
    2828 
     
    3333        dd = dp[1]; 
    3434        del = dp[2]; 
    35         contr = dp[3]; 
    36         NN = trunc(dp[4]);              //be sure that NN is an integer 
    37         Cp = dp[5]; 
    38         bkg = dp[6]; 
     35        sld_bi = dp[3]; 
     36        sld_sol = dp[4]; 
     37        NN = trunc(dp[5]);              //be sure that NN is an integer 
     38        Cp = dp[6]; 
     39        bkg = dp[7]; 
     40 
     41        contr = sld_bi - sld_sol; 
    3942 
    4043        Pq = 2.0*contr*contr/qval/qval*(1.0-cos(qval*del)); 
     
    7881 */ 
    7982double lamellarPS_analytical_1D(LamellarPSParameters *pars, double q) { 
    80         double dp[7]; 
     83        double dp[8]; 
    8184 
    8285        // Fill paramater array 
     
    8487        dp[1] = pars->spacing; 
    8588        dp[2] = pars->delta; 
    86         dp[3] = pars->contrast; 
    87         dp[4] = pars->n_plates; 
    88         dp[5] = pars->caille; 
    89         dp[6] = pars->background; 
     89        dp[3] = pars->sld_bi; 
     90        dp[4] = pars->sld_sol; 
     91        dp[5] = pars->n_plates; 
     92        dp[6] = pars->caille; 
     93        dp[7] = pars->background; 
    9094 
    9195        // Call library function to evaluate model 
  • sansmodels/src/sans/models/c_extensions/lamellarPS.h

    r27972c1d rf10063e  
    2121                *Parameters: spacing = repeat spacing, 
    2222                delta = bilayer thickness, 
    23                 contrast = SLD_solvent - SLD_bilayer 
     23                sld_bi = SLD_bilayer 
     24                sld_sol = SLD_solvent 
    2425                n_plate = # of Lamellar plates 
    2526                caille = Caille parameter (<0.8 or <1) 
     
    4142    //  [DEFAULT]=delta=30 [A] 
    4243    double delta; 
    43     /// Contrast [1/A^(2)] 
    44     //  [DEFAULT]=contrast=5.3e-6 [1/A^(2)] 
    45     double contrast; 
     44    /// SLD of bilayer [1/A^(2)] 
     45    //  [DEFAULT]=sld_bi=6.3e-6 [1/A^(2)] 
     46    double sld_bi; 
     47    /// SLD of solvent [1/A^(2)] 
     48    //  [DEFAULT]=sld_sol=1.0e-6 [1/A^(2)] 
     49    double sld_sol; 
    4650         /// Number of lamellar plates 
    4751    //  [DEFAULT]=n_plates=20 
  • sansmodels/src/sans/models/c_extensions/parallelepiped.c

    r8e36cdd rf10063e  
    1818 */ 
    1919double parallelepiped_analytical_1D(ParallelepipedParameters *pars, double q) { 
    20         double dp[6]; 
     20        double dp[7]; 
    2121 
    2222        // Fill paramater array 
     
    2525        dp[2] = pars->short_b; 
    2626        dp[3] = pars->long_c; 
    27         dp[4] = pars->contrast; 
    28         dp[5] = pars->background; 
     27        dp[4] = pars->sldPipe; 
     28        dp[5] = pars->sldSolv; 
     29        dp[6] = pars->background; 
    2930 
    3031        // Call library function to evaluate model 
     
    149150 
    150151        // Multiply by contrast^2 
    151         answer *= pars->contrast*pars->contrast; 
     152        answer *= (pars->sldPipe - pars->sldSolv) * (pars->sldPipe - pars->sldSolv); 
    152153 
    153154        //normalize by cylinder volume 
  • sansmodels/src/sans/models/c_extensions/parallelepiped.h

    r27972c1d rf10063e  
    1414                short_b: length of another short edge [A] 
    1515                long_c: length of long edge  of the parallelepiped [A] 
    16                 contrast: particle_sld - solvent_sld 
     16                sldPipe: Pipe_sld 
     17                sldSolv: solvent_sld 
    1718                background:Incoherent Background [1/cm] 
    1819                </text> 
     
    3536    //  [DEFAULT]=long_c=400 [A] 
    3637    double long_c; 
    37     /// Contrast [1/A^(2)] 
    38     //  [DEFAULT]=contrast=53e-7 [1/A^(2)] 
    39     double contrast; 
     38    /// SLD_Pipe [1/A^(2)] 
     39    //  [DEFAULT]=sldPipe=6.3e-6 [1/A^(2)] 
     40    double sldPipe; 
     41    /// sldSolv [1/A^(2)] 
     42    //  [DEFAULT]=sldSolv=1.0e-6 [1/A^(2)] 
     43    double sldSolv; 
    4044        /// Incoherent Background [1/cm] 
    4145        //  [DEFAULT]=background=0.0 [1/cm] 
  • sansmodels/src/sans/models/c_extensions/sphere.c

    rae3ce4e rf10063e  
    1717double sphere_analytical_1D(SphereParameters *pars, double q) { 
    1818        double dp[5]; 
    19          
     19 
    2020        dp[0] = pars->scale; 
    2121        dp[1] = pars->radius; 
    22         dp[2] = pars->contrast; 
    23         dp[3] = pars->background; 
    24          
     22        dp[2] = pars->sldSph; 
     23        dp[3] = pars->sldSolv; 
     24        dp[4] = pars->background; 
     25 
    2526        return SphereForm(dp, q); 
    2627} 
    27      
     28 
    2829/** 
    2930 * Function to evaluate 2D scattering function 
     
    3738 
    3839double sphere_analytical_2DXY(SphereParameters *pars, double qx, double qy){ 
    39         return sphere_analytical_1D(pars,sqrt(qx*qx+qy*qy));     
     40        return sphere_analytical_1D(pars,sqrt(qx*qx+qy*qy)); 
    4041} 
  • sansmodels/src/sans/models/c_extensions/sphere.h

    r27972c1d rf10063e  
    77 //[PYTHONCLASS] = SphereModel 
    88 //[DISP_PARAMS] = radius 
    9  //[DESCRIPTION] =<text>P(q)=(scale/V)*[3V(scatter_sld-solvent_sld)*(sin(qR)-qRcos(qR)) 
     9 //[DESCRIPTION] =<text>P(q)=(scale/V)*[3V(sldSph-sldSolv)*(sin(qR)-qRcos(qR)) 
    1010 //                                             /(qR)^3]^(2)+bkg 
    1111 // 
    1212 //                             bkg:background, R: radius of sphere 
    1313 //                             V:The volume of the scatter 
    14  //                             contrast:SLD difference between 
    15  //                             scatter and solvent 
    16  //                             scatter_sld: the SLD of the scatter 
    17  //                             solvent_sld: the SLD of the solvent 
     14 //                             sldSph: the SLD of the sphere 
     15 //                             sldSolv: the SLD of the solvent 
    1816 // 
    1917 //             </text> 
     
    3028    double radius; 
    3129 
    32     /// Contrast [1/A^(2)] 
    33     //  [DEFAULT]=contrast= 1.0e-6 [1/A^(2)] 
    34     double contrast; 
     30    /// sldSph [1/A^(2)] 
     31    //  [DEFAULT]=sldSph= 2.0e-6 [1/A^(2)] 
     32    double sldSph; 
     33 
     34    /// sldSolv [1/A^(2)] 
     35    //  [DEFAULT]=sldSolv= 1.0e-6 [1/A^(2)] 
     36    double sldSolv; 
    3537 
    3638        /// Incoherent Background [1/cm] 
  • sansmodels/src/sans/models/c_extensions/spheroid.c

    r975ec8e rf10063e  
    1010#include <stdlib.h> 
    1111 
    12  
    1312/** 
    1413 * Function to evaluate 1D scattering function 
     
    1817 */ 
    1918double spheroid_analytical_1D(SpheroidParameters *pars, double q) { 
    20         double dp[8]; 
     19        double dp[9]; 
    2120 
    2221        // Fill paramater array 
     
    2625        dp[3] = pars->equat_shell; 
    2726        dp[4] = pars->polar_shell; 
    28         dp[5] = pars->contrast; 
    29         dp[6] = pars->sld_solvent; 
    30         dp[7] = pars->background; 
     27        dp[5] = pars->sld_core; 
     28        dp[6] = pars->sld_shell; 
     29        dp[7] = pars->sld_solvent; 
     30        dp[8] = pars->background; 
    3131 
    3232        // Call library function to evaluate model 
    33         return ProlateForm(dp, q); 
     33        return OblateForm(dp, q); 
    3434} 
    3535 
     
    7373        double answer; 
    7474        double Pi = 4.0*atan(1.0); 
     75        double sldcs,sldss; 
    7576 
    7677    // ellipsoid orientation, the axis of the rotation is consistent with the ploar axis. 
     
    7879    cyl_y = sin(pars->axis_theta) * sin(pars->axis_phi); 
    7980    cyl_z = cos(pars->axis_theta); 
     81    //del sld 
     82    sldcs = pars->sld_core - pars->sld_shell; 
     83    sldss = pars->sld_shell- pars->sld_solvent; 
    8084 
    8185    // q vector 
     
    96100        alpha = acos( cos_val ); 
    97101 
    98         // Call the IGOR library function to get the kernel 
    99         answer = gfn4(cos_val,pars->equat_core,pars->polar_core,pars->equat_shell,pars->polar_shell,pars->contrast,pars->sld_solvent,q); 
    100  
     102        // Call the IGOR library function to get the kernel: MUST use gfn4 not gf2 because of the def of params. 
     103        answer = gfn4(cos_val,pars->equat_core,pars->polar_core,pars->equat_shell,pars->polar_shell,sldcs,sldss,q); 
     104        //It seems that it should be normalized somehow. How??? 
    101105 
    102106        //normalize by cylinder volume 
    103107        //NOTE that for this (Fournet) definition of the integral, one must MULTIPLY by Vcyl 
    104     vol = 4*Pi/3*pars->equat_shell*pars->equat_shell*pars->polar_shell; 
     108    vol = 4.0*Pi/3.0*pars->equat_shell*pars->equat_shell*pars->polar_shell; 
    105109        answer /= vol; 
    106110 
  • sansmodels/src/sans/models/c_extensions/spheroid.h

    r27972c1d rf10063e  
    1515                        equat_shell = equatorial radius of shell, 
    1616                        polar_shell = polar radius (revolution axis) of shell, 
    17                         contrast = SLD_core - SLD_shell 
     17                        sld_core = SLD_core 
     18                        sld_shell = SLD_shell 
    1819                        sld_solvent = SLD_solvent 
    1920                        background = Incoherent bkg 
     
    4546    //  [DEFAULT]=polar_shell=30.0 [A] 
    4647    double polar_shell; 
    47     ///  Scattering contrast [1/A^(2)] 
    48     //  [DEFAULT]=contrast=1.0e-6 [1/A^(2)] 
    49     double contrast; 
     48    ///  Core scattering length density [1/A^(2)] 
     49    //  [DEFAULT]=sld_core=2.0e-6 [1/A^(2)] 
     50    double sld_core; 
     51    ///  Shell scattering length density [1/A^(2)] 
     52    //  [DEFAULT]=sld_shell=1.0e-6 [1/A^(2)] 
     53    double sld_shell; 
    5054        /// Solvent scattering length density  [1/A^(2)] 
    5155    //  [DEFAULT]=sld_solvent=6.3e-6 [1/A^(2)] 
  • sansmodels/src/sans/models/c_models/CCoreShellEllipsoidModel.cpp

    r3080527 rf10063e  
    9191        // Initialize parameter dictionary 
    9292        PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000)); 
     93        PyDict_SetItemString(self->params,"sld_core",Py_BuildValue("d",0.000002)); 
    9394        PyDict_SetItemString(self->params,"axis_theta",Py_BuildValue("d",0.000000)); 
    9495        PyDict_SetItemString(self->params,"polar_shell",Py_BuildValue("d",30.000000)); 
     
    99100        PyDict_SetItemString(self->params,"equat_core",Py_BuildValue("d",200.000000)); 
    100101        PyDict_SetItemString(self->params,"polar_core",Py_BuildValue("d",20.000000)); 
    101         PyDict_SetItemString(self->params,"contrast",Py_BuildValue("d",0.000001)); 
     102        PyDict_SetItemString(self->params,"sld_shell",Py_BuildValue("d",0.000001)); 
    102103        // Initialize dispersion / averaging parameter dict 
    103104        DispersionVisitor* visitor = new DispersionVisitor(); 
     
    251252            // Reader parameter dictionary 
    252253    self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 
     254    self->model->sld_core = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_core") ); 
    253255    self->model->axis_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_theta") ); 
    254256    self->model->polar_shell = PyFloat_AsDouble( PyDict_GetItemString(self->params, "polar_shell") ); 
     
    259261    self->model->equat_core = PyFloat_AsDouble( PyDict_GetItemString(self->params, "equat_core") ); 
    260262    self->model->polar_core = PyFloat_AsDouble( PyDict_GetItemString(self->params, "polar_core") ); 
    261     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
     263    self->model->sld_shell = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_shell") ); 
    262264    // Read in dispersion parameters 
    263265    PyObject* disp_dict; 
     
    338340            // Reader parameter dictionary 
    339341    self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 
     342    self->model->sld_core = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_core") ); 
    340343    self->model->axis_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_theta") ); 
    341344    self->model->polar_shell = PyFloat_AsDouble( PyDict_GetItemString(self->params, "polar_shell") ); 
     
    346349    self->model->equat_core = PyFloat_AsDouble( PyDict_GetItemString(self->params, "equat_core") ); 
    347350    self->model->polar_core = PyFloat_AsDouble( PyDict_GetItemString(self->params, "polar_core") ); 
    348     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
     351    self->model->sld_shell = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_shell") ); 
    349352    // Read in dispersion parameters 
    350353    PyObject* disp_dict; 
     
    412415            // Reader parameter dictionary 
    413416    self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 
     417    self->model->sld_core = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_core") ); 
    414418    self->model->axis_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_theta") ); 
    415419    self->model->polar_shell = PyFloat_AsDouble( PyDict_GetItemString(self->params, "polar_shell") ); 
     
    420424    self->model->equat_core = PyFloat_AsDouble( PyDict_GetItemString(self->params, "equat_core") ); 
    421425    self->model->polar_core = PyFloat_AsDouble( PyDict_GetItemString(self->params, "polar_core") ); 
    422     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
     426    self->model->sld_shell = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_shell") ); 
    423427    // Read in dispersion parameters 
    424428    PyObject* disp_dict; 
     
    455459            // Reader parameter dictionary 
    456460    self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 
     461    self->model->sld_core = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_core") ); 
    457462    self->model->axis_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_theta") ); 
    458463    self->model->polar_shell = PyFloat_AsDouble( PyDict_GetItemString(self->params, "polar_shell") ); 
     
    463468    self->model->equat_core = PyFloat_AsDouble( PyDict_GetItemString(self->params, "equat_core") ); 
    464469    self->model->polar_core = PyFloat_AsDouble( PyDict_GetItemString(self->params, "polar_core") ); 
    465     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
     470    self->model->sld_shell = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_shell") ); 
    466471    // Read in dispersion parameters 
    467472    PyObject* disp_dict; 
  • sansmodels/src/sans/models/c_models/CCylinderModel.cpp

    r3080527 rf10063e  
    9191        // Initialize parameter dictionary 
    9292        PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000)); 
     93        PyDict_SetItemString(self->params,"sldCyl",Py_BuildValue("d",0.000004)); 
     94        PyDict_SetItemString(self->params,"cyl_theta",Py_BuildValue("d",1.000000)); 
    9395        PyDict_SetItemString(self->params,"length",Py_BuildValue("d",400.000000)); 
    94         PyDict_SetItemString(self->params,"cyl_theta",Py_BuildValue("d",1.000000)); 
     96        PyDict_SetItemString(self->params,"sldSolv",Py_BuildValue("d",0.000001)); 
    9597        PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.000000)); 
    9698        PyDict_SetItemString(self->params,"radius",Py_BuildValue("d",20.000000)); 
    97         PyDict_SetItemString(self->params,"contrast",Py_BuildValue("d",0.000003)); 
    9899        PyDict_SetItemString(self->params,"cyl_phi",Py_BuildValue("d",1.000000)); 
    99100        // Initialize dispersion / averaging parameter dict 
     
    242243            // Reader parameter dictionary 
    243244    self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 
     245    self->model->sldCyl = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldCyl") ); 
     246    self->model->cyl_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_theta") ); 
    244247    self->model->length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") ); 
    245     self->model->cyl_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_theta") ); 
     248    self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 
    246249    self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    247250    self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") ); 
    248     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
    249251    self->model->cyl_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_phi") ); 
    250252    // Read in dispersion parameters 
     
    322324            // Reader parameter dictionary 
    323325    self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 
     326    self->model->sldCyl = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldCyl") ); 
     327    self->model->cyl_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_theta") ); 
    324328    self->model->length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") ); 
    325     self->model->cyl_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_theta") ); 
     329    self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 
    326330    self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    327331    self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") ); 
    328     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
    329332    self->model->cyl_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_phi") ); 
    330333    // Read in dispersion parameters 
     
    389392            // Reader parameter dictionary 
    390393    self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 
     394    self->model->sldCyl = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldCyl") ); 
     395    self->model->cyl_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_theta") ); 
    391396    self->model->length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") ); 
    392     self->model->cyl_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_theta") ); 
     397    self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 
    393398    self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    394399    self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") ); 
    395     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
    396400    self->model->cyl_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_phi") ); 
    397401    // Read in dispersion parameters 
     
    425429            // Reader parameter dictionary 
    426430    self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 
     431    self->model->sldCyl = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldCyl") ); 
     432    self->model->cyl_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_theta") ); 
    427433    self->model->length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") ); 
    428     self->model->cyl_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_theta") ); 
     434    self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 
    429435    self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    430436    self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") ); 
    431     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
    432437    self->model->cyl_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_phi") ); 
    433438    // Read in dispersion parameters 
  • sansmodels/src/sans/models/c_models/CEllipsoidModel.cpp

    r3080527 rf10063e  
    9595        PyDict_SetItemString(self->params,"radius_a",Py_BuildValue("d",20.000000)); 
    9696        PyDict_SetItemString(self->params,"axis_phi",Py_BuildValue("d",0.000000)); 
     97        PyDict_SetItemString(self->params,"sldSolv",Py_BuildValue("d",0.000001)); 
    9798        PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.000000)); 
    98         PyDict_SetItemString(self->params,"contrast",Py_BuildValue("d",0.000003)); 
     99        PyDict_SetItemString(self->params,"sldEll",Py_BuildValue("d",0.000004)); 
    99100        // Initialize dispersion / averaging parameter dict 
    100101        DispersionVisitor* visitor = new DispersionVisitor(); 
     
    246247    self->model->radius_a = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius_a") ); 
    247248    self->model->axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") ); 
     249    self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 
    248250    self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    249     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
     251    self->model->sldEll = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldEll") ); 
    250252    // Read in dispersion parameters 
    251253    PyObject* disp_dict; 
     
    326328    self->model->radius_a = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius_a") ); 
    327329    self->model->axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") ); 
     330    self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 
    328331    self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    329     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
     332    self->model->sldEll = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldEll") ); 
    330333    // Read in dispersion parameters 
    331334    PyObject* disp_dict; 
     
    393396    self->model->radius_a = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius_a") ); 
    394397    self->model->axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") ); 
     398    self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 
    395399    self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    396     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
     400    self->model->sldEll = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldEll") ); 
    397401    // Read in dispersion parameters 
    398402    PyObject* disp_dict; 
     
    429433    self->model->radius_a = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius_a") ); 
    430434    self->model->axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") ); 
     435    self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 
    431436    self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    432     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
     437    self->model->sldEll = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldEll") ); 
    433438    // Read in dispersion parameters 
    434439    PyObject* disp_dict; 
  • sansmodels/src/sans/models/c_models/CEllipticalCylinderModel.cpp

    r3080527 rf10063e  
    9191        // Initialize parameter dictionary 
    9292        PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000)); 
     93        PyDict_SetItemString(self->params,"sldCyl",Py_BuildValue("d",0.000004)); 
    9394        PyDict_SetItemString(self->params,"cyl_psi",Py_BuildValue("d",0.000000)); 
    9495        PyDict_SetItemString(self->params,"length",Py_BuildValue("d",400.000000)); 
    9596        PyDict_SetItemString(self->params,"r_minor",Py_BuildValue("d",20.000000)); 
     97        PyDict_SetItemString(self->params,"sldSolv",Py_BuildValue("d",0.000001)); 
     98        PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.000000)); 
    9699        PyDict_SetItemString(self->params,"cyl_theta",Py_BuildValue("d",1.570000)); 
    97         PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.000000)); 
    98100        PyDict_SetItemString(self->params,"r_ratio",Py_BuildValue("d",1.500000)); 
    99         PyDict_SetItemString(self->params,"contrast",Py_BuildValue("d",0.000003)); 
    100101        PyDict_SetItemString(self->params,"cyl_phi",Py_BuildValue("d",0.000000)); 
    101102        // Initialize dispersion / averaging parameter dict 
     
    250251            // Reader parameter dictionary 
    251252    self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 
     253    self->model->sldCyl = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldCyl") ); 
    252254    self->model->cyl_psi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_psi") ); 
    253255    self->model->length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") ); 
    254256    self->model->r_minor = PyFloat_AsDouble( PyDict_GetItemString(self->params, "r_minor") ); 
     257    self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 
     258    self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    255259    self->model->cyl_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_theta") ); 
    256     self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    257260    self->model->r_ratio = PyFloat_AsDouble( PyDict_GetItemString(self->params, "r_ratio") ); 
    258     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
    259261    self->model->cyl_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_phi") ); 
    260262    // Read in dispersion parameters 
     
    336338            // Reader parameter dictionary 
    337339    self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 
     340    self->model->sldCyl = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldCyl") ); 
    338341    self->model->cyl_psi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_psi") ); 
    339342    self->model->length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") ); 
    340343    self->model->r_minor = PyFloat_AsDouble( PyDict_GetItemString(self->params, "r_minor") ); 
     344    self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 
     345    self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    341346    self->model->cyl_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_theta") ); 
    342     self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    343347    self->model->r_ratio = PyFloat_AsDouble( PyDict_GetItemString(self->params, "r_ratio") ); 
    344     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
    345348    self->model->cyl_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_phi") ); 
    346349    // Read in dispersion parameters 
     
    409412            // Reader parameter dictionary 
    410413    self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 
     414    self->model->sldCyl = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldCyl") ); 
    411415    self->model->cyl_psi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_psi") ); 
    412416    self->model->length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") ); 
    413417    self->model->r_minor = PyFloat_AsDouble( PyDict_GetItemString(self->params, "r_minor") ); 
     418    self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 
     419    self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    414420    self->model->cyl_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_theta") ); 
    415     self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    416421    self->model->r_ratio = PyFloat_AsDouble( PyDict_GetItemString(self->params, "r_ratio") ); 
    417     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
    418422    self->model->cyl_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_phi") ); 
    419423    // Read in dispersion parameters 
     
    451455            // Reader parameter dictionary 
    452456    self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 
     457    self->model->sldCyl = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldCyl") ); 
    453458    self->model->cyl_psi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_psi") ); 
    454459    self->model->length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") ); 
    455460    self->model->r_minor = PyFloat_AsDouble( PyDict_GetItemString(self->params, "r_minor") ); 
     461    self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 
     462    self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    456463    self->model->cyl_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_theta") ); 
    457     self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    458464    self->model->r_ratio = PyFloat_AsDouble( PyDict_GetItemString(self->params, "r_ratio") ); 
    459     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
    460465    self->model->cyl_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "cyl_phi") ); 
    461466    // Read in dispersion parameters 
  • sansmodels/src/sans/models/c_models/CFlexibleCylinderModel.cpp

    r3080527 rf10063e  
    9191        // Initialize parameter dictionary 
    9292        PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000)); 
     93        PyDict_SetItemString(self->params,"sldCyl",Py_BuildValue("d",0.000006)); 
    9394        PyDict_SetItemString(self->params,"length",Py_BuildValue("d",1000.000000)); 
     95        PyDict_SetItemString(self->params,"sldSolv",Py_BuildValue("d",0.000001)); 
     96        PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.000100)); 
    9497        PyDict_SetItemString(self->params,"radius",Py_BuildValue("d",20.000000)); 
    95         PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.000100)); 
    9698        PyDict_SetItemString(self->params,"kuhn_length",Py_BuildValue("d",100.000000)); 
    97         PyDict_SetItemString(self->params,"contrast",Py_BuildValue("d",0.000005)); 
    9899        // Initialize dispersion / averaging parameter dict 
    99100        DispersionVisitor* visitor = new DispersionVisitor(); 
     
    238239            // Reader parameter dictionary 
    239240    self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 
     241    self->model->sldCyl = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldCyl") ); 
    240242    self->model->length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") ); 
     243    self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 
     244    self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    241245    self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") ); 
    242     self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    243246    self->model->kuhn_length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "kuhn_length") ); 
    244     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
    245247    // Read in dispersion parameters 
    246248    PyObject* disp_dict; 
     
    315317            // Reader parameter dictionary 
    316318    self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 
     319    self->model->sldCyl = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldCyl") ); 
    317320    self->model->length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") ); 
     321    self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 
     322    self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    318323    self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") ); 
    319     self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    320324    self->model->kuhn_length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "kuhn_length") ); 
    321     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
    322325    // Read in dispersion parameters 
    323326    PyObject* disp_dict; 
     
    379382            // Reader parameter dictionary 
    380383    self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 
     384    self->model->sldCyl = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldCyl") ); 
    381385    self->model->length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") ); 
     386    self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 
     387    self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    382388    self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") ); 
    383     self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    384389    self->model->kuhn_length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "kuhn_length") ); 
    385     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
    386390    // Read in dispersion parameters 
    387391    PyObject* disp_dict; 
     
    412416            // Reader parameter dictionary 
    413417    self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 
     418    self->model->sldCyl = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldCyl") ); 
    414419    self->model->length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") ); 
     420    self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 
     421    self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    415422    self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") ); 
    416     self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    417423    self->model->kuhn_length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "kuhn_length") ); 
    418     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
    419424    // Read in dispersion parameters 
    420425    PyObject* disp_dict; 
  • sansmodels/src/sans/models/c_models/CHollowCylinderModel.cpp

    r3080527 rf10063e  
    9191        // Initialize parameter dictionary 
    9292        PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000)); 
     93        PyDict_SetItemString(self->params,"sldCyl",Py_BuildValue("d",0.000006)); 
    9394        PyDict_SetItemString(self->params,"core_radius",Py_BuildValue("d",20.000000)); 
    9495        PyDict_SetItemString(self->params,"axis_theta",Py_BuildValue("d",1.570000)); 
    9596        PyDict_SetItemString(self->params,"length",Py_BuildValue("d",400.000000)); 
    9697        PyDict_SetItemString(self->params,"axis_phi",Py_BuildValue("d",0.000000)); 
     98        PyDict_SetItemString(self->params,"sldSolv",Py_BuildValue("d",0.000001)); 
     99        PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.010000)); 
    97100        PyDict_SetItemString(self->params,"radius",Py_BuildValue("d",30.000000)); 
    98         PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.010000)); 
    99         PyDict_SetItemString(self->params,"contrast",Py_BuildValue("d",0.000005)); 
    100101        // Initialize dispersion / averaging parameter dict 
    101102        DispersionVisitor* visitor = new DispersionVisitor(); 
     
    246247            // Reader parameter dictionary 
    247248    self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 
     249    self->model->sldCyl = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldCyl") ); 
    248250    self->model->core_radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "core_radius") ); 
    249251    self->model->axis_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_theta") ); 
    250252    self->model->length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") ); 
    251253    self->model->axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") ); 
     254    self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 
     255    self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    252256    self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") ); 
    253     self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    254     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
    255257    // Read in dispersion parameters 
    256258    PyObject* disp_dict; 
     
    329331            // Reader parameter dictionary 
    330332    self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 
     333    self->model->sldCyl = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldCyl") ); 
    331334    self->model->core_radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "core_radius") ); 
    332335    self->model->axis_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_theta") ); 
    333336    self->model->length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") ); 
    334337    self->model->axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") ); 
     338    self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 
     339    self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    335340    self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") ); 
    336     self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    337     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
    338341    // Read in dispersion parameters 
    339342    PyObject* disp_dict; 
     
    399402            // Reader parameter dictionary 
    400403    self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 
     404    self->model->sldCyl = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldCyl") ); 
    401405    self->model->core_radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "core_radius") ); 
    402406    self->model->axis_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_theta") ); 
    403407    self->model->length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") ); 
    404408    self->model->axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") ); 
     409    self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 
     410    self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    405411    self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") ); 
    406     self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    407     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
    408412    // Read in dispersion parameters 
    409413    PyObject* disp_dict; 
     
    438442            // Reader parameter dictionary 
    439443    self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 
     444    self->model->sldCyl = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldCyl") ); 
    440445    self->model->core_radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "core_radius") ); 
    441446    self->model->axis_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_theta") ); 
    442447    self->model->length = PyFloat_AsDouble( PyDict_GetItemString(self->params, "length") ); 
    443448    self->model->axis_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "axis_phi") ); 
     449    self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 
     450    self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    444451    self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") ); 
    445     self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    446     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
    447452    // Read in dispersion parameters 
    448453    PyObject* disp_dict; 
  • sansmodels/src/sans/models/c_models/CLamellarPSModel.cpp

    r3080527 rf10063e  
    9292        PyDict_SetItemString(self->params,"n_plates",Py_BuildValue("d",20.000000)); 
    9393        PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000)); 
     94        PyDict_SetItemString(self->params,"sld_sol",Py_BuildValue("d",0.000001)); 
     95        PyDict_SetItemString(self->params,"delta",Py_BuildValue("d",30.000000)); 
    9496        PyDict_SetItemString(self->params,"spacing",Py_BuildValue("d",400.000000)); 
    9597        PyDict_SetItemString(self->params,"caille",Py_BuildValue("d",0.100000)); 
    9698        PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.000000)); 
    97         PyDict_SetItemString(self->params,"delta",Py_BuildValue("d",30.000000)); 
    98         PyDict_SetItemString(self->params,"contrast",Py_BuildValue("d",0.000005)); 
     99        PyDict_SetItemString(self->params,"sld_bi",Py_BuildValue("d",0.000006)); 
    99100        // Initialize dispersion / averaging parameter dict 
    100101        DispersionVisitor* visitor = new DispersionVisitor(); 
     
    237238    self->model->n_plates = PyFloat_AsDouble( PyDict_GetItemString(self->params, "n_plates") ); 
    238239    self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 
     240    self->model->sld_sol = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_sol") ); 
     241    self->model->delta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "delta") ); 
    239242    self->model->spacing = PyFloat_AsDouble( PyDict_GetItemString(self->params, "spacing") ); 
    240243    self->model->caille = PyFloat_AsDouble( PyDict_GetItemString(self->params, "caille") ); 
    241244    self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    242     self->model->delta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "delta") ); 
    243     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
     245    self->model->sld_bi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_bi") ); 
    244246    // Read in dispersion parameters 
    245247    PyObject* disp_dict; 
     
    313315    self->model->n_plates = PyFloat_AsDouble( PyDict_GetItemString(self->params, "n_plates") ); 
    314316    self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 
     317    self->model->sld_sol = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_sol") ); 
     318    self->model->delta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "delta") ); 
    315319    self->model->spacing = PyFloat_AsDouble( PyDict_GetItemString(self->params, "spacing") ); 
    316320    self->model->caille = PyFloat_AsDouble( PyDict_GetItemString(self->params, "caille") ); 
    317321    self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    318     self->model->delta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "delta") ); 
    319     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
     322    self->model->sld_bi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_bi") ); 
    320323    // Read in dispersion parameters 
    321324    PyObject* disp_dict; 
     
    376379    self->model->n_plates = PyFloat_AsDouble( PyDict_GetItemString(self->params, "n_plates") ); 
    377380    self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 
     381    self->model->sld_sol = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_sol") ); 
     382    self->model->delta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "delta") ); 
    378383    self->model->spacing = PyFloat_AsDouble( PyDict_GetItemString(self->params, "spacing") ); 
    379384    self->model->caille = PyFloat_AsDouble( PyDict_GetItemString(self->params, "caille") ); 
    380385    self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    381     self->model->delta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "delta") ); 
    382     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
     386    self->model->sld_bi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_bi") ); 
    383387    // Read in dispersion parameters 
    384388    PyObject* disp_dict; 
     
    408412    self->model->n_plates = PyFloat_AsDouble( PyDict_GetItemString(self->params, "n_plates") ); 
    409413    self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 
     414    self->model->sld_sol = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_sol") ); 
     415    self->model->delta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "delta") ); 
    410416    self->model->spacing = PyFloat_AsDouble( PyDict_GetItemString(self->params, "spacing") ); 
    411417    self->model->caille = PyFloat_AsDouble( PyDict_GetItemString(self->params, "caille") ); 
    412418    self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    413     self->model->delta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "delta") ); 
    414     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
     419    self->model->sld_bi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sld_bi") ); 
    415420    // Read in dispersion parameters 
    416421    PyObject* disp_dict; 
  • sansmodels/src/sans/models/c_models/CParallelepipedModel.cpp

    r3080527 rf10063e  
    9494        PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000)); 
    9595        PyDict_SetItemString(self->params,"long_c",Py_BuildValue("d",400.000000)); 
     96        PyDict_SetItemString(self->params,"sldPipe",Py_BuildValue("d",0.000006)); 
    9697        PyDict_SetItemString(self->params,"parallel_psi",Py_BuildValue("d",0.000000)); 
    9798        PyDict_SetItemString(self->params,"parallel_phi",Py_BuildValue("d",0.000000)); 
    9899        PyDict_SetItemString(self->params,"parallel_theta",Py_BuildValue("d",0.000000)); 
     100        PyDict_SetItemString(self->params,"sldSolv",Py_BuildValue("d",0.000001)); 
    99101        PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.000000)); 
    100         PyDict_SetItemString(self->params,"contrast",Py_BuildValue("d",0.000005)); 
    101102        // Initialize dispersion / averaging parameter dict 
    102103        DispersionVisitor* visitor = new DispersionVisitor(); 
     
    253254    self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 
    254255    self->model->long_c = PyFloat_AsDouble( PyDict_GetItemString(self->params, "long_c") ); 
     256    self->model->sldPipe = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldPipe") ); 
    255257    self->model->parallel_psi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "parallel_psi") ); 
    256258    self->model->parallel_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "parallel_phi") ); 
    257259    self->model->parallel_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "parallel_theta") ); 
     260    self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 
    258261    self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    259     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
    260262    // Read in dispersion parameters 
    261263    PyObject* disp_dict; 
     
    339341    self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 
    340342    self->model->long_c = PyFloat_AsDouble( PyDict_GetItemString(self->params, "long_c") ); 
     343    self->model->sldPipe = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldPipe") ); 
    341344    self->model->parallel_psi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "parallel_psi") ); 
    342345    self->model->parallel_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "parallel_phi") ); 
    343346    self->model->parallel_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "parallel_theta") ); 
     347    self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 
    344348    self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    345     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
    346349    // Read in dispersion parameters 
    347350    PyObject* disp_dict; 
     
    412415    self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 
    413416    self->model->long_c = PyFloat_AsDouble( PyDict_GetItemString(self->params, "long_c") ); 
     417    self->model->sldPipe = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldPipe") ); 
    414418    self->model->parallel_psi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "parallel_psi") ); 
    415419    self->model->parallel_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "parallel_phi") ); 
    416420    self->model->parallel_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "parallel_theta") ); 
     421    self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 
    417422    self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    418     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
    419423    // Read in dispersion parameters 
    420424    PyObject* disp_dict; 
     
    454458    self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 
    455459    self->model->long_c = PyFloat_AsDouble( PyDict_GetItemString(self->params, "long_c") ); 
     460    self->model->sldPipe = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldPipe") ); 
    456461    self->model->parallel_psi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "parallel_psi") ); 
    457462    self->model->parallel_phi = PyFloat_AsDouble( PyDict_GetItemString(self->params, "parallel_phi") ); 
    458463    self->model->parallel_theta = PyFloat_AsDouble( PyDict_GetItemString(self->params, "parallel_theta") ); 
     464    self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 
    459465    self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    460     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
    461466    // Read in dispersion parameters 
    462467    PyObject* disp_dict; 
  • sansmodels/src/sans/models/c_models/CSphereModel.cpp

    r3080527 rf10063e  
    9090         
    9191        // Initialize parameter dictionary 
     92        PyDict_SetItemString(self->params,"sldSolv",Py_BuildValue("d",0.000001)); 
     93        PyDict_SetItemString(self->params,"sldSph",Py_BuildValue("d",0.000002)); 
    9294        PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000)); 
    9395        PyDict_SetItemString(self->params,"radius",Py_BuildValue("d",60.000000)); 
    9496        PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.000000)); 
    95         PyDict_SetItemString(self->params,"contrast",Py_BuildValue("d",0.000001)); 
    9697        // Initialize dispersion / averaging parameter dict 
    9798        DispersionVisitor* visitor = new DispersionVisitor(); 
     
    229230         
    230231            // Reader parameter dictionary 
     232    self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 
     233    self->model->sldSph = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSph") ); 
    231234    self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 
    232235    self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") ); 
    233236    self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    234     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
    235237    // Read in dispersion parameters 
    236238    PyObject* disp_dict; 
     
    300302         
    301303            // Reader parameter dictionary 
     304    self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 
     305    self->model->sldSph = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSph") ); 
    302306    self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 
    303307    self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") ); 
    304308    self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    305     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
    306309    // Read in dispersion parameters 
    307310    PyObject* disp_dict; 
     
    358361         
    359362            // Reader parameter dictionary 
     363    self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 
     364    self->model->sldSph = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSph") ); 
    360365    self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 
    361366    self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") ); 
    362367    self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    363     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
    364368    // Read in dispersion parameters 
    365369    PyObject* disp_dict; 
     
    385389         
    386390            // Reader parameter dictionary 
     391    self->model->sldSolv = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSolv") ); 
     392    self->model->sldSph = PyFloat_AsDouble( PyDict_GetItemString(self->params, "sldSph") ); 
    387393    self->model->scale = PyFloat_AsDouble( PyDict_GetItemString(self->params, "scale") ); 
    388394    self->model->radius = PyFloat_AsDouble( PyDict_GetItemString(self->params, "radius") ); 
    389395    self->model->background = PyFloat_AsDouble( PyDict_GetItemString(self->params, "background") ); 
    390     self->model->contrast = PyFloat_AsDouble( PyDict_GetItemString(self->params, "contrast") ); 
    391396    // Read in dispersion parameters 
    392397    PyObject* disp_dict; 
  • sansmodels/src/sans/models/c_models/cylinder.cpp

    rc451be9 rf10063e  
    3939        length     = Parameter(400.0, true); 
    4040        length.set_min(0.0); 
    41         contrast   = Parameter(3.e-6); 
     41        sldCyl   = Parameter(4.e-6); 
     42        sldSolv   = Parameter(1.e-6); 
    4243        background = Parameter(0.0); 
    4344        cyl_theta  = Parameter(0.0, true); 
     
    5253 */ 
    5354double CylinderModel :: operator()(double q) { 
    54         double dp[5]; 
     55        double dp[6]; 
    5556 
    5657        // Fill parameter array for IGOR library 
     
    5960        dp[1] = radius(); 
    6061        dp[2] = length(); 
    61         dp[3] = contrast(); 
    62         dp[4] = 0.0; 
     62        dp[3] = sldCyl(); 
     63        dp[4] = sldSolv(); 
     64        dp[5] = 0.0; 
    6365 
    6466        // Get the dispersion points for the radius 
     
    113115        dp.radius     = radius(); 
    114116        dp.length     = length(); 
    115         dp.contrast   = contrast(); 
     117        dp.sldCyl   = sldCyl(); 
     118        dp.sldSolv   = sldSolv(); 
    116119        dp.background = 0.0; 
    117120        dp.cyl_theta  = cyl_theta(); 
  • sansmodels/src/sans/models/c_models/ellipsoid.cpp

    rc451be9 rf10063e  
    3939        radius_b   = Parameter(400.0, true); 
    4040        radius_b.set_min(0.0); 
    41         contrast   = Parameter(3.e-6); 
     41        sldEll   = Parameter(4.e-6); 
     42        sldSolv   = Parameter(1.e-6); 
    4243        background = Parameter(0.0); 
    4344        axis_theta  = Parameter(1.57, true); 
     
    5253 */ 
    5354double EllipsoidModel :: operator()(double q) { 
    54         double dp[5]; 
     55        double dp[6]; 
    5556 
    5657        // Fill parameter array for IGOR library 
     
    5960        dp[1] = radius_a(); 
    6061        dp[2] = radius_b(); 
    61         dp[3] = contrast(); 
    62         dp[4] = 0.0; 
     62        dp[3] = sldEll(); 
     63        dp[4] = sldSolv(); 
     64        dp[5] = 0.0; 
    6365 
    6466        // Get the dispersion points for the radius_a 
     
    116118        dp.radius_a   = radius_a(); 
    117119        dp.radius_b   = radius_b(); 
    118         dp.contrast   = contrast(); 
     120        dp.sldEll   = sldEll(); 
     121        dp.sldSolv   = sldSolv(); 
    119122        dp.background = 0.0; 
    120123        dp.axis_theta = axis_theta(); 
  • sansmodels/src/sans/models/c_models/ellipticalcylinder.cpp

    rc451be9 rf10063e  
    4141        length     = Parameter(400.0, true); 
    4242        length.set_min(0.0); 
    43         contrast   = Parameter(3.e-6); 
     43        sldCyl   = Parameter(4.e-6); 
     44        sldSolv   = Parameter(1.e-6); 
    4445        background = Parameter(0.0); 
    4546        cyl_theta  = Parameter(1.57, true); 
     
    5556 */ 
    5657double EllipticalCylinderModel :: operator()(double q) { 
    57         double dp[6]; 
     58        double dp[7]; 
    5859 
    5960        dp[0] = scale(); 
     
    6162        dp[2] = r_ratio(); 
    6263        dp[3] = length(); 
    63         dp[4] = contrast(); 
    64         dp[5] = 0.0; 
     64        dp[4] = sldCyl(); 
     65        dp[5] = sldSolv(); 
     66        dp[6] = 0.0; 
    6567 
    6668        // Get the dispersion points for the r_minor 
     
    132134        dp.r_ratio    = r_ratio(); 
    133135        dp.length     = length(); 
    134         dp.contrast   = contrast(); 
     136        dp.sldCyl   = sldCyl(); 
     137        dp.sldSolv   = sldSolv(); 
    135138        dp.background = 0.0; 
    136139        dp.cyl_theta  = cyl_theta(); 
  • sansmodels/src/sans/models/c_models/flexiblecylinder.cpp

    rc451be9 rf10063e  
    4242        radius  = Parameter(20.0, true); 
    4343        radius.set_min(0.0); 
    44         contrast   = Parameter(5.3e-6); 
     44        sldCyl   = Parameter(6.3e-6); 
     45        sldSolv   = Parameter(1.0e-6); 
    4546        background = Parameter(0.0001); 
    4647} 
     
    5354 */ 
    5455double FlexibleCylinderModel :: operator()(double q) { 
    55         double dp[6]; 
     56        double dp[7]; 
    5657 
    5758        // Fill parameter array for IGOR library 
     
    6162        dp[2] = kuhn_length(); 
    6263        dp[3] = radius(); 
    63         dp[4] = contrast(); 
    64         dp[5] = 0.0; 
     64        dp[4] = sldCyl(); 
     65        dp[5] = sldSolv(); 
     66        dp[6] = 0.0; 
    6567 
    6668        // Get the dispersion points for the length 
  • sansmodels/src/sans/models/c_models/hollowcylinder.cpp

    rc451be9 rf10063e  
    4141        length     = Parameter(400.0, true); 
    4242        length.set_min(0.0); 
    43         contrast  = Parameter(5.3e-6); 
     43        sldCyl  = Parameter(6.3e-6); 
     44        sldSolv  = Parameter(1.0e-6); 
    4445        background = Parameter(0.0); 
    4546        axis_theta = Parameter(0.0, true); 
     
    5455 */ 
    5556double HollowCylinderModel :: operator()(double q) { 
    56         double dp[6]; 
     57        double dp[7]; 
    5758 
    5859        dp[0] = scale(); 
     
    6061        dp[2] = radius(); 
    6162        dp[3] = length(); 
    62         dp[4] = contrast(); 
    63         dp[5] = 0.0; 
     63        dp[4] = sldCyl(); 
     64        dp[5] = sldSolv(); 
     65        dp[6] = 0.0; 
    6466 
    6567        // Get the dispersion points for the core radius 
     
    113115        if (vol != 0.0 && norm != 0.0) { 
    114116                //Re-normalize by avg volume 
    115                 sum = sum/(vol/norm);} 
     117                sum = sum*(vol/norm);} 
    116118 
    117119        return sum/norm + background(); 
     
    131133        dp.radius  = radius(); 
    132134        dp.length     = length(); 
    133         dp.contrast   = contrast(); 
     135        dp.sldCyl   = sldCyl(); 
     136        dp.sldSolv  = sldSolv(); 
    134137        dp.background = 0.0; 
    135138        dp.axis_theta = axis_theta(); 
     
    223226        if (vol != 0.0 && norm_vol != 0.0) { 
    224227                //Re-normalize by avg volume 
    225                 sum = sum/(vol/norm_vol);} 
     228                sum = sum*(vol/norm_vol);} 
    226229        return sum/norm + background(); 
    227230} 
  • sansmodels/src/sans/models/c_models/lamellarPS.cpp

    rf9bf661 rf10063e  
    3939        delta     = Parameter(30.0); 
    4040        delta.set_min(0.0); 
    41         contrast   = Parameter(5.3e-6); 
     41        sld_bi   = Parameter(6.3e-6); 
     42        sld_sol   = Parameter(1.0e-6); 
    4243        n_plates     = Parameter(20.0); 
    4344        caille = Parameter(0.1); 
     
    5354 */ 
    5455double LamellarPSModel :: operator()(double q) { 
    55         double dp[7]; 
     56        double dp[8]; 
    5657 
    5758        // Fill parameter array for IGOR library 
     
    6061        dp[1] = spacing(); 
    6162        dp[2] = delta(); 
    62         dp[3] = contrast(); 
    63         dp[4] = n_plates(); 
    64         dp[5] = caille(); 
    65         dp[6] = 0.0; 
     63        dp[3] = sld_bi(); 
     64        dp[4] = sld_sol(); 
     65        dp[5] = n_plates(); 
     66        dp[6] = caille(); 
     67        dp[7] = 0.0; 
    6668 
    6769 
  • sansmodels/src/sans/models/c_models/models.hh

    r5eb9154 rf10063e  
    3232        Parameter scale; 
    3333        Parameter length; 
    34         Parameter contrast; 
     34        Parameter sldCyl; 
     35        Parameter sldSolv; 
    3536        Parameter background; 
    3637        Parameter cyl_theta; 
     
    5556        Parameter short_b; 
    5657        Parameter long_c; 
    57         Parameter contrast; 
     58        Parameter sldPipe; 
     59        Parameter sldSolv; 
    5860        Parameter background; 
    5961        Parameter parallel_theta; 
     
    7779        Parameter radius; 
    7880        Parameter scale; 
    79         Parameter contrast; 
     81        Parameter sldSph; 
     82        Parameter sldSolv; 
    8083        Parameter background; 
    8184 
     
    245248        Parameter scale; 
    246249        Parameter radius_b; 
    247         Parameter contrast; 
     250        Parameter sldEll; 
     251        Parameter sldSolv; 
    248252        Parameter background; 
    249253        Parameter axis_theta; 
     
    267271        Parameter r_ratio; 
    268272        Parameter length; 
    269         Parameter contrast; 
     273        Parameter sldCyl; 
     274        Parameter sldSolv; 
    270275        Parameter background; 
    271276        Parameter cyl_theta; 
     
    312317        Parameter kuhn_length; 
    313318        Parameter radius; 
    314         Parameter contrast; 
     319        Parameter sldCyl; 
     320        Parameter sldSolv; 
    315321        Parameter background; 
    316322        Parameter axis_theta; 
     
    403409        Parameter spacing; 
    404410        Parameter delta; 
    405         Parameter contrast; 
     411        Parameter sld_bi; 
     412        Parameter sld_sol; 
    406413        Parameter n_plates; 
    407414        Parameter caille; 
     
    450457        Parameter equat_shell; 
    451458        Parameter polar_shell; 
    452         Parameter contrast; 
     459        Parameter sld_core; 
     460        Parameter sld_shell; 
    453461        Parameter sld_solvent; 
    454462        Parameter background; 
     
    473481        Parameter radius; 
    474482        Parameter length; 
    475         Parameter contrast; 
     483        Parameter sldCyl; 
     484        Parameter sldSolv; 
    476485        Parameter background; 
    477486        Parameter axis_theta; 
  • sansmodels/src/sans/models/c_models/parallelepiped.cpp

    rc451be9 rf10063e  
    4242        long_c     = Parameter(400.0, true); 
    4343        long_c.set_min(1.0); 
    44         contrast   = Parameter(53.e-7); 
     44        sldPipe   = Parameter(6.3e-6); 
     45        sldSolv   = Parameter(1.0e-6); 
    4546        background = Parameter(0.0); 
    4647        parallel_theta  = Parameter(0.0, true); 
     
    5657 */ 
    5758double ParallelepipedModel :: operator()(double q) { 
    58         double dp[6]; 
     59        double dp[7]; 
    5960 
    6061        // Fill parameter array for IGOR library 
     
    6465        dp[2] = short_b(); 
    6566        dp[3] = long_c(); 
    66         dp[4] = contrast(); 
    67         dp[5] = 0.0; 
     67        dp[4] = sldPipe(); 
     68        dp[5] = sldSolv(); 
     69        dp[6] = 0.0; 
    6870 
    6971        // Get the dispersion points for the short_edgeA 
     
    132134        dp.short_b   = short_b(); 
    133135        dp.long_c  = long_c(); 
    134         dp.contrast   = contrast(); 
     136        dp.sldPipe   = sldPipe(); 
     137        dp.sldSolv   = sldSolv(); 
    135138        dp.background = 0.0; 
    136139        //dp.background = background(); 
  • sansmodels/src/sans/models/c_models/sphere.cpp

    rc451be9 rf10063e  
    3535        radius     = Parameter(20.0, true); 
    3636        radius.set_min(0.0); 
    37         contrast   = Parameter(3.e-6); 
     37        sldSph   = Parameter(4.0e-6); 
     38        sldSolv   = Parameter(1.0e-6); 
    3839        background = Parameter(0.0); 
    3940} 
     
    4647 */ 
    4748double SphereModel :: operator()(double q) { 
    48         double dp[4]; 
     49        double dp[5]; 
    4950 
    5051        // Fill parameter array for IGOR library 
     
    5253        dp[0] = scale(); 
    5354        dp[1] = radius(); 
    54         dp[2] = contrast(); 
    55         dp[3] = 0.0; 
     55        dp[2] = sldSph(); 
     56        dp[3] = sldSolv(); 
     57        dp[4] = 0.0; 
    5658 
    5759        // Get the dispersion points for the radius 
     
    114116        dp.scale = scale(); 
    115117        dp.radius = radius(); 
    116         dp.contrast = contrast(); 
     118        dp.sldSph = sldSph(); 
     119        dp.sldSolv = sldSolv(); 
    117120        dp.background = background(); 
    118121        double rad_out = 0.0; 
  • sansmodels/src/sans/models/c_models/spheroid.cpp

    rc451be9 rf10063e  
    4343        polar_shell    = Parameter(30.0, true); 
    4444        polar_shell.set_min(0.0); 
    45         contrast   = Parameter(1e-6); 
     45        sld_core   = Parameter(2e-6); 
     46        sld_shell  = Parameter(1e-6); 
    4647        sld_solvent = Parameter(6.3e-6); 
    4748        background = Parameter(0.0); 
     
    5859 */ 
    5960double CoreShellEllipsoidModel :: operator()(double q) { 
    60         double dp[8]; 
     61        double dp[9]; 
    6162 
    6263        // Fill parameter array for IGOR library 
     
    6768        dp[3] = equat_shell(); 
    6869        dp[4] = polar_shell(); 
    69         dp[5] = contrast(); 
    70         dp[6] = sld_solvent(); 
    71         dp[7] = 0.0; 
     70        dp[5] = sld_core(); 
     71        dp[6] = sld_shell(); 
     72        dp[7] = sld_solvent(); 
     73        dp[8] = 0.0; 
    7274 
    7375        // Get the dispersion points for the major core 
     
    110112                                        //Un-normalize  by volume 
    111113                                        sum += weights_equat_core[i].weight* weights_polar_core[j].weight * weights_equat_shell[k].weight 
    112                                                 * weights_polar_shell[l].weight * ProlateForm(dp, q) 
     114                                                * weights_polar_shell[l].weight * OblateForm(dp, q) 
    113115                                                * pow(weights_equat_shell[k].value,2)*weights_polar_shell[l].value; 
    114116                                        //Find average volume 
     
    170172        dp.equat_shell = equat_shell(); 
    171173        dp.polar_shell = polar_shell(); 
    172         dp.contrast = contrast(); 
     174        dp.sld_core = sld_core(); 
     175        dp.sld_shell = sld_shell(); 
    173176        dp.sld_solvent = sld_solvent(); 
    174177        dp.background = 0.0; 
Note: See TracChangeset for help on using the changeset viewer.