Ignore:
Timestamp:
Aug 31, 2009 5:25:44 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:
5be36bb
Parents:
572beba
Message:

calculation of the effective radius are added

Location:
sansmodels/src/sans/models/c_extensions
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • sansmodels/src/sans/models/c_extensions/DiamCyl.c

    rcabe74b r5eb9154  
    1616 */ 
    1717double DiamCyld_analytical_1D(DiamCyldParameters *pars, double q) { 
    18         double dp[2]; 
     18        double cylh; 
     19        double cylr; 
    1920 
    20         dp[0] = pars->radius; 
    21         dp[1] = pars->length; 
    22         return DiamCyl(dp, q); 
     21        cylr = pars->radius; 
     22        cylh = pars->length; 
     23        return DiamCyl(cylh, cylr); 
    2324} 
    2425 
  • sansmodels/src/sans/models/c_extensions/DiamEllip.c

    rcabe74b r5eb9154  
    1616 */ 
    1717double DiamEllips_analytical_1D(DiamEllipsParameters *pars, double q) { 
    18         double dp[2]; 
     18        double ell_a, ell_b; 
    1919 
    20         dp[0] = pars->radius_a; 
    21         dp[1] = pars->radius_b; 
    22         return DiamEllip(dp, q); 
     20        ell_a = pars->radius_a; 
     21        ell_b = pars->radius_b; 
     22        return DiamEllip(ell_a, ell_b); 
    2323} 
    2424 
  • sansmodels/src/sans/models/c_extensions/Hardsphere.c

    r25579e8 r5eb9154  
    1111/** 
    1212 * Function to evaluate 1D scattering function 
    13  * @param pars: parameters of the HardsphereStructure  
     13 * @param pars: parameters of the HardsphereStructure 
    1414 * @param q: q-value 
    1515 * @return: function value 
     
    1717double Hardsphere_analytical_1D(HardsphereParameters *pars, double q) { 
    1818        double dp[2]; 
    19          
    20         dp[0] = pars->radius; 
    21         dp[1] = pars->volfraction;       
     19        if (q == 0){ 
     20                return 0.2; 
     21        } 
     22        dp[0] = pars->effect_radius; 
     23        dp[1] = pars->volfraction; 
    2224        return HardSphereStruct(dp, q); 
    2325} 
    24      
     26 
    2527/** 
    2628 * Function to evaluate 2D scattering function 
     
    3436 
    3537double Hardsphere_analytical_2DXY(HardsphereParameters *pars, double qx, double qy){ 
    36         return Hardsphere_analytical_1D(pars,sqrt(qx*qx+qy*qy));         
     38        return Hardsphere_analytical_1D(pars,sqrt(qx*qx+qy*qy)); 
    3739} 
  • sansmodels/src/sans/models/c_extensions/Hardsphere.h

    r1ed3834 r5eb9154  
    66 */ 
    77 //[PYTHONCLASS] = HardsphereStructure 
    8  //[DISP_PARAMS] = radius 
     8 //[DISP_PARAMS] = effect_radius 
    99 //[DESCRIPTION] =<text>Structure factor for interacting particles:                   . 
    1010 // 
     
    1414 //                         = 0     , r >= 2R 
    1515 // 
    16  //                                             R: radius of the Hardsphere particle 
     16 //                                             R: effective radius of the Hardsphere particle 
    1717 //                                             V:The volume fraction 
    1818 // 
     
    2020 //     Rev. 1958, 110, 1. 
    2121 //      </text> 
    22  //[FIXED]= radius.width 
     22 //[FIXED]= effect_radius.width 
    2323 
    2424 
    2525typedef struct { 
    26     /// Radius of hardsphere [A] 
    27     //  [DEFAULT]=radius=50.0 [A] 
    28     double radius; 
     26    /// effect radius of hardsphere [A] 
     27    //  [DEFAULT]=effect_radius=50.0 [A] 
     28    double effect_radius; 
    2929 
    3030    /// Volume fraction 
  • sansmodels/src/sans/models/c_extensions/HayterMSA.c

    r25579e8 r5eb9154  
    11/** 
    2  * SquareWell Structure factor  
     2 * SquareWell Structure factor 
    33 * @author: Jae Hie Cho / UTK 
    44 */ 
     
    1818        double dp[6]; 
    1919 
    20         dp[0] = pars->radius; 
     20        dp[0] = pars->effect_radius; 
    2121        dp[1] = pars->charge; 
    2222        dp[1] = pars->volfraction; 
     
    2424        dp[4] = pars->saltconc; 
    2525        dp[5] = pars->dielectconst; 
    26          
     26 
    2727        return HayterPenfoldMSA(dp, q); 
    2828} 
    29      
     29 
    3030/** 
    3131 * Function to evaluate 2D scattering function 
     
    3939 
    4040double HayterMSA_analytical_2DXY(HayterMSAParameters *pars, double qx, double qy){ 
    41         return HayterMSA_analytical_1D(pars,sqrt(qx*qx+qy*qy));  
     41        return HayterMSA_analytical_1D(pars,sqrt(qx*qx+qy*qy)); 
    4242} 
  • sansmodels/src/sans/models/c_extensions/HayterMSA.h

    r1ed3834 r5eb9154  
    66 */ 
    77 //[PYTHONCLASS] = HayterMSAStructure 
    8  //[DISP_PARAMS] = radius 
     8 //[DISP_PARAMS] = effect_radius 
    99 //[DESCRIPTION] =<text>To calculate the structure factor (the Fourier transform of the 
    1010 //                     pair correlation function g(r)) for a system of 
     
    2222 // 
    2323 //                             </text> 
    24  //[FIXED]= radius.width 
     24 //[FIXED]= effect_radius.width 
    2525 
    2626typedef struct { 
    27     /// Radius of particle [A] 
    28     //  [DEFAULT]=radius=20.75 [A] 
    29     double radius; 
     27    /// effetitve radius of particle [A] 
     28    //  [DEFAULT]=effect_radius=20.75 [A] 
     29    double effect_radius; 
    3030 
    3131    /// charge 
  • sansmodels/src/sans/models/c_extensions/SquareWell.c

    r25579e8 r5eb9154  
    11/** 
    2  * SquareWell Structure factor  
     2 * SquareWell Structure factor 
    33 * @author: Jae Hie Cho / UTK 
    44 */ 
     
    2020        double dp[4]; 
    2121 
    22         dp[0] = pars->radius; 
     22        dp[0] = pars->effect_radius; 
    2323        dp[1] = pars->volfraction; 
    2424        dp[2] = pars->welldepth; 
    2525        dp[3] = pars->wellwidth; 
    26          
     26 
    2727        return SquareWellStruct(dp, q); 
    2828} 
    29      
     29 
    3030/** 
    3131 * Function to evaluate 2D scattering function 
     
    3939 
    4040double SquareWell_analytical_2DXY(SquareWellParameters *pars, double qx, double qy){ 
    41         return SquareWell_analytical_1D(pars,sqrt(qx*qx+qy*qy));         
     41        return SquareWell_analytical_1D(pars,sqrt(qx*qx+qy*qy)); 
    4242} 
  • sansmodels/src/sans/models/c_extensions/SquareWell.h

    r1ed3834 r5eb9154  
    55*/ 
    66//   [PYTHONCLASS] = SquareWellStructure 
    7 //   [DISP_PARAMS] = radius 
     7//   [DISP_PARAMS] = effect_radius 
    88//   [DESCRIPTION] = <text> Structure Factor for interacting particles:             . 
    99// 
     
    1414//                      = 0     , r >= 2Rw 
    1515// 
    16 //              R: radius (A)of the particle 
     16//              R: effective radius (A)of the particle 
    1717//              v: volume fraction 
    1818//              d: well depth 
     
    2323//      K. C., Physica, 1977, 89A, 213. 
    2424//                      </text> 
    25 //   [FIXED]= radius.width 
     25//   [FIXED]= effect_radius.width 
    2626//[ORIENTATION_PARAMS]= <text> </text> 
    2727 
    2828 
    2929typedef struct { 
    30     /// Radius of particle [A] 
    31     //  [DEFAULT]=radius=50.0 [A] 
    32     double radius; 
     30    /// effective radius of particle [A] 
     31    //  [DEFAULT]=effect_radius=50.0 [A] 
     32    double effect_radius; 
    3333 
    3434    /// Volume fraction 
  • sansmodels/src/sans/models/c_extensions/StickyHS.c

    r25579e8 r5eb9154  
    1717double StickyHS_analytical_1D(StickyHSParameters *pars, double q) { 
    1818        double dp[4]; 
    19          
    20         dp[0] = pars->radius; 
    21         dp[1] = pars->volfraction;       
     19 
     20        dp[0] = pars->effect_radius; 
     21        dp[1] = pars->volfraction; 
    2222        dp[2] = pars->perturb; 
    23         dp[3] = pars->stickiness;        
     23        dp[3] = pars->stickiness; 
    2424        return StickyHS_Struct(dp, q); 
    2525} 
    26      
     26 
    2727/** 
    2828 * Function to evaluate 2D scattering function 
     
    3636 
    3737double StickyHS_analytical_2DXY(StickyHSParameters *pars, double qx, double qy){ 
    38         return StickyHS_analytical_1D(pars,sqrt(qx*qx+qy*qy));   
     38        return StickyHS_analytical_1D(pars,sqrt(qx*qx+qy*qy)); 
    3939} 
  • sansmodels/src/sans/models/c_extensions/StickyHS.h

    r1ed3834 r5eb9154  
    66 */ 
    77 //[PYTHONCLASS] = StickyHSStructure 
    8  //[DISP_PARAMS] = radius 
     8 //[DISP_PARAMS] = effect_radius 
    99 //[DESCRIPTION] =<text> Structure Factor for interacting particles:                               . 
    1010 // 
     
    1515 //                         = 0   , r >= 2R +w 
    1616 // 
    17  //                                             R: radius of the hardsphere 
     17 //                                             R: effective radius of the hardsphere 
    1818 //                     stickiness = [exp(Uo/kT)]/(12*perturb) 
    1919 //                     perturb = w/(w+ 2R) , 0.01 =< w <= 0.1 
     
    2424 //                      Phys., 1991, 95(12), 9186-9190. 
    2525 //                             </text> 
    26  //[FIXED]= radius.width 
     26 //[FIXED]= effect_radius.width 
    2727typedef struct { 
    28     /// Radius of hardsphere [A] 
    29     //  [DEFAULT]=radius=50.0 [A] 
    30     double radius; 
     28    /// effect radius of hardsphere [A] 
     29    //  [DEFAULT]=effect_radius=50.0 [A] 
     30    double effect_radius; 
    3131 
    3232    /// Volume fraction 
  • sansmodels/src/sans/models/c_extensions/multishell.h

    r2cc633b r5eb9154  
    77        [PYTHONCLASS] = MultiShellModel 
    88        [DISP_PARAMS] = core_radius, s_thickness, w_thickness 
    9         [DESCRIPTION] =<text>Model parameters: 
     9        [DESCRIPTION] =<text> MultiShell (Sphere) Model (or Multilamellar Vesicles): Model parameters; 
    1010                                scale : scale factor 
    1111                                core_radius : Core radius of the multishell 
  • sansmodels/src/sans/models/c_extensions/spheroid.h

    reddff027 r5eb9154  
    1414                        polar_core = polar radius of core, 
    1515                        equat_shell = equatorial radius of shell, 
    16                         polar_shell = polar radius of shell, 
     16                        polar_shell = polar radius (revolution axis) of shell, 
    1717                        contrast = SLD_core - SLD_shell 
    1818                        sld_solvent = SLD_solvent 
     
    2121                        Note:It is the users' responsibility to ensure 
    2222                        that shell radii are larger than core radii. 
    23                         oblate shell: equatorial radius > polar radius 
    24                         prolate shell: equatorial radius < polar radius 
     23                        oblate: polar radius < equatorial radius 
     24                        prolate :  polar radius > equatorial radius 
    2525                        </text> 
    2626 
Note: See TracChangeset for help on using the changeset viewer.