Ignore:
Timestamp:
Aug 4, 2009 6:02:28 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:
8dc0b746
Parents:
b341b16
Message:

added 2D and model descpt.

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

Legend:

Unmodified
Added
Removed
  • sansmodels/src/sans/models/c_extensions/lamellarPS.h

    rb4679de r96b59384  
    88 * [PYTHONCLASS] = LamellarPSModel 
    99 * [DISP_PARAMS] = spacing 
    10    [DESCRIPTION] = <text>Calculates the scattered intensity from a lyotropic lamellar phase. 
    11            The intensity (form factor and structure factor) 
    12                 calculated is for lamellae of uniform scattering 
    13                 length density that are randomly distributed in 
    14                 solution (a powder average). The lamellae 
    15                 thickness is polydisperse. The model can also 
     10   [DESCRIPTION] = <text>[Concentrated Lamellar Form Factor] Calculates the scattered 
     11           intensity from a lyotropic lamellar phase. 
     12           The intensity (form factor and structure 
     13           factor)calculated is for lamellae of 
     14           uniform scattering length density that 
     15           are randomly distributed in solution 
     16           (a powder average). The lamellae thickness 
     17                is polydisperse. The model can also 
    1618                be applied to large, multi-lamellar vesicles. 
    1719                No resolution smeared version is included 
     
    2628                scale = scale factor 
    2729</text> 
    28    [FIXED]= spacing.with 
     30   [FIXED]= spacing.width 
    2931   [ORIENTATION_PARAMS]= 
    3032 
  • sansmodels/src/sans/models/c_extensions/lamellarPS_HG.c

    r27a0771 r96b59384  
    1919double lamellarPS_HG_analytical_1D(LamellarPSHGParameters *pars, double q) { 
    2020        double dp[10]; 
    21          
     21 
    2222        // Fill paramater array 
    2323        dp[0] = pars->scale; 
     
    3333 
    3434        // Call library function to evaluate model 
    35         return LamellarPS_HG(dp, q);     
     35        return LamellarPS_HG(dp, q); 
    3636} 
    3737/** 
     
    4242 */ 
    4343double lamellarPS_HG_analytical_2DXY(LamellarPSHGParameters *pars, double qx, double qy) { 
    44         double q; 
    45         q = sqrt(qx*qx+qy*qy); 
    46     return lamellarPS_HG_analytical_2D_scaled(pars, q, qx/q, qy/q); 
    47 }  
     44    return lamellarPS_HG_analytical_1D(pars, sqrt(qx*qx+qy*qy)); 
     45} 
    4846 
    4947 
     
    5654 */ 
    5755double lamellarPS_HG_analytical_2D(LamellarPSHGParameters *pars, double q, double phi) { 
    58     return lamellarPS_HG_analytical_2D_scaled(pars, q, cos(phi), sin(phi)); 
    59 }  
    60          
    61 /** 
    62  * Function to evaluate 2D scattering function 
    63  * @param pars: parameters of the lamellar 
    64  * @param q: q-value 
    65  * @param q_x: q_x / q 
    66  * @param q_y: q_y / q 
    67  * @return: function value 
    68  */ 
    69 double lamellarPS_HG_analytical_2D_scaled(LamellarPSHGParameters *pars, double q, double q_x, double q_y) { 
    70         return 1.0; 
     56    return lamellarPS_HG_analytical_1D(pars, q); 
    7157} 
    72      
    7358 
  • sansmodels/src/sans/models/c_extensions/lamellarPS_HG.h

    r27a0771 r96b59384  
    77/** Structure definition for concentrated lamellar form factor parameters 
    88 * [PYTHONCLASS] = LamellarPSHGModel 
    9  * [DISP_PARAMS] = deltaT,deltaH 
    10    [DESCRIPTION] = <text> Calculates the scattered intensity from a concentrated lamellar phase</text> 
    11    [FIXED]= deltaT.with;deltaH.with 
    12    [ORIENTATION_PARAMS]=  
     9 * [DISP_PARAMS] = deltaT,deltaH,spacing 
     10   [DESCRIPTION] = <text>[Concentrated Lamellar (head+tail) Form Factor]: Calculates the 
     11           intensity from a lyotropic lamellar phase. 
     12           The intensity (form factor and structure factor) 
     13                calculated is for lamellae of two-layer scattering 
     14                length density that are randomly distributed in 
     15                solution (a powder average). The scattering 
     16                length density of the tail region, headgroup 
     17                region, and solvent are taken to be different. 
     18                The model can also be applied to large, 
     19                multi-lamellar vesicles. 
     20                No resolution smeared version is included 
     21                in the structure factor of this model. 
     22                *Parameters: spacing = repeat spacing, 
     23                deltaT = tail length, 
     24                deltaH = headgroup thickness, 
     25                n_plates = # of Lamellar plates 
     26                caille = Caille parameter (<0.8 or <1) 
     27                background = incoherent bgd 
     28                scale = scale factor ... 
     29</text> 
     30   [FIXED]= deltaT.width;deltaH.width;spacing.width 
     31   [ORIENTATION_PARAMS]= 
    1332 
    1433 **/ 
     
    2746    double deltaH; 
    2847    /// scattering density length of tails [1/A²] 
    29     //  [DEFAULT]=sld_tail=4e-7 [1/A²] 
     48    //  [DEFAULT]=sld_tail=0.4e-6 [1/A²] 
    3049    double sld_tail; 
    3150        /// scattering density length of head [1/A²] 
     
    4160    //  [DEFAULT]=caille=0.001 
    4261    double caille; 
    43         /// Incoherent Background [1/cm]  
     62        /// Incoherent Background [1/cm] 
    4463        //  [DEFAULT]=background=0.001 [1/cm] 
    4564        double background; 
    46     
     65 
    4766} LamellarPSHGParameters; 
    4867 
     
    5574double lamellarPS_HG_analytical_2D(LamellarPSHGParameters *pars, double q, double phi); 
    5675double lamellarPS_HG_analytical_2DXY(LamellarPSHGParameters *pars, double qx, double qy); 
    57 double lamellarPS_HG_analytical_2D_scaled(LamellarPSHGParameters *pars, double q, double q_x, double q_y); 
    5876 
    5977#endif 
  • sansmodels/src/sans/models/c_extensions/oblate.c

    r27a0771 r96b59384  
    11/** 
    2  * Scattering model for a oblate 
     2 * Scattering model for a oblate core shell 
    33 * @author: Gervaise B Alina/ UTK 
    44 */ 
     
    1818 */ 
    1919double oblate_analytical_1D(OblateParameters *pars, double q) { 
    20         double dp[10]; 
    21          
     20        double dp[8]; 
     21 
    2222        // Fill paramater array 
    2323        dp[0] = pars->scale; 
     
    2929        dp[6] = pars->sld_solvent; 
    3030        dp[7] = pars->background; 
    31         dp[8] = pars->axis_theta; 
    32         dp[9] = pars->axis_phi; 
    33          
     31 
    3432        // Call library function to evaluate model 
    35         return OblateForm(dp, q);        
     33        return OblateForm(dp, q); 
    3634} 
    3735 
     
    4543        double q; 
    4644        q = sqrt(qx*qx+qy*qy); 
    47     return oblate_analytical_2D_scaled(pars, q, qx/q, qy/q); 
    48 }  
     45    return oblate_analytical_1D(pars, q); 
     46} 
    4947 
    5048 
     
    5755 */ 
    5856double oblate_analytical_2D(OblateParameters *pars, double q, double phi) { 
    59     return oblate_analytical_2D_scaled(pars, q, cos(phi), sin(phi)); 
    60 }  
    61          
     57    return oblate_analytical_1D(pars, q); 
     58} 
     59 
    6260/** 
    6361 * Function to evaluate 2D scattering function 
     
    6866 * @return: function value 
    6967 */ 
     68/* 
    7069double oblate_analytical_2D_scaled(OblateParameters *pars, double q, double q_x, double q_y) { 
    71          
     70 
    7271        return 1.0; 
    7372} 
    74      
     73*/ 
  • sansmodels/src/sans/models/c_extensions/oblate.h

    r27a0771 r96b59384  
    33/** Structure definition for oblate parameters 
    44 * [PYTHONCLASS] = OblateModel 
    5  * [DISP_PARAMS] = major_core, minor_core, major_shell,minor_shell, axis_theta, axis_phi 
    6    [DESCRIPTION] = <text> Calculates the form factor for an oblate ellipsoid particle with a core/shell structure. 
    7                         Note:It is the users' responsibility to ensure that shell radii are larger than core radii, and 
    8                                         that major radii are larger than minor radii.</text> 
     5 * [DISP_PARAMS] = major_core, minor_core, major_shell,minor_shell 
     6   [DESCRIPTION] = <text>[OblateCoreShellModel] Calculates the form factor for an oblate 
     7                        ellipsoid particle with a core_shell structure. 
     8                        The form factor is averaged over all possible 
     9                        orientations of the ellipsoid such that P(q) 
     10                        = scale*<f^2>/Vol + bkg, where f is the 
     11                        single particle scattering amplitude. 
     12                        [Parameters]: 
     13                        major_core = radius of major_core, 
     14                        minor_core = radius of minor_core, 
     15                        major_shell = radius of major_shell, 
     16                        minor_shell = radius of minor_shell, 
     17                        contrast = SLD_core - SLD_shell 
     18                        sld_solvent = SLD_solvent 
     19                        background = Incoherent bkg 
     20                        scale =scale 
     21                        Note:It is the users' responsibility to ensure 
     22                        that shell radii are larger than core radii. 
     23                        </text> 
    924 
    10    [FIXED] = <text>axis_phi.width; axis_theta.width; major_core.width;minor_core.width; major_shell; minor_shell</text> 
    11    [ORIENTATION_PARAMS] = <text>axis_phi; axis_theta; axis_phi.width; axis_theta.width</text> 
     25   [FIXED] = <text>major_core.width;minor_core.width; major_shell.width; minor_shell.width</text> 
     26   [ORIENTATION_PARAMS] = 
    1227 
    1328 **/ 
     
    3752        //  [DEFAULT]=background=0.001 [1/cm] 
    3853        double background; 
     54        /*//Disable for now 
    3955    /// Orientation of the oblate axis w/respect incoming beam [rad] 
    4056    //  [DEFAULT]=axis_theta=1.0 [rad] 
     
    4359    //  [DEFAULT]=axis_phi=1.0 [rad] 
    4460    double axis_phi; 
    45  
     61        */ 
    4662} OblateParameters; 
    4763 
     
    5470double oblate_analytical_2D(OblateParameters *pars, double q, double phi); 
    5571double oblate_analytical_2DXY(OblateParameters *pars, double qx, double qy); 
    56 double oblate_analytical_2D_scaled(OblateParameters *pars, double q, double q_x, double q_y); 
     72//double oblate_analytical_2D_scaled(OblateParameters *pars, double q, double q_x, double q_y); 
    5773 
    5874#endif 
Note: See TracChangeset for help on using the changeset viewer.