Ignore:
Timestamp:
Oct 15, 2010 4:43:06 PM (14 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:
2e862a0
Parents:
495c377
Message:

hope this was the last model left to add

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

Legend:

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

    r8f20419d r18f2ca1  
    110110    // Compute the angle btw vector q and the a3 axis 
    111111    cos_val_a3 = a3_x*q_x + a3_y*q_y + a3_z*q_z; 
    112     //alpha = acos(cos_val_a3); 
     112    alpha = acos(cos_val_a3); 
    113113    a3_dot_q = aa*q*cos_val_a3; 
    114114 
    115115    // a1 axis 
    116116    cos_val_a1 = a1_x*q_x + a1_y*q_y; 
    117     a1_dot_q = aa*q*cos_val_a1; 
     117    a1_dot_q = aa*q*cos_val_a1*sin(alpha); 
    118118 
    119119    // a2 axis 
    120     cos_val_a2 = a2_x*q_x + a2_y*q_y; //sin(acos(cos_val_a1)) ; 
    121     a2_dot_q = aa*q*cos_val_a2; 
     120    cos_val_a2 = sin(acos(cos_val_a1));//a2_x*q_x + a2_y*q_y; 
     121    a2_dot_q = aa*q*cos_val_a2*sin(alpha); //aa*q*cos_val_a2 
    122122 
    123123    // The following test should always pass 
  • sansmodels/src/sans/models/c_extensions/capcyl.h

    r339ce67 r18f2ca1  
    77 //[PYTHONCLASS] = CappedCylinderModel 
    88 //[DISP_PARAMS] = rad_cyl,len_cyl,rad_cap,phi,  theta 
    9  //[DESCRIPTION] =<text>Calculates the scattering from a cylinder with spherical 
    10  //                             section end-caps. That is, a sphereocylinder 
     9 //[DESCRIPTION] =<text>Calculates the scattering from a cylinder with spherical section end-caps. 
     10 //                             That is, a sphereocylinder 
    1111 //                             with end caps that have a radius larger than 
    1212 //                             that of the cylinder and the center of the 
  • sansmodels/src/sans/models/c_extensions/fcc.c

    r8f20419d r18f2ca1  
    7777        Da = pars->d_factor*aa; 
    7878        qDa_2 = pow(q*Da,2.0); 
    79         contrast = pars->sldSph - pars->sldSolv; 
     79        //contrast = pars->sldSph - pars->sldSolv; 
    8080 
    8181        latticeScale = 4.0*(4.0/3.0)*Pi*(dp[1]*dp[1]*dp[1])/pow(aa*sqrt(2.0),3.0); 
     
    109109 
    110110    // Compute the angle btw vector q and the a3 axis 
    111     cos_val_a3 = a3_x*q_x + a3_y*q_y;// + a3_z*q_z; 
     111    cos_val_a3 = a3_x*q_x + a3_y*q_y + a3_z*q_z; 
     112    alpha = acos(cos_val_a3); 
    112113    a3_dot_q = aa*q*cos_val_a3; 
    113114 
    114115    // a1 axis 
    115116    cos_val_a1 = a1_x*q_x + a1_y*q_y; 
    116     a1_dot_q = aa*q*cos_val_a1; 
     117    a1_dot_q = aa*q*cos_val_a1*sin(alpha); 
    117118 
    118119    // a2 axis 
    119     cos_val_a2 = a2_x*q_x + a2_y*q_y; //sin(acos(cos_val_a1)) ; 
    120     a2_dot_q = aa*q*cos_val_a2; 
     120    cos_val_a2 = sin(acos(cos_val_a1));//a2_x*q_x + a2_y*q_y; 
     121    a2_dot_q = aa*q*cos_val_a2*sin(alpha); 
    121122 
    122123    // The following test should always pass 
     
    134135 
    135136        // Use SphereForm directly from libigor 
    136         answer = SphereForm_Paracrystal(pars->radius,contrast,q)*Zq; 
     137        answer = SphereForm(dp,q)*Zq; 
    137138 
    138139        //consider scales 
  • sansmodels/src/sans/models/c_extensions/sc.c

    r8f20419d r18f2ca1  
    8989    // Compute the angle btw vector q and the a3 axis 
    9090    cos_val_a3 = a3_x*q_x + a3_y*q_y + a3_z*q_z; 
     91    alpha = acos(cos_val_a3); 
    9192    //alpha = acos(cos_val_a3); 
    9293    a3_dot_q = aa*q*cos_val_a3; 
     
    9697 
    9798    cos_val_a1 = a1_x*q_x + a1_y*q_y; 
    98     a1_dot_q = aa*q*cos_val_a1; 
     99    a1_dot_q = aa*q*cos_val_a1*sin(alpha); 
    99100 
    100101    // a2 axis orientation 
     
    102103    a2_y = sqrt(1.0-sin(pars->theta)*cos(pars->phi))*sin(pars->psi); 
    103104    // a2 axis 
    104     cos_val_a2 =  a2_x*q_x + a2_y*q_y;//sin(acos(cos_val_a1)) ; 
    105     a2_dot_q = aa*q*cos_val_a2; 
     105    cos_val_a2 =  sin(acos(cos_val_a1));//a2_x*q_x + a2_y*q_y; 
     106    a2_dot_q = aa*q*cos_val_a2*sin(alpha); 
    106107 
    107108    // The following test should always pass 
Note: See TracChangeset for help on using the changeset viewer.