Ignore:
Timestamp:
Aug 4, 2009 3:32:38 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:
fbe5d3e
Parents:
8e91f01
Message:

added 2d and model descpt + correction on polydisp. para.

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

Legend:

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

    r34c3020 rb4679de  
    1919double lamellarFF_HG_analytical_1D(LamellarFF_HGParameters *pars, double q) { 
    2020        double dp[7]; 
    21          
     21 
    2222        // Fill paramater array 
    2323        dp[0] = pars->scale; 
     
    2828        dp[5] = pars->sld_solvent; 
    2929        dp[6] = pars->background; 
    30          
     30 
    3131        // Call library function to evaluate model 
    32         return LamellarFF_HG(dp, q);     
     32        return LamellarFF_HG(dp, q); 
    3333} 
    3434 
    3535double lamellarFF_HG_analytical_2D(LamellarFF_HGParameters *pars, double q, double phi){ 
    36         return 1.0; 
     36        return lamellarFF_HG_analytical_1D(pars,q); 
    3737} 
    3838double lamellarFF_HG_analytical_2DXY(LamellarFF_HGParameters *pars, double qx, double qy){ 
    39         return 1.0; 
     39        return lamellarFF_HG_analytical_1D(pars,sqrt(qx*qx+qy*qy)); 
    4040} 
    41 double lamellarFF_HG_analytical_2D_scaled(LamellarFF_HGParameters *pars, double q, double q_x, double q_y){ 
    42         return 1.0; 
    43 } 
    44  
  • sansmodels/src/sans/models/c_extensions/lamellarFF_HG.h

    r34c3020 rb4679de  
    44 * [PYTHONCLASS] = LamellarFFHGModel 
    55 * [DISP_PARAMS] =  t_length, h_thickness 
    6    [DESCRIPTION] = <text>  
    7                                         NOTE: The total bilayer thickness = 2(h_thickness + t_length) 
    8                                         The meaning of the multiplicative scale factor is not well-defined, but should be on the 
    9                                         order of the volume fraction of solution occupied by the lamellar crystallites. Please see 
    10                                         the original references for clarification. 
    11                                    </text> 
     6   [DESCRIPTION] = <text> Parameters: t_length = tail length, h_thickness = head thickness, 
     7                        scale = Scale factor, 
     8                        background = incoherent Background 
     9                        sld_tail = tail scattering length density , 
     10                        sld_solvent = solvent scattering length density. 
     11                        NOTE: The total bilayer thickness 
     12                        = 2(h_thickness+ t_length). 
     13 
     14        </text> 
    1215        [FIXED]= t_length.width, h_thickness.width 
    13         [ORIENTATION_PARAMS]=  
     16        [ORIENTATION_PARAMS]= 
    1417 **/ 
    1518typedef struct { 
     
    2023    //  [DEFAULT]=t_length=15.0 [A] 
    2124    double t_length; 
    22     /// head thickness  
     25    /// head thickness 
    2326    //  [DEFAULT]=h_thickness=10.0 [A] 
    2427    double h_thickness; 
    25         /// tail scrattering density length[1/A²] 
     28        /// tail scrattering length density[1/A²] 
    2629    //  [DEFAULT]=sld_tail=4e-7 [1/A²] 
    2730    double sld_tail; 
    28     /// head group scrattering density length[1/A²] 
     31    /// head group scrattering length density[1/A²] 
    2932    //  [DEFAULT]=sld_head=3e-6 [1/A²] 
    3033    double sld_head; 
    31          /// solvent scrattering density length[1/A²] 
     34         /// solvent scrattering length density[1/A²] 
    3235    //  [DEFAULT]=sld_solvent=6e-6 [1/A²] 
    3336    double sld_solvent; 
     
    3538        //  [DEFAULT]=background=0.0 [1/cm] 
    3639        double background; 
    37     
     40 
    3841} LamellarFF_HGParameters; 
    3942 
     
    4649double lamellarFF_HG_analytical_2D(LamellarFF_HGParameters *pars, double q, double phi); 
    4750double lamellarFF_HG_analytical_2DXY(LamellarFF_HGParameters *pars, double qx, double qy); 
    48 double lamellarFF_HG_analytical_2D_scaled(LamellarFF_HGParameters *pars, double q, double q_x, double q_y); 
    4951 
    5052#endif 
  • sansmodels/src/sans/models/c_extensions/lamellarPS.c

    r27a0771 rb4679de  
    1919double lamellarPS_analytical_1D(LamellarPSParameters *pars, double q) { 
    2020        double dp[8]; 
    21          
     21 
    2222        // Fill paramater array 
    2323        dp[0] = pars->scale; 
     
    3131 
    3232        // Call library function to evaluate model 
    33         return LamellarPS(dp, q);        
     33        return LamellarPS(dp, q); 
    3434} 
    3535/** 
     
    4242        double q; 
    4343        q = sqrt(qx*qx+qy*qy); 
    44     return lamellarPS_analytical_2D_scaled(pars, q, qx/q, qy/q); 
    45 }  
     44    return lamellarPS_analytical_1D(pars, q); 
     45} 
    4646 
    4747 
     
    5454 */ 
    5555double lamellarPS_analytical_2D(LamellarPSParameters *pars, double q, double phi) { 
    56     return lamellarPS_analytical_2D_scaled(pars, q, cos(phi), sin(phi)); 
    57 }  
    58          
     56    return lamellarPS_analytical_1D(pars,q); 
     57} 
     58 
    5959/** 
    6060 * Function to evaluate 2D scattering function 
     
    6565 * @return: function value 
    6666 */ 
    67 double lamellarPS_analytical_2D_scaled(LamellarPSParameters *pars, double q, double q_x, double q_y) { 
    68          
    69         return 1.0; 
    70 } 
    71      
    7267 
     68 
  • sansmodels/src/sans/models/c_extensions/lamellarPS.h

    r27a0771 rb4679de  
    77/** Structure definition for concentrated lamellar form factor parameters 
    88 * [PYTHONCLASS] = LamellarPSModel 
    9  * [DISP_PARAMS] = delta 
    10    [DESCRIPTION] = <text> Calculates the scattered intensity from a lyotropic lamellar phase</text> 
    11    [FIXED]= delta.with 
    12    [ORIENTATION_PARAMS]=  
     9 * [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 
     16                be applied to large, multi-lamellar vesicles. 
     17                No resolution smeared version is included 
     18                in the structure factor of this model. 
     19                *Parameters: spacing = repeat spacing, 
     20                delta = bilayer thickness, 
     21                sigma = variation in bilayer thickness 
     22                contrast = SLD_solvent - SLD_bilayer 
     23                n_plate = # of Lamellar plates 
     24                caille = Caille parameter (<0.8 or <1) 
     25                background = incoherent bgd 
     26                scale = scale factor 
     27</text> 
     28   [FIXED]= spacing.with 
     29   [ORIENTATION_PARAMS]= 
    1330 
    1431 **/ 
     
    3552    //  [DEFAULT]=caille=0.1 
    3653    double caille; 
    37         /// Incoherent Background [1/cm]  
     54        /// Incoherent Background [1/cm] 
    3855        //  [DEFAULT]=background=0.0 [1/cm] 
    3956        double background; 
    40     
     57 
    4158} LamellarPSParameters; 
    4259 
     
    4966double lamellarPS_analytical_2D(LamellarPSParameters *pars, double q, double phi); 
    5067double lamellarPS_analytical_2DXY(LamellarPSParameters *pars, double qx, double qy); 
    51 double lamellarPS_analytical_2D_scaled(LamellarPSParameters *pars, double q, double q_x, double q_y); 
    5268 
    5369#endif 
Note: See TracChangeset for help on using the changeset viewer.