Changeset 18f2ca1 in sasview for sansmodels/src/sans/models/c_extensions
- Timestamp:
- Oct 15, 2010 4:43:06 PM (14 years ago)
- 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
- 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 110 110 // Compute the angle btw vector q and the a3 axis 111 111 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); 113 113 a3_dot_q = aa*q*cos_val_a3; 114 114 115 115 // a1 axis 116 116 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); 118 118 119 119 // 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 122 122 123 123 // The following test should always pass -
sansmodels/src/sans/models/c_extensions/capcyl.h
r339ce67 r18f2ca1 7 7 //[PYTHONCLASS] = CappedCylinderModel 8 8 //[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 sphereocylinder9 //[DESCRIPTION] =<text>Calculates the scattering from a cylinder with spherical section end-caps. 10 // That is, a sphereocylinder 11 11 // with end caps that have a radius larger than 12 12 // that of the cylinder and the center of the -
sansmodels/src/sans/models/c_extensions/fcc.c
r8f20419d r18f2ca1 77 77 Da = pars->d_factor*aa; 78 78 qDa_2 = pow(q*Da,2.0); 79 contrast = pars->sldSph - pars->sldSolv;79 //contrast = pars->sldSph - pars->sldSolv; 80 80 81 81 latticeScale = 4.0*(4.0/3.0)*Pi*(dp[1]*dp[1]*dp[1])/pow(aa*sqrt(2.0),3.0); … … 109 109 110 110 // 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); 112 113 a3_dot_q = aa*q*cos_val_a3; 113 114 114 115 // a1 axis 115 116 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); 117 118 118 119 // 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); 121 122 122 123 // The following test should always pass … … 134 135 135 136 // Use SphereForm directly from libigor 136 answer = SphereForm _Paracrystal(pars->radius,contrast,q)*Zq;137 answer = SphereForm(dp,q)*Zq; 137 138 138 139 //consider scales -
sansmodels/src/sans/models/c_extensions/sc.c
r8f20419d r18f2ca1 89 89 // Compute the angle btw vector q and the a3 axis 90 90 cos_val_a3 = a3_x*q_x + a3_y*q_y + a3_z*q_z; 91 alpha = acos(cos_val_a3); 91 92 //alpha = acos(cos_val_a3); 92 93 a3_dot_q = aa*q*cos_val_a3; … … 96 97 97 98 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); 99 100 100 101 // a2 axis orientation … … 102 103 a2_y = sqrt(1.0-sin(pars->theta)*cos(pars->phi))*sin(pars->psi); 103 104 // 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); 106 107 107 108 // The following test should always pass
Note: See TracChangeset
for help on using the changeset viewer.