Changeset f425805 in sasview for sansmodels/src/c_extensions/barbell.h
- Timestamp:
- Jan 4, 2012 4:51:34 PM (12 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:
- 43ccd258
- Parents:
- acd0fd10
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/c_extensions/barbell.h
r67424cd rf425805 1 1 #if !defined(barbell_h) 2 2 #define barbell_h 3 3 #include "parameters.hh" 4 4 /** 5 5 * Structure definition for BarBell parameters … … 29 29 //[ORIENTATION_PARAMS]= <text> phi; theta; phi.width; theta.width</text> 30 30 31 typedef struct { 32 /// Scale factor 33 // [DEFAULT]=scale= 1.0 34 double scale; 31 class BarBellModel { 32 public: 33 // Model parameters 35 34 36 /// rad_bar [A]37 // [DEFAULT]=rad_bar=20.0 [A]38 double rad_bar;35 /// Scale factor 36 // [DEFAULT]=scale= 1.0 37 Parameter scale; 39 38 40 /// length of thebar [A]41 // [DEFAULT]=len_bar=400.0 [A]42 double len_bar;39 /// rad_bar [A] 40 // [DEFAULT]=rad_bar=20.0 [A] 41 Parameter rad_bar; 43 42 44 /// Radius of sphere[A]45 // [DEFAULT]=rad_bell=40.0 [A]46 double rad_bell;43 /// length of the bar [A] 44 // [DEFAULT]=len_bar=400.0 [A] 45 Parameter len_bar; 47 46 48 /// sld_barbell [1/A^(2)]49 // [DEFAULT]=sld_barbell= 1.0e-6 [1/A^(2)]50 double sld_barbell;47 /// Radius of sphere [A] 48 // [DEFAULT]=rad_bell=40.0 [A] 49 Parameter rad_bell; 51 50 52 /// sld_solv[1/A^(2)]53 // [DEFAULT]=sld_solv= 6.3e-6 [1/A^(2)]54 double sld_solv;51 /// sld_barbell [1/A^(2)] 52 // [DEFAULT]=sld_barbell= 1.0e-6 [1/A^(2)] 53 Parameter sld_barbell; 55 54 56 /// Incoherent Background [1/cm]57 // [DEFAULT]=background=0.0 [1/cm]58 double background;55 /// sld_solv [1/A^(2)] 56 // [DEFAULT]=sld_solv= 6.3e-6 [1/A^(2)] 57 Parameter sld_solv; 59 58 60 /// Angle of the main axis against z-axis in detector plane [deg] 61 // [DEFAULT]=theta=0.0 [deg] 62 double theta; 63 /// Azimuthal angle around z-axis in detector plane [deg] 64 // [DEFAULT]=phi=0.0 [deg] 65 double phi; 59 /// Incoherent Background [1/cm] 60 // [DEFAULT]=background=0.0 [1/cm] 61 Parameter background; 66 62 67 } BarBellParameters; 63 /// Angle of the main axis against z-axis in detector plane [deg] 64 // [DEFAULT]=theta=0.0 [deg] 65 Parameter theta; 68 66 67 /// Azimuthal angle around z-axis in detector plane [deg] 68 // [DEFAULT]=phi=0.0 [deg] 69 Parameter phi; 69 70 71 // Constructor 72 BarBellModel(); 70 73 71 /// 1D scattering function 72 double barbell_analytical_1D(BarBellParameters *pars, double q); 73 74 /// 2D scattering function 75 double barbell_analytical_2D(BarBellParameters *pars, double q, double phi); 76 double barbell_analytical_2DXY(BarBellParameters *pars, double qx, double qy); 77 double barbell_analytical_2D_scaled(BarBellParameters *pars, double q, double q_x, double q_y); 74 // Operators to get I(Q) 75 double operator()(double q); 76 double operator()(double qx, double qy); 77 double calculate_ER(); 78 double evaluate_rphi(double q, double phi); 79 }; 78 80 79 81 #endif
Note: See TracChangeset
for help on using the changeset viewer.