Changeset f425805 in sasview
- Timestamp:
- Jan 4, 2012 2:51:34 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:
- 43ccd258
- Parents:
- acd0fd10
- Location:
- sansmodels/src
- Files:
-
- 4 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 -
sansmodels/src/c_models/barbell.cpp
r85b856b rf425805 21 21 22 22 #include <math.h> 23 #include "models.hh"23 //#include "models.hh" 24 24 #include "parameters.hh" 25 25 #include <stdio.h> -
sansmodels/src/c_models/models.hh
r67424cd rf425805 41 41 // Constructor 42 42 CylinderModel(); 43 44 // Operators to get I(Q)45 double operator()(double q);46 double operator()(double qx, double qy);47 double calculate_ER();48 double evaluate_rphi(double q, double phi);49 };50 51 class BarBellModel{52 public:53 // Model parameters54 Parameter scale;55 Parameter rad_bar;56 Parameter len_bar;57 Parameter rad_bell;58 Parameter sld_barbell;59 Parameter sld_solv;60 Parameter background;61 Parameter theta;62 Parameter phi;63 64 // Constructor65 BarBellModel();66 43 67 44 // Operators to get I(Q) -
sansmodels/src/python_wrapper/CBarBellModel.cpp
r85b856b rf425805 18 18 * 19 19 * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY 20 * DO NOT MODIFY THIS FILE, MODIFY barbell.h20 * DO NOT MODIFY THIS FILE, MODIFY [INCLUDE_FILE] 21 21 * AND RE-RUN THE GENERATOR SCRIPT 22 22 * … … 33 33 #include <math.h> 34 34 #include <time.h> 35 //#include "barbell.h" 36 } 37 38 #include " models.hh"35 36 } 37 38 #include "barbell.h" 39 39 #include "dispersion_visitor.hh" 40 40
Note: See TracChangeset
for help on using the changeset viewer.