Ignore:
Timestamp:
Oct 22, 2010 3:50:05 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:
d7b7156
Parents:
67e258c
Message:

changed the unit of angles into degrees

File:
1 edited

Legend:

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

    r85bb870 r4628e31  
    7373        dp[3] = pars->sldSolv; 
    7474        dp[4] = 0.0; 
     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; 
    7579 
    7680        aa = pars->dnn; 
     
    8589        ///  instead of against q coordinate in PRB 36(46), 3(6), 1754(3854) 
    8690    // b3 axis orientation 
    87     b3_x = sin(pars->theta) * cos(pars->phi);//negative sign here??? 
    88     b3_y = sin(pars->theta) * sin(pars->phi); 
    89     b3_z = cos(pars->theta); 
     91    b3_x = sin(theta) * cos(phi);//negative sign here??? 
     92    b3_y = sin(theta) * sin(phi); 
     93    b3_z = cos(theta); 
    9094    cos_val_b3 =  b3_x*q_x + b3_y*q_y + b3_z*q_z; 
    9195    alpha = acos(cos_val_b3); 
    9296    // b1 axis orientation 
    93     b1_x = sin(pars->psi); 
    94     b1_y = cos(pars->psi); 
     97    b1_x = sin(psi); 
     98    b1_y = cos(psi); 
    9599        cos_val_b1 = (b1_x*q_x + b1_y*q_y); 
    96100    // b2 axis orientation 
Note: See TracChangeset for help on using the changeset viewer.