Changeset 4628e31 in sasview for sansmodels/src/sans/models


Ignore:
Timestamp:
Oct 22, 2010 5: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

Location:
sansmodels/src/sans/models
Files:
66 edited

Legend:

Unmodified
Added
Removed
  • sansmodels/src/sans/models/BCCrystalModel.py

    rd5b6a9d r4628e31  
    4343         sldSolv         = 6.3e-006 [1/A^(2)] 
    4444         background      = 0.0 [1/cm] 
    45          theta           = 0.0 [rad] 
    46          phi             = 0.0 [rad] 
    47          psi             = 0.0 [rad] 
     45         theta           = 0.0 [deg] 
     46         phi             = 0.0 [deg] 
     47         psi             = 0.0 [deg] 
    4848 
    4949    """ 
     
    8787        self.details['sldSolv'] = ['[1/A^(2)]', None, None] 
    8888        self.details['background'] = ['[1/cm]', None, None] 
    89         self.details['theta'] = ['[rad]', None, None] 
    90         self.details['phi'] = ['[rad]', None, None] 
    91         self.details['psi'] = ['[rad]', None, None] 
     89        self.details['theta'] = ['[deg]', None, None] 
     90        self.details['phi'] = ['[deg]', None, None] 
     91        self.details['psi'] = ['[deg]', None, None] 
    9292 
    9393        ## fittable parameters 
  • sansmodels/src/sans/models/BarBellModel.py

    r339ce67 r4628e31  
    4343         sld_solv        = 6.3e-006 [1/A^(2)] 
    4444         background      = 0.0 [1/cm] 
    45          theta           = 0.0 [rad] 
    46          phi             = 0.0 [rad] 
     45         theta           = 0.0 [deg] 
     46         phi             = 0.0 [deg] 
    4747 
    4848    """ 
     
    8686        self.details['sld_solv'] = ['[1/A^(2)]', None, None] 
    8787        self.details['background'] = ['[1/cm]', None, None] 
    88         self.details['theta'] = ['[rad]', None, None] 
    89         self.details['phi'] = ['[rad]', None, None] 
     88        self.details['theta'] = ['[deg]', None, None] 
     89        self.details['phi'] = ['[deg]', None, None] 
    9090 
    9191        ## fittable parameters 
  • sansmodels/src/sans/models/CSParallelepipedModel.py

    r18f2ca1 r4628e31  
    4949         sld_solv        = 6e-006 [1/A^(2)] 
    5050         background      = 0.06 [1/cm] 
    51          parallel_theta  = 0.0 [rad] 
    52          parallel_phi    = 0.0 [rad] 
    53          parallel_psi    = 0.0 [rad] 
     51         parallel_theta  = 0.0 [deg] 
     52         parallel_phi    = 0.0 [deg] 
     53         parallel_psi    = 0.0 [deg] 
    5454 
    5555    """ 
     
    9595        self.details['sld_solv'] = ['[1/A^(2)]', None, None] 
    9696        self.details['background'] = ['[1/cm]', None, None] 
    97         self.details['parallel_theta'] = ['[rad]', None, None] 
    98         self.details['parallel_phi'] = ['[rad]', None, None] 
    99         self.details['parallel_psi'] = ['[rad]', None, None] 
     97        self.details['parallel_theta'] = ['[deg]', None, None] 
     98        self.details['parallel_phi'] = ['[deg]', None, None] 
     99        self.details['parallel_psi'] = ['[deg]', None, None] 
    100100 
    101101        ## fittable parameters 
  • sansmodels/src/sans/models/CappedCylinderModel.py

    r18f2ca1 r4628e31  
    4343         sld_solv        = 6.3e-006 [1/A^(2)] 
    4444         background      = 0.0 [1/cm] 
    45          theta           = 0.0 [rad] 
    46          phi             = 0.0 [rad] 
     45         theta           = 0.0 [deg] 
     46         phi             = 0.0 [deg] 
    4747 
    4848    """ 
     
    8484        self.details['sld_solv'] = ['[1/A^(2)]', None, None] 
    8585        self.details['background'] = ['[1/cm]', None, None] 
    86         self.details['theta'] = ['[rad]', None, None] 
    87         self.details['phi'] = ['[rad]', None, None] 
     86        self.details['theta'] = ['[deg]', None, None] 
     87        self.details['phi'] = ['[deg]', None, None] 
    8888 
    8989        ## fittable parameters 
  • sansmodels/src/sans/models/CoreShellCylinderModel.py

    r35aface r4628e31  
    4444         solvent_sld     = 1e-006 [1/A^(2)] 
    4545         background      = 0.0 [1/cm] 
    46          axis_theta      = 1.57 [rad] 
    47          axis_phi        = 0.0 [rad] 
     46         axis_theta      = 90.0 [deg] 
     47         axis_phi        = 0.0 [deg] 
    4848 
    4949    """ 
     
    9494        self.details['solvent_sld'] = ['[1/A^(2)]', None, None] 
    9595        self.details['background'] = ['[1/cm]', None, None] 
    96         self.details['axis_theta'] = ['[rad]', None, None] 
    97         self.details['axis_phi'] = ['[rad]', None, None] 
     96        self.details['axis_theta'] = ['[deg]', None, None] 
     97        self.details['axis_phi'] = ['[deg]', None, None] 
    9898 
    9999        ## fittable parameters 
  • sansmodels/src/sans/models/CoreShellEllipsoidModel.py

    r35aface r4628e31  
    4545         sld_solvent     = 6.3e-006 [1/A^(2)] 
    4646         background      = 0.001 [1/cm] 
    47          axis_theta      = 0.0 [rad] 
    48          axis_phi        = 0.0 [rad] 
     47         axis_theta      = 0.0 [deg] 
     48         axis_phi        = 0.0 [deg] 
    4949 
    5050    """ 
     
    9292        self.details['sld_solvent'] = ['[1/A^(2)]', None, None] 
    9393        self.details['background'] = ['[1/cm]', None, None] 
    94         self.details['axis_theta'] = ['[rad]', None, None] 
    95         self.details['axis_phi'] = ['[rad]', None, None] 
     94        self.details['axis_theta'] = ['[deg]', None, None] 
     95        self.details['axis_phi'] = ['[deg]', None, None] 
    9696 
    9797        ## fittable parameters 
  • sansmodels/src/sans/models/CylinderModel.py

    r35aface r4628e31  
    4242         sldSolv         = 1e-006 [1/A^(2)] 
    4343         background      = 0.0 [1/cm] 
    44          cyl_theta       = 1.0 [rad] 
    45          cyl_phi         = 1.0 [rad] 
     44         cyl_theta       = 60.0 [deg] 
     45         cyl_phi         = 60.0 [deg] 
    4646 
    4747    """ 
     
    7979        self.details['sldSolv'] = ['[1/A^(2)]', None, None] 
    8080        self.details['background'] = ['[1/cm]', None, None] 
    81         self.details['cyl_theta'] = ['[rad]', None, None] 
    82         self.details['cyl_phi'] = ['[rad]', None, None] 
     81        self.details['cyl_theta'] = ['[deg]', None, None] 
     82        self.details['cyl_phi'] = ['[deg]', None, None] 
    8383 
    8484        ## fittable parameters 
  • sansmodels/src/sans/models/EllipsoidModel.py

    r35aface r4628e31  
    4242         sldSolv         = 1e-006 [1/A^(2)] 
    4343         background      = 0.0 [1/cm] 
    44          axis_theta      = 1.57 [rad] 
    45          axis_phi        = 0.0 [rad] 
     44         axis_theta      = 90.0 [deg] 
     45         axis_phi        = 0.0 [deg] 
    4646 
    4747    """ 
     
    8383        self.details['sldSolv'] = ['[1/A^(2)]', None, None] 
    8484        self.details['background'] = ['[1/cm]', None, None] 
    85         self.details['axis_theta'] = ['[rad]', None, None] 
    86         self.details['axis_phi'] = ['[rad]', None, None] 
     85        self.details['axis_theta'] = ['[deg]', None, None] 
     86        self.details['axis_phi'] = ['[deg]', None, None] 
    8787 
    8888        ## fittable parameters 
  • sansmodels/src/sans/models/EllipticalCylinderModel.py

    r35aface r4628e31  
    4343         sldSolv         = 1e-006 [1/A^(2)] 
    4444         background      = 0.0 [1/cm] 
    45          cyl_theta       = 1.57 [rad] 
    46          cyl_phi         = 0.0 [rad] 
    47          cyl_psi         = 0.0 [rad] 
     45         cyl_theta       = 90.0 [deg] 
     46         cyl_phi         = 0.0 [deg] 
     47         cyl_psi         = 0.0 [deg] 
    4848 
    4949    """ 
     
    7575        self.details['sldSolv'] = ['[1/A^(2)]', None, None] 
    7676        self.details['background'] = ['[1/cm]', None, None] 
    77         self.details['cyl_theta'] = ['[rad]', None, None] 
    78         self.details['cyl_phi'] = ['[rad]', None, None] 
    79         self.details['cyl_psi'] = ['[rad]', None, None] 
     77        self.details['cyl_theta'] = ['[deg]', None, None] 
     78        self.details['cyl_phi'] = ['[deg]', None, None] 
     79        self.details['cyl_psi'] = ['[deg]', None, None] 
    8080 
    8181        ## fittable parameters 
  • sansmodels/src/sans/models/FCCrystalModel.py

    rd5b6a9d r4628e31  
    4343         sldSolv         = 6.3e-006 [1/A^(2)] 
    4444         background      = 0.0 [1/cm] 
    45          theta           = 0.0 [rad] 
    46          phi             = 0.0 [rad] 
    47          psi             = 0.0 [rad] 
     45         theta           = 0.0 [deg] 
     46         phi             = 0.0 [deg] 
     47         psi             = 0.0 [deg] 
    4848 
    4949    """ 
     
    8787        self.details['sldSolv'] = ['[1/A^(2)]', None, None] 
    8888        self.details['background'] = ['[1/cm]', None, None] 
    89         self.details['theta'] = ['[rad]', None, None] 
    90         self.details['phi'] = ['[rad]', None, None] 
    91         self.details['psi'] = ['[rad]', None, None] 
     89        self.details['theta'] = ['[deg]', None, None] 
     90        self.details['phi'] = ['[deg]', None, None] 
     91        self.details['psi'] = ['[deg]', None, None] 
    9292 
    9393        ## fittable parameters 
  • sansmodels/src/sans/models/HollowCylinderModel.py

    r35aface r4628e31  
    4343         sldSolv         = 1e-006 [1/A^(2)] 
    4444         background      = 0.01 [1/cm] 
    45          axis_theta      = 1.57 [rad] 
    46          axis_phi        = 0.0 [rad] 
     45         axis_theta      = 90.0 [deg] 
     46         axis_phi        = 0.0 [deg] 
    4747 
    4848    """ 
     
    7575        self.details['sldSolv'] = ['[1/A^(2)]', None, None] 
    7676        self.details['background'] = ['[1/cm]', None, None] 
    77         self.details['axis_theta'] = ['[rad]', None, None] 
    78         self.details['axis_phi'] = ['[rad]', None, None] 
     77        self.details['axis_theta'] = ['[deg]', None, None] 
     78        self.details['axis_phi'] = ['[deg]', None, None] 
    7979 
    8080        ## fittable parameters 
  • sansmodels/src/sans/models/OblateModel.py

    r35aface r4628e31  
    4444         sld_solvent     = 6.3e-006 [1/A^(2)] 
    4545         background      = 0.001 [1/cm] 
    46          axis_theta      = 1.0 [rad] 
    47          axis_phi        = 1.0 [rad] 
     46         axis_theta      = 57.325 [deg] 
     47         axis_phi        = 57.325 [deg] 
    4848 
    4949    """ 
     
    8787        self.details['sld_solvent'] = ['[1/A^(2)]', None, None] 
    8888        self.details['background'] = ['[1/cm]', None, None] 
    89         self.details['axis_theta'] = ['[rad]', None, None] 
    90         self.details['axis_phi'] = ['[rad]', None, None] 
     89        self.details['axis_theta'] = ['[deg]', None, None] 
     90        self.details['axis_phi'] = ['[deg]', None, None] 
    9191 
    9292        ## fittable parameters 
  • sansmodels/src/sans/models/ParallelepipedModel.py

    r35aface r4628e31  
    4343         sldSolv         = 1e-006 [1/A^(2)] 
    4444         background      = 0.0 [1/cm] 
    45          parallel_theta  = 0.0 [rad] 
    46          parallel_phi    = 0.0 [rad] 
    47          parallel_psi    = 0.0 [rad] 
     45         parallel_theta  = 0.0 [deg] 
     46         parallel_phi    = 0.0 [deg] 
     47         parallel_psi    = 0.0 [deg] 
    4848 
    4949    """ 
     
    7878        self.details['sldSolv'] = ['[1/A^(2)]', None, None] 
    7979        self.details['background'] = ['[1/cm]', None, None] 
    80         self.details['parallel_theta'] = ['[rad]', None, None] 
    81         self.details['parallel_phi'] = ['[rad]', None, None] 
    82         self.details['parallel_psi'] = ['[rad]', None, None] 
     80        self.details['parallel_theta'] = ['[deg]', None, None] 
     81        self.details['parallel_phi'] = ['[deg]', None, None] 
     82        self.details['parallel_psi'] = ['[deg]', None, None] 
    8383 
    8484        ## fittable parameters 
  • sansmodels/src/sans/models/SCCrystalModel.py

    rd5b6a9d r4628e31  
    4343         sldSolv         = 6.3e-006 [1/A^(2)] 
    4444         background      = 0.0 [1/cm] 
    45          theta           = 0.0 [rad] 
    46          phi             = 0.0 [rad] 
    47          psi             = 0.0 [rad] 
     45         theta           = 0.0 [deg] 
     46         phi             = 0.0 [deg] 
     47         psi             = 0.0 [deg] 
    4848 
    4949    """ 
     
    8787        self.details['sldSolv'] = ['[1/A^(2)]', None, None] 
    8888        self.details['background'] = ['[1/cm]', None, None] 
    89         self.details['theta'] = ['[rad]', None, None] 
    90         self.details['phi'] = ['[rad]', None, None] 
    91         self.details['psi'] = ['[rad]', None, None] 
     89        self.details['theta'] = ['[deg]', None, None] 
     90        self.details['phi'] = ['[deg]', None, None] 
     91        self.details['psi'] = ['[deg]', None, None] 
    9292 
    9393        ## fittable parameters 
  • sansmodels/src/sans/models/TriaxialEllipsoidModel.py

    r35aface r4628e31  
    4343         sldSolv         = 6.3e-006 [1/A^(2)] 
    4444         background      = 0.0 [1/cm] 
    45          axis_theta      = 1.0 [rad] 
    46          axis_phi        = 1.0 [rad] 
    47          axis_psi        = 0.0 [rad] 
     45         axis_theta      = 57.325 [deg] 
     46         axis_phi        = 57.325 [deg] 
     47         axis_psi        = 0.0 [deg] 
    4848 
    4949    """ 
     
    7272        self.details['sldSolv'] = ['[1/A^(2)]', None, None] 
    7373        self.details['background'] = ['[1/cm]', None, None] 
    74         self.details['axis_theta'] = ['[rad]', None, None] 
    75         self.details['axis_phi'] = ['[rad]', None, None] 
    76         self.details['axis_psi'] = ['[rad]', None, None] 
     74        self.details['axis_theta'] = ['[deg]', None, None] 
     75        self.details['axis_phi'] = ['[deg]', None, None] 
     76        self.details['axis_psi'] = ['[deg]', None, None] 
    7777 
    7878        ## fittable parameters 
  • sansmodels/src/sans/models/c_extensions/barbell.c

    r339ce67 r4628e31  
    142142        dp[6] = pars->background; 
    143143 
     144        //convert angle degree to radian 
     145        double pi = 4.0*atan(1.0); 
     146        double theta = pars->theta * pi/180.0; 
     147        double phi = pars->phi * pi/180.0; 
    144148 
    145149        //double Pi = 4.0*atan(1.0); 
    146150    // Cylinder orientation 
    147     cyl_x = sin(pars->theta) * cos(pars->phi); 
    148     cyl_y = sin(pars->theta) * sin(pars->phi); 
    149     cyl_z = cos(pars->theta); 
     151    cyl_x = sin(theta) * cos(phi); 
     152    cyl_y = sin(theta) * sin(phi); 
     153    cyl_z = cos(theta); 
    150154 
    151155    // q vector 
  • sansmodels/src/sans/models/c_extensions/barbell.h

    r339ce67 r4628e31  
    5858        double background; 
    5959 
    60     /// Angle of the main axis against z-axis in detector plane [rad] 
    61     //  [DEFAULT]=theta=0.0 [rad] 
     60    /// Angle of the main axis against z-axis in detector plane [deg] 
     61    //  [DEFAULT]=theta=0.0 [deg] 
    6262    double theta; 
    63     /// Azimuthal angle around z-axis in detector plane [rad] 
    64     //  [DEFAULT]=phi=0.0 [rad] 
     63    /// Azimuthal angle around z-axis in detector plane [deg] 
     64    //  [DEFAULT]=phi=0.0 [deg] 
    6565    double phi; 
    6666 
  • sansmodels/src/sans/models/c_extensions/bcc.c

    r85bb870 r4628e31  
    7474        dp[4] = 0.0; 
    7575 
     76        //convert angle degree to radian 
     77        double pi = 4.0*atan(1.0); 
     78        double theta = pars->theta * pi/180.0; 
     79        double phi = pars->phi * pi/180.0; 
     80        double psi = pars->psi * pi/180.0; 
     81 
    7682        aa = pars->dnn; 
    7783        Da = pars->d_factor*aa; 
     
    8591        ///  instead of against q coordinate(PRB 36(46), 3(6), 1754(3854)) 
    8692    // 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); 
     93    b3_x = sin(theta) * cos(phi);//negative sign here??? 
     94    b3_y = sin(theta) * sin(phi); 
     95    b3_z = cos(theta); 
    9096    cos_val_b3 =  b3_x*q_x + b3_y*q_y + b3_z*q_z; 
    9197 
    9298    alpha = acos(cos_val_b3); 
    9399    // b1 axis orientation 
    94     b1_x = sin(pars->psi); 
    95     b1_y = cos(pars->psi); 
     100    b1_x = sin(psi); 
     101    b1_y = cos(psi); 
    96102        cos_val_b1 = (b1_x*q_x + b1_y*q_y); 
    97103    // b2 axis orientation 
  • sansmodels/src/sans/models/c_extensions/bcc.h

    rd5b6a9d r4628e31  
    5757        //  [DEFAULT]=background=0 [1/cm] 
    5858        double background; 
    59     /// Orientation of the a1 axis w/respect incoming beam [rad] 
    60     //  [DEFAULT]=theta=0.0 [rad] 
     59    /// Orientation of the a1 axis w/respect incoming beam [deg] 
     60    //  [DEFAULT]=theta=0.0 [deg] 
    6161    double theta; 
    62     /// Orientation of the a2 in the plane of the detector [rad] 
    63     //  [DEFAULT]=phi=0.0 [rad] 
     62    /// Orientation of the a2 in the plane of the detector [deg] 
     63    //  [DEFAULT]=phi=0.0 [deg] 
    6464    double phi; 
    65     /// Orientation of the a3 in the plane of the detector [rad] 
    66     //  [DEFAULT]=psi=0.0 [rad] 
     65    /// Orientation of the a3 in the plane of the detector [deg] 
     66    //  [DEFAULT]=psi=0.0 [deg] 
    6767    double psi; 
    6868 
  • sansmodels/src/sans/models/c_extensions/capcyl.c

    r339ce67 r4628e31  
    142142        dp[6] = pars->background; 
    143143 
     144        //convert angle degree to radian 
     145        double pi = 4.0*atan(1.0); 
     146        double theta = pars->theta * pi/180.0; 
     147        double phi = pars->phi * pi/180.0; 
     148 
    144149 
    145150        //double Pi = 4.0*atan(1.0); 
    146151    // Cylinder orientation 
    147     cyl_x = sin(pars->theta) * cos(pars->phi); 
    148     cyl_y = sin(pars->theta) * sin(pars->phi); 
    149     cyl_z = cos(pars->theta); 
     152    cyl_x = sin(theta) * cos(phi); 
     153    cyl_y = sin(theta) * sin(phi); 
     154    cyl_z = cos(theta); 
    150155 
    151156    // q vector 
  • sansmodels/src/sans/models/c_extensions/capcyl.h

    r18f2ca1 r4628e31  
    5656        double background; 
    5757 
    58     /// Angle of the main axis against z-axis in detector plane [rad] 
    59     //  [DEFAULT]=theta=0.0 [rad] 
     58    /// Angle of the main axis against z-axis in detector plane [deg] 
     59    //  [DEFAULT]=theta=0.0 [deg] 
    6060    double theta; 
    61     /// Azimuthal angle around z-axis in detector plane [rad] 
    62     //  [DEFAULT]=phi=0.0 [rad] 
     61    /// Azimuthal angle around z-axis in detector plane [deg] 
     62    //  [DEFAULT]=phi=0.0 [deg] 
    6363    double phi; 
    6464 
  • sansmodels/src/sans/models/c_extensions/core_shell_cylinder.c

    rae3ce4e r4628e31  
    1818double core_shell_cylinder_analytical_1D(CoreShellCylinderParameters *pars, double q) { 
    1919        double dp[8]; 
    20          
     20 
    2121        dp[0] = pars->scale; 
    2222        dp[1] = pars->radius; 
     
    2727        dp[6] = pars->solvent_sld; 
    2828        dp[7] = pars->background; 
    29          
     29 
    3030        return CoreShellCylinder(dp, q); 
    3131} 
    32      
     32 
    3333/** 
    3434 * Function to evaluate 2D scattering function 
     
    4141        q = sqrt(qx*qx+qy*qy); 
    4242    return core_shell_cylinder_analytical_2D_scaled(pars, q, qx/q, qy/q); 
    43 }  
     43} 
    4444 
    4545/** 
     
    5252double core_shell_cylinder_analytical_2D(CoreShellCylinderParameters *pars, double q, double phi) { 
    5353    return core_shell_cylinder_analytical_2D_scaled(pars, q, cos(phi), sin(phi)); 
    54 }  
     54} 
    5555 
    5656/** 
     
    6565        double cyl_x, cyl_y, cyl_z; 
    6666        double q_z, lenq; 
    67         double theta, alpha, f, vol, sin_val, cos_val; 
     67        double alpha, f, vol, sin_val, cos_val; 
    6868        double answer; 
    69          
     69        //convert angle degree to radian 
     70        double pi = 4.0*atan(1.0); 
     71        double theta = pars->axis_theta * pi/180.0; 
     72        double phi = pars->axis_phi * pi/180.0; 
     73 
    7074    // Cylinder orientation 
    71     cyl_x = sin(pars->axis_theta) * cos(pars->axis_phi); 
    72     cyl_y = sin(pars->axis_theta) * sin(pars->axis_phi); 
    73     cyl_z = cos(pars->axis_theta); 
    74       
     75    cyl_x = sin(theta) * cos(phi); 
     76    cyl_y = sin(theta) * sin(phi); 
     77    cyl_z = cos(theta); 
     78 
    7579    // q vector 
    7680    q_z = 0; 
    77          
     81 
    7882    // Compute the angle btw vector q and the 
    7983    // axis of the cylinder 
    8084    cos_val = cyl_x*q_x + cyl_y*q_y + cyl_z*q_z; 
    81      
     85 
    8286    // The following test should always pass 
    8387    if (fabs(cos_val)>1.0) { 
     
    8589        return 0; 
    8690    } 
    87      
     91 
    8892        alpha = acos( cos_val ); 
    89          
     93 
    9094        // Call the IGOR library function to get the kernel 
    91         answer = CoreShellCylKernel(q, pars->radius, pars->thickness,  
    92                                                                 pars->core_sld,pars->shell_sld,  
    93                                                                 pars->solvent_sld, pars->length/2.0, alpha) / sin(alpha); 
    94          
     95        answer = CoreShellCylKernel(q, pars->radius, pars->thickness, 
     96                                                                pars->core_sld,pars->shell_sld, 
     97                                                                pars->solvent_sld, pars->length/2.0, alpha) / fabs(sin(alpha)); 
     98 
    9599        //normalize by cylinder volume 
    96         vol=acos(-1.0)*(pars->radius+pars->thickness) 
     100        vol=pi*(pars->radius+pars->thickness) 
    97101                        *(pars->radius+pars->thickness) 
    98102                        *(pars->length+2.0*pars->thickness); 
    99103        answer /= vol; 
    100          
     104 
    101105        //convert to [cm-1] 
    102106        answer *= 1.0e8; 
    103          
     107 
    104108        //Scale 
    105109        answer *= pars->scale; 
    106          
     110 
    107111        // add in the background 
    108112        answer += pars->background; 
    109          
     113 
    110114        return answer; 
    111115} 
  • sansmodels/src/sans/models/c_extensions/core_shell_cylinder.h

    r27972c1d r4628e31  
    6969        double background; 
    7070 
    71     /// Orientation of the long axis of the core-shell cylinder w/respect incoming beam [rad] 
    72     //  [DEFAULT]=axis_theta=1.57 [rad] 
     71    /// Orientation of the long axis of the core-shell cylinder w/respect incoming beam [deg] 
     72    //  [DEFAULT]=axis_theta=90.0 [deg] 
    7373    double axis_theta; 
    7474 
    75     /// Orientation of the long axis of the core-shell cylinder in the plane of the detector [rad] 
    76     //  [DEFAULT]=axis_phi=0.0 [rad] 
     75    /// Orientation of the long axis of the core-shell cylinder in the plane of the detector [deg] 
     76    //  [DEFAULT]=axis_phi=0.0 [deg] 
    7777    double axis_phi; 
    7878 
  • sansmodels/src/sans/models/c_extensions/csparallelepiped.c

    r18f2ca1 r4628e31  
    4848        double rhoA,rhoB,rhoC, rhoP, rhosolv; 
    4949        double dr0, drA,drB, drC; 
    50         double Pi,retVal; 
     50        double retVal; 
    5151 
    5252        aa = dp[1]; 
     
    181181 
    182182        double answer; 
    183         double pi = 4.0*atan(1.0); 
    184183 
    185184        edgeA = pars->shortA; 
     
    187186        edgeC = pars->longC; 
    188187 
     188        //convert angle degree to radian 
     189        double pi = 4.0*atan(1.0); 
     190        double theta = pars->parallel_theta * pi/180.0; 
     191        double phi = pars->parallel_phi * pi/180.0; 
     192        double psi = pars->parallel_psi* pi/180.0; 
    189193 
    190194    // parallelepiped c axis orientation 
    191     cparallel_x = sin(pars->parallel_theta) * cos(pars->parallel_phi); 
    192     cparallel_y = sin(pars->parallel_theta) * sin(pars->parallel_phi); 
    193     cparallel_z = cos(pars->parallel_theta); 
     195    cparallel_x = sin(theta) * cos(phi); 
     196    cparallel_y = sin(theta) * sin(phi); 
     197    cparallel_z = cos(theta); 
    194198 
    195199    // q vector 
     
    202206 
    203207    // parallelepiped a axis orientation 
    204     parallel_x = sin(pars->parallel_psi);//cos(pars->parallel_theta) * sin(pars->parallel_phi)*sin(pars->parallel_psi); 
    205     parallel_y = cos(pars->parallel_psi);//cos(pars->parallel_theta) * cos(pars->parallel_phi)*cos(pars->parallel_psi); 
     208    parallel_x = sin(psi);//cos(pars->parallel_theta) * sin(pars->parallel_phi)*sin(pars->parallel_psi); 
     209    parallel_y = cos(psi);//cos(pars->parallel_theta) * cos(pars->parallel_phi)*cos(pars->parallel_psi); 
    206210 
    207211    cos_val_a = parallel_x*q_x + parallel_y*q_y; 
     
    210214 
    211215    // parallelepiped b axis orientation 
    212     bparallel_x = sqrt(1.0-sin(pars->parallel_theta)*cos(pars->parallel_phi))*cos(pars->parallel_psi);//cos(pars->parallel_theta) * cos(pars->parallel_phi)* cos(pars->parallel_psi); 
    213     bparallel_y = sqrt(1.0-sin(pars->parallel_theta)*cos(pars->parallel_phi))*sin(pars->parallel_psi);//cos(pars->parallel_theta) * sin(pars->parallel_phi)* sin(pars->parallel_psi); 
     216    bparallel_x = sqrt(1.0-sin(theta)*cos(phi))*cos(psi);//cos(pars->parallel_theta) * cos(pars->parallel_phi)* cos(pars->parallel_psi); 
     217    bparallel_y = sqrt(1.0-sin(theta)*cos(phi))*sin(psi);//cos(pars->parallel_theta) * sin(pars->parallel_phi)* sin(pars->parallel_psi); 
    214218    // axis of the parallelepiped 
    215219    cos_val_b = sin(acos(cos_val_a)) ; 
  • sansmodels/src/sans/models/c_extensions/csparallelepiped.h

    r18f2ca1 r4628e31  
    6868        //  [DEFAULT]=background=0.06 [1/cm] 
    6969        double background; 
    70     /// Orientation of the parallelepiped axis w/respect incoming beam [rad] 
    71     //  [DEFAULT]=parallel_theta=0.0 [rad] 
     70    /// Orientation of the parallelepiped axis w/respect incoming beam [deg] 
     71    //  [DEFAULT]=parallel_theta=0.0 [deg] 
    7272    double parallel_theta; 
    73     /// Orientation of the longitudinal axis of the parallelepiped in the plane of the detector [rad] 
    74     //  [DEFAULT]=parallel_phi=0.0 [rad] 
     73    /// Orientation of the longitudinal axis of the parallelepiped in the plane of the detector [deg] 
     74    //  [DEFAULT]=parallel_phi=0.0 [deg] 
    7575    double parallel_phi; 
    76     /// Orientation of the cross-sectional minor axis of the parallelepiped in the plane of the detector [rad] 
    77     //  [DEFAULT]=parallel_psi=0.0 [rad] 
     76    /// Orientation of the cross-sectional minor axis of the parallelepiped in the plane of the detector [deg] 
     77    //  [DEFAULT]=parallel_psi=0.0 [deg] 
    7878    double parallel_psi; 
    7979 
  • sansmodels/src/sans/models/c_extensions/cylinder.c

    rf10063e r4628e31  
    6969        double alpha, vol, cos_val; 
    7070        double answer; 
     71        //convert angle degree to radian 
     72        double pi = 4.0*atan(1.0); 
     73        double theta = pars->cyl_theta * pi/180.0; 
     74        double phi = pars->cyl_phi * pi/180.0; 
    7175 
    7276    // Cylinder orientation 
    73     cyl_x = sin(pars->cyl_theta) * cos(pars->cyl_phi); 
    74     cyl_y = sin(pars->cyl_theta) * sin(pars->cyl_phi); 
    75     cyl_z = cos(pars->cyl_theta); 
     77    cyl_x = sin(theta) * cos(phi); 
     78    cyl_y = sin(theta) * sin(phi); 
     79    cyl_z = cos(theta); 
    7680 
    7781    // q vector 
  • sansmodels/src/sans/models/c_extensions/cylinder.h

    rf10063e r4628e31  
    4242        //  [DEFAULT]=background=0.0 [1/cm] 
    4343        double background; 
    44     /// Orientation of the cylinder axis w/respect incoming beam [rad] 
    45     //  [DEFAULT]=cyl_theta=1.0 [rad] 
     44    /// Orientation of the cylinder axis w/respect incoming beam [deg] 
     45    //  [DEFAULT]=cyl_theta=60.0 [deg] 
    4646    double cyl_theta; 
    47     /// Orientation of the cylinder in the plane of the detector [rad] 
    48     //  [DEFAULT]=cyl_phi=1.0 [rad] 
     47    /// Orientation of the cylinder in the plane of the detector [deg] 
     48    //  [DEFAULT]=cyl_phi=60.0 [deg] 
    4949    double cyl_phi; 
    5050 
  • sansmodels/src/sans/models/c_extensions/ellipsoid.c

    r8f20419d r4628e31  
    9090        double cyl_x, cyl_y, cyl_z; 
    9191        double q_z, lenq; 
    92         double theta, alpha, f, vol, sin_val, cos_val; 
     92        double alpha, f, vol, sin_val, cos_val; 
    9393        double answer; 
     94        //convert angle degree to radian 
     95        double pi = 4.0*atan(1.0); 
     96        double theta = pars->axis_theta * pi/180.0; 
     97        double phi = pars->axis_phi * pi/180.0; 
    9498 
    9599    // Ellipsoid orientation 
    96     cyl_x = sin(pars->axis_theta) * cos(pars->axis_phi); 
    97     cyl_y = sin(pars->axis_theta) * sin(pars->axis_phi); 
    98     cyl_z = cos(pars->axis_theta); 
     100    cyl_x = sin(theta) * cos(phi); 
     101    cyl_y = sin(theta) * sin(phi); 
     102    cyl_z = cos(theta); 
    99103 
    100104    // q vector 
  • sansmodels/src/sans/models/c_extensions/ellipsoid.h

    rf10063e r4628e31  
    5858        double background; 
    5959 
    60     /// Orientation of the long axis of the ellipsoid w/respect incoming beam [rad] 
    61     //  [DEFAULT]=axis_theta=1.57 [rad] 
     60    /// Orientation of the long axis of the ellipsoid w/respect incoming beam [deg] 
     61    //  [DEFAULT]=axis_theta=90.0 [deg] 
    6262    double axis_theta; 
    63     /// Orientation of the long axis of the ellipsoid in the plane of the detector [rad] 
    64     //  [DEFAULT]=axis_phi=0.0 [rad] 
     63    /// Orientation of the long axis of the ellipsoid in the plane of the detector [deg] 
     64    //  [DEFAULT]=axis_phi=0.0 [deg] 
    6565    double axis_phi; 
    6666} EllipsoidParameters; 
  • sansmodels/src/sans/models/c_extensions/elliptical_cylinder.c

    rf10063e r4628e31  
    9999        double nu, cos_nu; 
    100100        double answer; 
     101        //convert angle degree to radian 
     102        double pi = 4.0*atan(1.0); 
     103        double theta = pars->cyl_theta * pi/180.0; 
     104        double phi = pars->cyl_phi * pi/180.0; 
     105        double psi = pars->cyl_psi * pi/180.0; 
    101106 
    102107    //Cylinder orientation 
    103     cyl_x = sin(pars->cyl_theta) * cos(pars->cyl_phi); 
    104     cyl_y = sin(pars->cyl_theta) * sin(pars->cyl_phi); 
    105     cyl_z = cos(pars->cyl_theta); 
     108    cyl_x = sin(theta) * cos(phi); 
     109    cyl_y = sin(theta) * sin(phi); 
     110    cyl_z = cos(theta); 
    106111 
    107112    // q vector 
     
    130135 
    131136        //x- y- component on the detector plane. 
    132     ell_x =  cos(pars->cyl_psi); 
    133     ell_y =  sin(pars->cyl_psi); 
     137    ell_x =  cos(psi); 
     138    ell_y =  sin(psi); 
    134139 
    135140    // calculate the axis of the ellipse wrt q-coord. 
  • sansmodels/src/sans/models/c_extensions/elliptical_cylinder.h

    rf10063e r4628e31  
    4141        //  [DEFAULT]=background=0 [1/cm] 
    4242        double background; 
    43     /// Orientation of the cylinder axis w/respect incoming beam [rad] 
    44     //  [DEFAULT]=cyl_theta=1.57 [rad] 
     43    /// Orientation of the cylinder axis w/respect incoming beam [deg] 
     44    //  [DEFAULT]=cyl_theta=90.0 [deg] 
    4545    double cyl_theta; 
    46     /// Orientation of the cylinder in the plane of the detector [rad] 
    47     //  [DEFAULT]=cyl_phi=0.0 [rad] 
     46    /// Orientation of the cylinder in the plane of the detector [deg] 
     47    //  [DEFAULT]=cyl_phi=0.0 [deg] 
    4848    double cyl_phi; 
    49     /// Orientation of major radius of the cross-section w/respect vector q [rad] 
    50     //  [DEFAULT]=cyl_psi=0.0 [rad] 
     49    /// Orientation of major radius of the cross-section w/respect vector q [deg] 
     50    //  [DEFAULT]=cyl_psi=0.0 [deg] 
    5151    double cyl_psi; 
    5252} EllipticalCylinderParameters; 
  • 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 
  • sansmodels/src/sans/models/c_extensions/fcc.h

    rd5b6a9d r4628e31  
    5757        //  [DEFAULT]=background=0 [1/cm] 
    5858        double background; 
    59     /// Orientation of the a1 axis w/respect incoming beam [rad] 
    60     //  [DEFAULT]=theta=0.0 [rad] 
     59    /// Orientation of the a1 axis w/respect incoming beam [deg] 
     60    //  [DEFAULT]=theta=0.0 [deg] 
    6161    double theta; 
    62     /// Orientation of the a2 in the plane of the detector [rad] 
    63     //  [DEFAULT]=phi=0.0 [rad] 
     62    /// Orientation of the a2 in the plane of the detector [deg] 
     63    //  [DEFAULT]=phi=0.0 [deg] 
    6464    double phi; 
    65     /// Orientation of the a3 in the plane of the detector [rad] 
    66     //  [DEFAULT]=psi=0.0 [rad] 
     65    /// Orientation of the a3 in the plane of the detector [deg] 
     66    //  [DEFAULT]=psi=0.0 [deg] 
    6767    double psi; 
    6868 
  • sansmodels/src/sans/models/c_extensions/hollow_cylinder.c

    r2339249f r4628e31  
    6666        double  alpha,vol, cos_val; 
    6767        double answer; 
     68        //convert angle degree to radian 
     69        double pi = 4.0*atan(1.0); 
     70        double theta = pars->axis_theta * pi/180.0; 
     71        double phi = pars->axis_phi * pi/180.0; 
    6872 
    6973    // Cylinder orientation 
    70     cyl_x = sin(pars->axis_theta) * cos(pars->axis_phi); 
    71     cyl_y = sin(pars->axis_theta) * sin(pars->axis_phi); 
    72     cyl_z = cos(pars->axis_theta); 
     74    cyl_x = sin(theta) * cos(phi); 
     75    cyl_y = sin(theta) * sin(phi); 
     76    cyl_z = cos(theta); 
    7377 
    7478    // q vector 
     
    9498 
    9599        //normalize by cylinder volume 
    96         vol=acos(-1.0)*((pars->radius*pars->radius)-(pars->core_radius *pars->core_radius)) 
     100        vol=pi*((pars->radius*pars->radius)-(pars->core_radius *pars->core_radius)) 
    97101                        *(pars->length); 
    98         answer /= vol; 
     102        answer *= vol; 
    99103 
    100104        //convert to [cm-1] 
  • sansmodels/src/sans/models/c_extensions/hollow_cylinder.h

    rf10063e r4628e31  
    4848        double background; 
    4949 
    50     /// Orientation of the long axis of the hollow cylinder w/respect incoming beam [rad] 
    51     //  [DEFAULT]=axis_theta=1.57 [rad] 
     50    /// Orientation of the long axis of the hollow cylinder w/respect incoming beam [deg] 
     51    //  [DEFAULT]=axis_theta=90.0 [deg] 
    5252    double axis_theta; 
    5353 
    54     /// Orientation of the long axis of the hollow cylinder in the plane of the detector [rad] 
    55     //  [DEFAULT]=axis_phi=0.0 [rad] 
     54    /// Orientation of the long axis of the hollow cylinder in the plane of the detector [deg] 
     55    //  [DEFAULT]=axis_phi=0.0 [deg] 
    5656    double axis_phi; 
    5757 
  • sansmodels/src/sans/models/c_extensions/oblate.h

    r27972c1d r4628e31  
    5353        double background; 
    5454        //Disable for now 
    55     /// Orientation of the oblate axis w/respect incoming beam [rad] 
    56     //  [DEFAULT]=axis_theta=1.0 [rad] 
     55    /// Orientation of the oblate axis w/respect incoming beam [deg] 
     56    //  [DEFAULT]=axis_theta=57.325 [deg] 
    5757    double axis_theta; 
    58     /// Orientation of the oblate in the plane of the detector [rad] 
    59     //  [DEFAULT]=axis_phi=1.0 [rad] 
     58    /// Orientation of the oblate in the plane of the detector [deg] 
     59    //  [DEFAULT]=axis_phi=57.325 [deg] 
    6060    double axis_phi; 
    6161 
  • sansmodels/src/sans/models/c_extensions/parallelepiped.c

    ra1ecfc3 r4628e31  
    110110        edgeC = pars->long_c; 
    111111 
     112        //convert angle degree to radian 
     113        double theta = pars->parallel_theta * pi/180.0; 
     114        double phi = pars->parallel_phi * pi/180.0; 
     115        double psi = pars->parallel_psi * pi/180.0; 
    112116 
    113117    // parallelepiped c axis orientation 
    114     cparallel_x = sin(pars->parallel_theta) * cos(pars->parallel_phi); 
    115     cparallel_y = sin(pars->parallel_theta) * sin(pars->parallel_phi); 
    116     cparallel_z = cos(pars->parallel_theta); 
     118    cparallel_x = sin(theta) * cos(phi); 
     119    cparallel_y = sin(theta) * sin(phi); 
     120    cparallel_z = cos(theta); 
    117121 
    118122    // q vector 
     
    125129 
    126130    // parallelepiped a axis orientation 
    127     parallel_x = sin(pars->parallel_psi);//cos(pars->parallel_theta) * sin(pars->parallel_phi)*sin(pars->parallel_psi); 
    128     parallel_y = cos(pars->parallel_psi);//cos(pars->parallel_theta) * cos(pars->parallel_phi)*cos(pars->parallel_psi); 
     131    parallel_x = sin(psi);//cos(pars->parallel_theta) * sin(pars->parallel_phi)*sin(pars->parallel_psi); 
     132    parallel_y = cos(psi);//cos(pars->parallel_theta) * cos(pars->parallel_phi)*cos(pars->parallel_psi); 
    129133 
    130134    cos_val_a = parallel_x*q_x + parallel_y*q_y; 
     
    133137 
    134138    // parallelepiped b axis orientation 
    135     bparallel_x = sqrt(1.0-sin(pars->parallel_theta)*cos(pars->parallel_phi))*cos(pars->parallel_psi);//cos(pars->parallel_theta) * cos(pars->parallel_phi)* cos(pars->parallel_psi); 
    136     bparallel_y = sqrt(1.0-sin(pars->parallel_theta)*cos(pars->parallel_phi))*sin(pars->parallel_psi);//cos(pars->parallel_theta) * sin(pars->parallel_phi)* sin(pars->parallel_psi); 
     139    bparallel_x = sqrt(1.0-sin(theta)*cos(phi))*cos(psi);//cos(pars->parallel_theta) * cos(pars->parallel_phi)* cos(pars->parallel_psi); 
     140    bparallel_y = sqrt(1.0-sin(theta)*cos(phi))*sin(psi);//cos(pars->parallel_theta) * sin(pars->parallel_phi)* sin(pars->parallel_psi); 
    137141    // axis of the parallelepiped 
    138142    cos_val_b = sin(acos(cos_val_a)) ; 
  • sansmodels/src/sans/models/c_extensions/parallelepiped.h

    rf10063e r4628e31  
    4545        //  [DEFAULT]=background=0.0 [1/cm] 
    4646        double background; 
    47     /// Orientation of the parallelepiped axis w/respect incoming beam [rad] 
    48     //  [DEFAULT]=parallel_theta=0.0 [rad] 
     47    /// Orientation of the parallelepiped axis w/respect incoming beam [deg] 
     48    //  [DEFAULT]=parallel_theta=0.0 [deg] 
    4949    double parallel_theta; 
    50     /// Orientation of the longitudinal axis of the parallelepiped in the plane of the detector [rad] 
    51     //  [DEFAULT]=parallel_phi=0.0 [rad] 
     50    /// Orientation of the longitudinal axis of the parallelepiped in the plane of the detector [deg] 
     51    //  [DEFAULT]=parallel_phi=0.0 [deg] 
    5252    double parallel_phi; 
    53     /// Orientation of the cross-sectional minor axis of the parallelepiped in the plane of the detector [rad] 
    54     //  [DEFAULT]=parallel_psi=0.0 [rad] 
     53    /// Orientation of the cross-sectional minor axis of the parallelepiped in the plane of the detector [deg] 
     54    //  [DEFAULT]=parallel_psi=0.0 [deg] 
    5555    double parallel_psi; 
    5656 
  • sansmodels/src/sans/models/c_extensions/sc.c

    r18f2ca1 r4628e31  
    7373        dp[4] = 0.0; 
    7474 
     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 
    7580        aa = pars->dnn; 
    7681        Da = pars->d_factor*aa; 
     
    8085        /// Angles here are respect to detector coordinate instead of against q coordinate(PRB 36, 3, 1754) 
    8186    // 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); 
    8590 
    8691    // q vector 
     
    9398    a3_dot_q = aa*q*cos_val_a3; 
    9499    // a1 axis orientation 
    95     a1_x = sin(pars->psi); 
    96     a1_y = cos(pars->psi); 
     100    a1_x = sin(psi); 
     101    a1_y = cos(psi); 
    97102 
    98103    cos_val_a1 = a1_x*q_x + a1_y*q_y; 
     
    100105 
    101106    // 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); 
    104109    // a2 axis 
    105110    cos_val_a2 =  sin(acos(cos_val_a1));//a2_x*q_x + a2_y*q_y; 
  • sansmodels/src/sans/models/c_extensions/sc.h

    rd5b6a9d r4628e31  
    5757        //  [DEFAULT]=background=0 [1/cm] 
    5858        double background; 
    59     /// Orientation of the a1 axis w/respect incoming beam [rad] 
    60     //  [DEFAULT]=theta=0.0 [rad] 
     59    /// Orientation of the a1 axis w/respect incoming beam [deg] 
     60    //  [DEFAULT]=theta=0.0 [deg] 
    6161    double theta; 
    62     /// Orientation of the a2 in the plane of the detector [rad] 
    63     //  [DEFAULT]=phi=0.0 [rad] 
     62    /// Orientation of the a2 in the plane of the detector [deg] 
     63    //  [DEFAULT]=phi=0.0 [deg] 
    6464    double phi; 
    65     /// Orientation of the a3 in the plane of the detector [rad] 
    66     //  [DEFAULT]=psi=0.0 [rad] 
     65    /// Orientation of the a3 in the plane of the detector [deg] 
     66    //  [DEFAULT]=psi=0.0 [deg] 
    6767    double psi; 
    6868 
  • sansmodels/src/sans/models/c_extensions/spheroid.c

    rf10063e r4628e31  
    7575        double sldcs,sldss; 
    7676 
     77        //convert angle degree to radian 
     78        double theta = pars->axis_theta * Pi/180.0; 
     79        double phi = pars->axis_phi * Pi/180.0; 
     80 
     81 
    7782    // ellipsoid orientation, the axis of the rotation is consistent with the ploar axis. 
    78     cyl_x = sin(pars->axis_theta) * cos(pars->axis_phi); 
    79     cyl_y = sin(pars->axis_theta) * sin(pars->axis_phi); 
    80     cyl_z = cos(pars->axis_theta); 
     83    cyl_x = sin(theta) * cos(phi); 
     84    cyl_y = sin(theta) * sin(phi); 
     85    cyl_z = cos(theta); 
    8186    //del sld 
    8287    sldcs = pars->sld_core - pars->sld_shell; 
  • sansmodels/src/sans/models/c_extensions/spheroid.h

    rf10063e r4628e31  
    5959        double background; 
    6060        //Disable for now 
    61     /// Orientation of the oblate axis w/respect incoming beam [rad] 
    62     //  [DEFAULT]=axis_theta=0.0 [rad] 
     61    /// Orientation of the oblate axis w/respect incoming beam [deg] 
     62    //  [DEFAULT]=axis_theta=0.0 [deg] 
    6363    double axis_theta; 
    64     /// Orientation of the oblate in the plane of the detector [rad] 
    65     //  [DEFAULT]=axis_phi=0.0 [rad] 
     64    /// Orientation of the oblate in the plane of the detector [deg] 
     65    //  [DEFAULT]=axis_phi=0.0 [deg] 
    6666    double axis_phi; 
    6767 
  • sansmodels/src/sans/models/c_extensions/triaxial_ellipsoid.c

    r8f20419d r4628e31  
    9090        double alpha, vol, cos_val; 
    9191        double answer; 
    92     double pi = acos(-1.0); 
     92    double pi = 4.0*atan(1.0); 
     93 
     94        //convert angle degree to radian 
     95        double theta = pars->axis_theta * pi/180.0; 
     96        double phi = pars->axis_phi * pi/180.0; 
     97        double psi = pars->axis_psi * pi/180.0; 
     98 
    9399    // Cylinder orientation 
    94     cyl_x = sin(pars->axis_theta) * cos(pars->axis_phi); 
    95     cyl_y = sin(pars->axis_theta) * sin(pars->axis_phi); 
    96     cyl_z = cos(pars->axis_theta); 
     100    cyl_x = sin(theta) * cos(phi); 
     101    cyl_y = sin(theta) * sin(phi); 
     102    cyl_z = cos(theta); 
    97103 
    98104    // q vector 
     
    123129 
    124130        //x- y- component on the detector plane. 
    125     ell_x =  cos(pars->axis_psi); 
    126     ell_y =  sin(pars->axis_psi); 
     131    ell_x =  cos(psi); 
     132    ell_y =  sin(psi); 
    127133 
    128134    // calculate the axis of the ellipse wrt q-coord. 
  • sansmodels/src/sans/models/c_extensions/triaxial_ellipsoid.h

    r186c4eb r4628e31  
    3333        //  [DEFAULT]=background=0.0 [1/cm] 
    3434        double background; 
    35     /// Orientation of the triaxial_ellipsoid axis w/respect incoming beam [rad] 
    36     //  [DEFAULT]=axis_theta=1.0 [rad] 
     35    /// Orientation of the triaxial_ellipsoid axis w/respect incoming beam [deg] 
     36    //  [DEFAULT]=axis_theta=57.325 [deg] 
    3737    double axis_theta; 
    38     /// Orientation of the triaxial_ellipsoid in the plane of the detector [rad] 
    39     //  [DEFAULT]=axis_phi=1.0 [rad] 
     38    /// Orientation of the triaxial_ellipsoid in the plane of the detector [deg] 
     39    //  [DEFAULT]=axis_phi=57.325 [deg] 
    4040    double axis_phi; 
    41     /// Orientation of the cross section of the triaxial_ellipsoid in the plane of the detector [rad] 
    42     //  [DEFAULT]=axis_psi=0.0 [rad] 
     41    /// Orientation of the cross section of the triaxial_ellipsoid in the plane of the detector [deg] 
     42    //  [DEFAULT]=axis_psi=0.0 [deg] 
    4343    double axis_psi; 
    4444 
  • sansmodels/src/sans/models/c_models/CCoreShellCylinderModel.cpp

    r35aface r4628e31  
    9191        // Initialize parameter dictionary 
    9292        PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000000000)); 
    93         PyDict_SetItemString(self->params,"axis_theta",Py_BuildValue("d",1.570000000000)); 
     93        PyDict_SetItemString(self->params,"axis_theta",Py_BuildValue("d",90.000000000000)); 
    9494        PyDict_SetItemString(self->params,"solvent_sld",Py_BuildValue("d",0.000001000000)); 
    9595        PyDict_SetItemString(self->params,"thickness",Py_BuildValue("d",10.000000000000)); 
  • sansmodels/src/sans/models/c_models/CCylinderModel.cpp

    r35aface r4628e31  
    9292        PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000000000)); 
    9393        PyDict_SetItemString(self->params,"sldCyl",Py_BuildValue("d",0.000004000000)); 
    94         PyDict_SetItemString(self->params,"cyl_theta",Py_BuildValue("d",1.000000000000)); 
     94        PyDict_SetItemString(self->params,"cyl_theta",Py_BuildValue("d",60.000000000000)); 
    9595        PyDict_SetItemString(self->params,"length",Py_BuildValue("d",400.000000000000)); 
    9696        PyDict_SetItemString(self->params,"sldSolv",Py_BuildValue("d",0.000001000000)); 
    9797        PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.000000000000)); 
    9898        PyDict_SetItemString(self->params,"radius",Py_BuildValue("d",20.000000000000)); 
    99         PyDict_SetItemString(self->params,"cyl_phi",Py_BuildValue("d",1.000000000000)); 
     99        PyDict_SetItemString(self->params,"cyl_phi",Py_BuildValue("d",60.000000000000)); 
    100100        // Initialize dispersion / averaging parameter dict 
    101101        DispersionVisitor* visitor = new DispersionVisitor(); 
  • sansmodels/src/sans/models/c_models/CEllipsoidModel.cpp

    r35aface r4628e31  
    9191        // Initialize parameter dictionary 
    9292        PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000000000)); 
    93         PyDict_SetItemString(self->params,"axis_theta",Py_BuildValue("d",1.570000000000)); 
     93        PyDict_SetItemString(self->params,"axis_theta",Py_BuildValue("d",90.000000000000)); 
    9494        PyDict_SetItemString(self->params,"radius_b",Py_BuildValue("d",400.000000000000)); 
    9595        PyDict_SetItemString(self->params,"radius_a",Py_BuildValue("d",20.000000000000)); 
  • sansmodels/src/sans/models/c_models/CEllipticalCylinderModel.cpp

    r35aface r4628e31  
    9797        PyDict_SetItemString(self->params,"sldSolv",Py_BuildValue("d",0.000001000000)); 
    9898        PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.000000000000)); 
    99         PyDict_SetItemString(self->params,"cyl_theta",Py_BuildValue("d",1.570000000000)); 
     99        PyDict_SetItemString(self->params,"cyl_theta",Py_BuildValue("d",90.000000000000)); 
    100100        PyDict_SetItemString(self->params,"r_ratio",Py_BuildValue("d",1.500000000000)); 
    101101        PyDict_SetItemString(self->params,"cyl_phi",Py_BuildValue("d",0.000000000000)); 
  • sansmodels/src/sans/models/c_models/CHollowCylinderModel.cpp

    r35aface r4628e31  
    9393        PyDict_SetItemString(self->params,"sldCyl",Py_BuildValue("d",0.000006300000)); 
    9494        PyDict_SetItemString(self->params,"core_radius",Py_BuildValue("d",20.000000000000)); 
    95         PyDict_SetItemString(self->params,"axis_theta",Py_BuildValue("d",1.570000000000)); 
     95        PyDict_SetItemString(self->params,"axis_theta",Py_BuildValue("d",90.000000000000)); 
    9696        PyDict_SetItemString(self->params,"length",Py_BuildValue("d",400.000000000000)); 
    9797        PyDict_SetItemString(self->params,"axis_phi",Py_BuildValue("d",0.000000000000)); 
  • sansmodels/src/sans/models/c_models/COblateModel.cpp

    r35aface r4628e31  
    9393        PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000000000)); 
    9494        PyDict_SetItemString(self->params,"minor_core",Py_BuildValue("d",20.000000000000)); 
    95         PyDict_SetItemString(self->params,"axis_theta",Py_BuildValue("d",1.000000000000)); 
     95        PyDict_SetItemString(self->params,"axis_theta",Py_BuildValue("d",57.325000000000)); 
    9696        PyDict_SetItemString(self->params,"sld_solvent",Py_BuildValue("d",0.000006300000)); 
    97         PyDict_SetItemString(self->params,"axis_phi",Py_BuildValue("d",1.000000000000)); 
     97        PyDict_SetItemString(self->params,"axis_phi",Py_BuildValue("d",57.325000000000)); 
    9898        PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.001000000000)); 
    9999        PyDict_SetItemString(self->params,"major_shell",Py_BuildValue("d",250.000000000000)); 
  • sansmodels/src/sans/models/c_models/CTriaxialEllipsoidModel.cpp

    r35aface r4628e31  
    9292        PyDict_SetItemString(self->params,"scale",Py_BuildValue("d",1.000000000000)); 
    9393        PyDict_SetItemString(self->params,"axis_psi",Py_BuildValue("d",0.000000000000)); 
    94         PyDict_SetItemString(self->params,"axis_theta",Py_BuildValue("d",1.000000000000)); 
     94        PyDict_SetItemString(self->params,"axis_theta",Py_BuildValue("d",57.325000000000)); 
    9595        PyDict_SetItemString(self->params,"semi_axisA",Py_BuildValue("d",35.000000000000)); 
    9696        PyDict_SetItemString(self->params,"semi_axisB",Py_BuildValue("d",100.000000000000)); 
    9797        PyDict_SetItemString(self->params,"semi_axisC",Py_BuildValue("d",400.000000000000)); 
    98         PyDict_SetItemString(self->params,"axis_phi",Py_BuildValue("d",1.000000000000)); 
     98        PyDict_SetItemString(self->params,"axis_phi",Py_BuildValue("d",57.325000000000)); 
    9999        PyDict_SetItemString(self->params,"sldSolv",Py_BuildValue("d",0.000006300000)); 
    100100        PyDict_SetItemString(self->params,"background",Py_BuildValue("d",0.000000000000)); 
  • sansmodels/src/sans/models/c_models/barbell.cpp

    r85bb870 r4628e31  
    198198                                                } 
    199199                                                if (weights_theta.size()>1) { 
    200                                                         _ptvalue *= fabs(sin(weights_theta[l].value)); 
     200                                                        _ptvalue *= fabs(sin(weights_theta[l].value*pi/180.0)); 
    201201                                                } 
    202202                                                sum += _ptvalue; 
  • sansmodels/src/sans/models/c_models/bcc.cpp

    r85bb870 r4628e31  
    118118        dp.phi    = phi(); 
    119119        dp.psi    = psi(); 
    120  
     120        double pi = 4.0*atan(1.0); 
    121121        // Get the dispersion points for the radius 
    122122        vector<WeightPoint> weights_rad; 
     
    166166                                        } 
    167167                                        if (weights_theta.size()>1) { 
    168                                                 _ptvalue *= fabs(sin(weights_theta[j].value)); 
     168                                                _ptvalue *= fabs(sin(weights_theta[j].value*pi/180.0)); 
    169169                                        } 
    170170                                        sum += _ptvalue; 
  • sansmodels/src/sans/models/c_models/capcyl.cpp

    r85bb870 r4628e31  
    135135        dp.theta  = theta(); 
    136136        dp.phi    = phi(); 
    137  
    138137 
    139138        // Get the dispersion points for the rad_bar 
     
    198197                                                } 
    199198                                                if (weights_theta.size()>1) { 
    200                                                         _ptvalue *= fabs(sin(weights_theta[l].value)); 
     199                                                        _ptvalue *= fabs(sin(weights_theta[l].value*pi/180.0)); 
    201200                                                } 
    202201                                                sum += _ptvalue; 
  • sansmodels/src/sans/models/c_models/coreshellcylinder.cpp

    r85bb870 r4628e31  
    4545        solvent_sld= Parameter(1.e-6); 
    4646        background = Parameter(0.0); 
    47         axis_theta = Parameter(0.0, true); 
     47        axis_theta = Parameter(90.0, true); 
    4848        axis_phi   = Parameter(0.0, true); 
    4949} 
     
    167167        double norm_vol = 0.0; 
    168168        double vol = 0.0; 
    169  
     169        double pi = 4.0*atan(1.0); 
    170170        // Loop over radius weight points 
    171171        for(int i=0; i<weights_rad.size(); i++) { 
     
    199199 
    200200                                        if (weights_theta.size()>1) { 
    201                                                 _ptvalue *= fabs(sin(weights_theta[k].value)); 
     201                                                _ptvalue *= fabs(sin(weights_theta[k].value*pi/180.0)); 
    202202                                        } 
    203203                                        sum += _ptvalue; 
  • sansmodels/src/sans/models/c_models/csparallelepiped.cpp

    r85bb870 r4628e31  
    188188        double norm_vol = 0.0; 
    189189        double vol = 0.0; 
     190        double pi = 4.0*atan(1.0); 
    190191 
    191192        // Loop over radius weight points 
     
    224225 
    225226                                                        if (weights_parallel_theta.size()>1) { 
    226                                                                 _ptvalue *= fabs(sin(weights_parallel_theta[l].value)); 
     227                                                                _ptvalue *= fabs(sin(weights_parallel_theta[l].value*pi/180.0)); 
    227228                                                        } 
    228229                                                        sum += _ptvalue; 
  • sansmodels/src/sans/models/c_models/cylinder.cpp

    r85bb870 r4628e31  
    142142        double norm_vol = 0.0; 
    143143        double vol = 0.0; 
    144  
     144        double pi = 4.0*atan(1.0); 
    145145        // Loop over radius weight points 
    146146        for(int i=0; i<weights_rad.size(); i++) { 
     
    167167                                                *pow(weights_rad[i].value,2)*weights_len[j].value; 
    168168                                        if (weights_theta.size()>1) { 
    169                                                 _ptvalue *= fabs(sin(weights_theta[k].value)); 
     169                                                _ptvalue *= fabs(sin(weights_theta[k].value*pi/180.0)); 
    170170                                        } 
    171171                                        sum += _ptvalue; 
  • sansmodels/src/sans/models/c_models/ellipsoid.cpp

    r85bb870 r4628e31  
    4242        sldSolv   = Parameter(1.e-6); 
    4343        background = Parameter(0.0); 
    44         axis_theta  = Parameter(1.57, true); 
     44        axis_theta  = Parameter(57.325, true); 
    4545        axis_phi    = Parameter(0.0, true); 
    4646} 
     
    145145        double norm_vol = 0.0; 
    146146        double vol = 0.0; 
    147  
     147        double pi = 4.0*atan(1.0); 
    148148        // Loop over radius weight points 
    149149        for(int i=0; i<weights_rad_a.size(); i++) { 
     
    170170                                                * pow(weights_rad_b[j].value,2) * weights_rad_a[i].value; 
    171171                                        if (weights_theta.size()>1) { 
    172                                                 _ptvalue *= fabs(sin(weights_theta[k].value)); 
     172                                                _ptvalue *= fabs(sin(weights_theta[k].value*pi/180.0)); 
    173173                                        } 
    174174                                        sum += _ptvalue; 
  • sansmodels/src/sans/models/c_models/ellipticalcylinder.cpp

    r85bb870 r4628e31  
    4444        sldSolv   = Parameter(1.e-6); 
    4545        background = Parameter(0.0); 
    46         cyl_theta  = Parameter(1.57, true); 
     46        cyl_theta  = Parameter(57.325, true); 
    4747        cyl_phi    = Parameter(0.0, true); 
    4848        cyl_psi    = Parameter(0.0, true); 
     
    170170        double norm_vol = 0.0; 
    171171        double vol = 0.0; 
    172  
     172        double pi = 4.0*atan(1.0); 
    173173        // Loop over minor radius weight points 
    174174        for(int i=0; i<weights_rad.size(); i++) { 
     
    207207                                                * weights_rat[m].value; 
    208208                                        if (weights_theta.size()>1) { 
    209                                                 _ptvalue *= fabs(sin(weights_theta[k].value)); 
     209                                                _ptvalue *= fabs(sin(weights_theta[k].value*pi/180.0)); 
    210210                                        } 
    211211                                        sum += _ptvalue; 
  • sansmodels/src/sans/models/c_models/fcc.cpp

    r85bb870 r4628e31  
    140140        double norm_vol = 0.0; 
    141141        double vol = 0.0; 
    142  
     142        double pi = 4.0*atan(1.0); 
    143143        // Loop over radius weight points 
    144144        for(int i=0; i<weights_rad.size(); i++) { 
     
    165165                                        } 
    166166                                        if (weights_theta.size()>1) { 
    167                                                 _ptvalue *= fabs(sin(weights_theta[j].value)); 
     167                                                _ptvalue *= fabs(sin(weights_theta[j].value*pi/180.0)); 
    168168                                        } 
    169169                                        sum += _ptvalue; 
  • sansmodels/src/sans/models/c_models/hollowcylinder.cpp

    r85bb870 r4628e31  
    164164        double norm_vol = 0.0; 
    165165        double vol = 0.0; 
    166  
     166        double pi = 4.0*atan(1.0); 
    167167        // Loop over core radius weight points 
    168168        for(int i=0; i<(int)weights_core_radius.size(); i++) { 
     
    192192                                                * weights_phi[l].weight 
    193193                                                * hollow_cylinder_analytical_2DXY(&dp, qx, qy) 
    194                                                 * (pow(weights_radius[m].value,2)-pow(weights_core_radius[i].value,2)) 
    195                                                 * weights_length[j].value; 
     194                                                / ((pow(weights_radius[m].value,2)-pow(weights_core_radius[i].value,2)) 
     195                                                * weights_length[j].value); 
    196196                                        if (weights_theta.size()>1) { 
    197                                                 _ptvalue *= fabs(sin(weights_theta[k].value)); 
     197                                                _ptvalue *= fabs(sin(weights_theta[k].value * pi/180.0)); 
    198198                                        } 
    199199                                        sum += _ptvalue; 
     
    201201                                        vol += weights_core_radius[i].weight 
    202202                                                * weights_length[j].weight 
    203                                                 * weights_radius[k].weight 
     203                                                * weights_radius[m].weight 
    204204                                                * (pow(weights_radius[m].value,2)-pow(weights_core_radius[i].value,2)) 
    205205                                                * weights_length[j].value; 
     
    223223        // factor to account for the sin(theta) term in the 
    224224        // integration (see documentation). 
    225         if (weights_theta.size()>1) norm = norm / asin(1.0); 
    226         if (vol != 0.0 && norm_vol != 0.0) { 
     225        if (weights_theta.size()>1) norm = norm/asin(1.0); 
     226        if (vol != 0.0 || norm_vol != 0.0) { 
    227227                //Re-normalize by avg volume 
    228                 sum = sum/(vol/norm_vol);} 
     228                sum = sum*(vol/norm_vol);} 
    229229        return sum/norm + background(); 
    230230} 
  • sansmodels/src/sans/models/c_models/parallelepiped.cpp

    r85bb870 r4628e31  
    172172        double norm_vol = 0.0; 
    173173        double vol = 0.0; 
    174  
     174        double pi = 4.0*atan(1.0); 
    175175        // Loop over radius weight points 
    176176        for(int i=0; i< (int)weights_short_a.size(); i++) { 
     
    208208 
    209209                                                        if (weights_parallel_theta.size()>1) { 
    210                                                                 _ptvalue *= fabs(sin(weights_parallel_theta[l].value)); 
     210                                                                _ptvalue *= fabs(sin(weights_parallel_theta[l].value*pi/180.0)); 
    211211                                                        } 
    212212                                                        sum += _ptvalue; 
  • sansmodels/src/sans/models/c_models/sc.cpp

    r85bb870 r4628e31  
    140140        double norm_vol = 0.0; 
    141141        double vol = 0.0; 
    142  
     142        double pi = 4.0*atan(1.0); 
    143143        // Loop over radius weight points 
    144144        for(int i=0; i<weights_rad.size(); i++) { 
     
    165165                                        } 
    166166                                        if (weights_theta.size()>1) { 
    167                                                 _ptvalue *= fabs(sin(weights_theta[j].value)); 
     167                                                _ptvalue *= fabs(sin(weights_theta[j].value*pi/180.0)); 
    168168                                        } 
    169169                                        sum += _ptvalue; 
  • sansmodels/src/sans/models/c_models/spheroid.cpp

    r85bb870 r4628e31  
    209209        double norm_vol = 0.0; 
    210210        double vol = 0.0; 
    211  
     211        double pi = 4.0*atan(1.0); 
    212212        // Loop over major core weight points 
    213213        for(int i=0; i< (int)weights_equat_core.size(); i++) { 
     
    241241                                                                * pow(weights_equat_shell[k].value,2)*weights_polar_shell[l].value; 
    242242                                                        if (weights_theta.size()>1) { 
    243                                                                 _ptvalue *= fabs(sin(weights_theta[m].value)); 
     243                                                                _ptvalue *= fabs(sin(weights_theta[m].value*pi/180.0)); 
    244244                                                        } 
    245245                                                        sum += _ptvalue; 
  • sansmodels/src/sans/models/c_models/triaxialellipsoid.cpp

    r85bb870 r4628e31  
    4444        sldSolv   = Parameter(6.3e-6); 
    4545        background = Parameter(0.0); 
    46         axis_theta  = Parameter(1.0, true); 
    47         axis_phi    = Parameter(1.0, true); 
     46        axis_theta  = Parameter(57.325, true); 
     47        axis_phi    = Parameter(57.325, true); 
    4848        axis_psi    = Parameter(0.0, true); 
    4949} 
     
    166166        double norm_vol = 0.0; 
    167167        double vol = 0.0; 
    168  
     168        double pi = 4.0*atan(1.0); 
    169169        // Loop over semi axis A weight points 
    170170        for(int i=0; i< (int)weights_semi_axisA.size(); i++) { 
     
    199199                                                                * weights_semi_axisA[i].value*weights_semi_axisB[j].value*weights_semi_axisC[k].value; 
    200200                                                        if (weights_theta.size()>1) { 
    201                                                                 _ptvalue *= fabs(sin(weights_theta[k].value)); 
     201                                                                _ptvalue *= fabs(sin(weights_theta[k].value*pi/180.0)); 
    202202                                                        } 
    203203                                                        sum += _ptvalue; 
  • sansmodels/src/sans/models/test/validate_2D_3axes_shape_model.py

    rbda194e3 r4628e31  
    9191            weight = 0.0 
    9292            for i_theta in range(npts): 
    93                 theta = math.pi/npts*(i_theta+1) 
     93                theta = 180.0/npts*(i_theta+1) 
    9494                 
    9595                model.setParam(theta_label, theta) 
    9696                 
    9797                for j in range(npts_alpha): 
    98                     model.setParam(phi_label, math.pi * 2.0 / npts_alpha * j) 
     98                    model.setParam(phi_label, 180.0 * 2.0 / npts_alpha * j) 
    9999                    for k in range(npts): 
    100                         model.setParam(psi_label, math.pi * 2.0 / npts * k) 
     100                        model.setParam(psi_label, 180.0 * 2.0 / npts * k) 
    101101                        if str(model.run([q, 0])).count("INF")>0:                         
    102                             print "ERROR", q, theta, math.pi * 2.0 / npts * k 
     102                            print "ERROR", q, theta, 180.0 * 2.0 / npts * k 
    103103                             
    104104                        # sin() is due to having not uniform bin number density wrt the q plane. 
    105                         sum += model.run([q, 0])*math.sin(theta) 
    106                         weight += math.sin(theta)  
     105                        sum += model.run([q, 0])*math.sin(theta*math.pi/180.0) 
     106                        weight += math.sin(theta*math.pi/180.0)  
    107107 
    108108            value = sum/weight #*math.pi/2.0 
Note: See TracChangeset for help on using the changeset viewer.