Changeset dd71228 in sasmodels


Ignore:
Timestamp:
Apr 19, 2016 9:12:41 AM (9 years ago)
Author:
wojciech
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
cebbb5a
Parents:
7c20ba0
Message:

ER fucntion corected

Location:
sasmodels/models
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/spherical_sld.c

    r7c20ba0 rdd71228  
    140140                            fun = sign * 3.0 * r * 
    141141                            (2.0*qr*sinqr - (qrsq-2.0)*cosqr)/(qrsq * qrsq); 
    142                             // In the onioon model Jae-He's formula is rederived 
     142                            // In the onion model Jae-He's formula is rederived 
    143143                            // and gives following: 
    144144                            //fun = 3.0 * sign * r * 
     
    185185    double nu_inter[] ) { 
    186186 
    187     //printf("Number of points %d\n",npts_inter); 
    188     double intensity; 
    189     //TODO: Remove this container at later stage. 
    190     /*double dp[60]; 
    191     dp[0] = n_shells; 
    192     //This is scale will also have to be removed at some stage 
    193     dp[1] = 1.0; 
    194     dp[2] = thick_inter0; 
    195     dp[3] = func_inter0; 
    196     dp[4] = sld_core; 
    197     dp[5] = sld_solvent; 
    198     dp[6] = 0.0; 
    199  
    200     for (int i=0; i<n_shells; i++){ 
    201         dp[i+7] = sld_flat[i]; 
    202         dp[i+17] = thick_inter[i]; 
    203         dp[i+27] = thick_flat[i]; 
    204         dp[i+37] = func_inter[i]; 
    205         dp[i+47] = nu_inter[i]; 
    206     } 
    207  
    208     dp[57] = npts_inter; 
    209     dp[58] = nu_inter0; 
    210     dp[59] = radius_core; 
    211     */ 
    212     intensity = sphere_sld_kernel(q, n_shells, npts_inter, radius_core, 
     187    double intensity = sphere_sld_kernel(q, n_shells, npts_inter, radius_core, 
    213188                sld_core, sld_solvent, func_inter0, thick_inter0, nu_inter0, 
    214189                sld_flat, thick_flat, func_inter, thick_inter, nu_inter); 
    215     //intensity *=1.0e-4; 
    216     //printf("%10d\n",intensity); 
     190 
    217191    return intensity; 
    218192} 
  • sasmodels/models/spherical_sld.py

    raf0e70c rdd71228  
    282282    return np.asarray(z), np.asarray(beta)*1e-6 
    283283 
    284 #TODO: Not quite right I suppose 
    285 def ER(n_shells, radius_core, thick_inter): 
    286     return np.sum(thick_inter[:n_shells], axis=0) + radius_core 
    287  
    288 def VR(core_radius, n, thickness): 
    289     return 1.0, 1.0 
     284def ER(n_shells, radius_core, thick_inter0, thick_inter, thick_flat): 
     285    total_thickness = thick_inter0 
     286    total_thickness += np.sum(thick_inter[:n_shells], axis=0) 
     287    total_thickness += np.sum(thick_flat[:n_shells], axis=0) 
     288    return total_thickness + radius_core 
    290289 
    291290 
Note: See TracChangeset for help on using the changeset viewer.