Changeset 0c2389e in sasview for sansmodels/src/c_extensions
- Timestamp:
- Jan 4, 2012 6:00:52 PM (13 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:
- 8343e18
- Parents:
- dbddbf5
- Location:
- sansmodels/src/c_extensions
- Files:
-
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/c_extensions/capcyl.h
r67424cd r0c2389e 1 1 #if !defined(capcyl_h) 2 2 #define capcyl_h 3 #include "parameters.hh" 3 4 4 5 /** … … 27 28 //[ORIENTATION_PARAMS]= <text> phi; theta; phi.width; theta.width</text> 28 29 29 typedef struct { 30 /// Scale factor 31 // [DEFAULT]=scale= 1.0 32 double scale; 30 class CappedCylinderModel{ 31 public: 32 // Model parameters 33 /// Scale factor 34 // [DEFAULT]=scale= 1.0 35 Parameter scale; 33 36 34 ///rad_cyl [A]35 36 doublerad_cyl;37 /// rad_cyl [A] 38 // [DEFAULT]=rad_cyl=20.0 [A] 39 Parameter rad_cyl; 37 40 38 ///length of the cylinder39 40 doublelen_cyl;41 /// length of the cylinder 42 // [DEFAULT]=len_cyl=400.0 [A] 43 Parameter len_cyl; 41 44 42 ///Radius of sphere [A]43 44 doublerad_cap;45 /// Radius of sphere [A] 46 // [DEFAULT]=rad_cap=40.0 [A] 47 Parameter rad_cap; 45 48 46 ///sld_capcyl [1/A^(2)]47 48 doublesld_capcyl;49 /// sld_capcyl [1/A^(2)] 50 // [DEFAULT]=sld_capcyl= 1.0e-6 [1/A^(2)] 51 Parameter sld_capcyl; 49 52 50 ///sld_solv [1/A^(2)]51 52 doublesld_solv;53 /// sld_solv [1/A^(2)] 54 // [DEFAULT]=sld_solv= 6.3e-6 [1/A^(2)] 55 Parameter sld_solv; 53 56 54 55 56 doublebackground;57 /// Incoherent Background [1/cm] 58 // [DEFAULT]=background=0.0 [1/cm] 59 Parameter background; 57 60 58 /// Angle of the main axis against z-axis in detector plane [deg] 59 // [DEFAULT]=theta=0.0 [deg] 60 double theta; 61 /// Azimuthal angle around z-axis in detector plane [deg] 62 // [DEFAULT]=phi=0.0 [deg] 63 double phi; 61 /// Angle of the main axis against z-axis in detector plane [deg] 62 // [DEFAULT]=theta=0.0 [deg] 63 Parameter theta; 64 64 65 } CapCylParameters; 65 /// Azimuthal angle around z-axis in detector plane [deg] 66 // [DEFAULT]=phi=0.0 [deg] 67 Parameter phi; 66 68 69 // Constructor 70 CappedCylinderModel(); 67 71 68 69 /// 1D scattering function 70 double capcyl_analytical_1D(CapCylParameters *pars, double q); 71 72 /// 2D scattering function 73 double capcyl_analytical_2D(CapCylParameters *pars, double q, double phi); 74 double capcyl_analytical_2DXY(CapCylParameters *pars, double qx, double qy); 75 double capcyl_analytical_2D_scaled(CapCylParameters *pars, double q, double q_x, double q_y); 72 // Operators to get I(Q) 73 double operator()(double q); 74 double operator()(double qx, double qy); 75 double calculate_ER(); 76 double evaluate_rphi(double q, double phi); 77 }; 76 78 77 79 #endif
Note: See TracChangeset
for help on using the changeset viewer.