Changeset 4628e31 in sasview for sansmodels/src/sans/models/c_extensions/sc.c
- Timestamp:
- Oct 22, 2010 5:50:05 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:
- d7b7156
- Parents:
- 67e258c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/c_extensions/sc.c
r18f2ca1 r4628e31 73 73 dp[4] = 0.0; 74 74 75 //convert angle degree to radian 76 double theta = pars->theta * Pi/180.0; 77 double phi = pars->phi * Pi/180.0; 78 double psi = pars->psi * Pi/180.0; 79 75 80 aa = pars->dnn; 76 81 Da = pars->d_factor*aa; … … 80 85 /// Angles here are respect to detector coordinate instead of against q coordinate(PRB 36, 3, 1754) 81 86 // a3 axis orientation 82 a3_x = sin( pars->theta) * cos(pars->phi);//negative sign here???83 a3_y = sin( pars->theta) * sin(pars->phi);84 a3_z = cos( pars->theta);87 a3_x = sin(theta) * cos(phi);//negative sign here??? 88 a3_y = sin(theta) * sin(phi); 89 a3_z = cos(theta); 85 90 86 91 // q vector … … 93 98 a3_dot_q = aa*q*cos_val_a3; 94 99 // a1 axis orientation 95 a1_x = sin(p ars->psi);96 a1_y = cos(p ars->psi);100 a1_x = sin(psi); 101 a1_y = cos(psi); 97 102 98 103 cos_val_a1 = a1_x*q_x + a1_y*q_y; … … 100 105 101 106 // a2 axis orientation 102 a2_x = sqrt(1.0-sin( pars->theta)*cos(pars->phi))*cos(pars->psi);103 a2_y = sqrt(1.0-sin( pars->theta)*cos(pars->phi))*sin(pars->psi);107 a2_x = sqrt(1.0-sin(theta)*cos(phi))*cos(psi); 108 a2_y = sqrt(1.0-sin(theta)*cos(phi))*sin(psi); 104 109 // a2 axis 105 110 cos_val_a2 = sin(acos(cos_val_a1));//a2_x*q_x + a2_y*q_y;
Note: See TracChangeset
for help on using the changeset viewer.