Changeset 318b5bbb in sasview for sansmodels/include/sphere.h


Ignore:
Timestamp:
Dec 18, 2012 10:55:24 AM (12 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:
6550b64
Parents:
0203ade
Message:

Added polarization and magnetic stuffs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansmodels/include/sphere.h

    rfa6db8b r318b5bbb  
    1818 //             </text> 
    1919 //[FIXED]=  radius.width 
    20  //[ORIENTATION_PARAMS]= <text> </text> 
     20 //[ORIENTATION_PARAMS]= <text> M0_sld_sph; M_theta_sph; M_phi_sph;M0_sld_solv; M_theta_solv; M_phi_solv; Up_frac_i; Up_frac_f; Up_theta; </text> 
     21 //[MAGNETIC_PARAMS]= <text> M0_sld_sph; M_theta_sph; M_phi_sph; M0_sld_solv; M_theta_solv; M_phi_solv; Up_frac_i; Up_frac_f; Up_theta; </text> 
    2122 //[CATEGORY] = Shapes & Spheres 
    22  
     23  
    2324class SphereModel{ 
    2425public: 
    25   // Model parameters 
    26   /// Scale factor 
    27   //  [DEFAULT]=scale= 1.0 
    28   Parameter scale; 
     26        // Model parameters 
     27        /// Scale factor 
     28        //  [DEFAULT]=scale= 1.0 
     29        Parameter scale; 
    2930 
    30   /// Radius of sphere [A] 
    31   //  [DEFAULT]=radius=60.0 [A] 
    32   Parameter radius; 
     31        /// Radius of sphere [A] 
     32        //  [DEFAULT]=radius=60.0 [A] 
     33        Parameter radius; 
    3334 
    34   /// sldSph [1/A^(2)] 
    35   //  [DEFAULT]=sldSph= 2.0e-6 [1/A^(2)] 
    36   Parameter sldSph; 
     35        /// sldSph [1/A^(2)] 
     36        //  [DEFAULT]=sldSph= 2.0e-6 [1/A^(2)] 
     37        Parameter sldSph; 
    3738 
    38   /// sldSolv [1/A^(2)] 
    39   //  [DEFAULT]=sldSolv= 1.0e-6 [1/A^(2)] 
    40   Parameter sldSolv; 
     39        /// sldSolv [1/A^(2)] 
     40        //  [DEFAULT]=sldSolv= 1.0e-6 [1/A^(2)] 
     41        Parameter sldSolv; 
    4142 
    42 /// Incoherent Background [1/cm] 
    43 //  [DEFAULT]=background=0 [1/cm] 
    44 Parameter background; 
     43        /// Incoherent Background [1/cm] 
     44        //  [DEFAULT]=background=0 [1/cm] 
     45        Parameter background; 
    4546 
    46   // Constructor 
    47   SphereModel(); 
     47        /// M0_sld_sph 
     48        //  [DEFAULT]=M0_sld_sph=0.0e-6 [1/A^(2)] 
     49        Parameter M0_sld_sph; 
    4850 
    49   // Operators to get I(Q) 
    50   double operator()(double q); 
    51   double operator()(double qx, double qy); 
    52   double calculate_ER(); 
    53   double calculate_VR(); 
    54   double evaluate_rphi(double q, double phi); 
     51        /// M_theta_sph 
     52        //  [DEFAULT]=M_theta_sph=0.0 [deg] 
     53        Parameter M_theta_sph; 
     54 
     55        /// M_phi_sph 
     56        //  [DEFAULT]=M_phi_sph=0.0 [deg] 
     57        Parameter M_phi_sph; 
     58 
     59        /// M0_sld_solv 
     60        //  [DEFAULT]=M0_sld_solv=0.0e-6 [1/A^(2)] 
     61        Parameter M0_sld_solv; 
     62 
     63        /// M_theta_solv 
     64        //  [DEFAULT]=M_theta_solv=0.0 [deg] 
     65        Parameter M_theta_solv; 
     66 
     67        /// M_phi_solv 
     68        //  [DEFAULT]=M_phi_solv=0.0 [deg] 
     69        Parameter M_phi_solv; 
     70         
     71        /// Up_frac_i 
     72        //  [DEFAULT]=Up_frac_i=0.5 [u/(u+d)] 
     73        Parameter Up_frac_i; 
     74 
     75        /// Up_frac_f 
     76        //  [DEFAULT]=Up_frac_f=0.5 [u/(u+d)] 
     77        Parameter Up_frac_f; 
     78 
     79        /// Up_theta 
     80        //  [DEFAULT]=Up_theta=0.0 [deg] 
     81        Parameter Up_theta; 
     82 
     83 
     84        // Constructor 
     85        SphereModel(); 
     86 
     87        // Operators to get I(Q) 
     88        double operator()(double q); 
     89        double operator()(double qx, double qy); 
     90        double calculate_ER(); 
     91        double calculate_VR(); 
     92        double evaluate_rphi(double q, double phi); 
    5593}; 
    5694 
Note: See TracChangeset for help on using the changeset viewer.