Changeset df88829 in sasview for sansmodels/src/c_extensions
- Timestamp:
- Jan 4, 2012 6:23:43 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:
- c637521
- Parents:
- 8343e18
- Location:
- sansmodels/src/c_extensions
- Files:
-
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/c_extensions/csparallelepiped.h
r67424cd rdf88829 5 5 #if !defined(csparallelepiped_h) 6 6 #define csparallelepiped_h 7 #include "parameters.hh" 7 8 /** Structure definition for CSParallelepiped parameters 8 9 * [PYTHONCLASS] = CSParallelepipedModel … … 28 29 29 30 **/ 30 typedef struct {31 /// Scale factor32 // [DEFAULT]=scale=1.033 double scale;34 /// Length of short edge of the parallelepiped [A]35 // [DEFAULT]=shortA=35 [A]36 double shortA;37 /// Length of mid edge of the parallelepiped [A]38 // [DEFAULT]=midB=75 [A]39 double midB;40 /// Length of long edge of the parallelepiped [A]41 // [DEFAULT]=longC=400 [A]42 double longC;43 /// Thickness of rimA [A]44 // [DEFAULT]=rimA=10 [A]45 double rimA;46 /// Thickness of rimB [A] [A]47 // [DEFAULT]=rimB=10 [A]48 double rimB;49 /// Thickness of rimC [A] [A]50 // [DEFAULT]=rimC=10 [A]51 double rimC;52 /// SLD_rimA [1/A^(2)]53 // [DEFAULT]=sld_rimA=2e-6 [1/A^(2)]54 double sld_rimA;55 /// SLD_rimB [1/A^(2)]56 // [DEFAULT]=sld_rimB=4e-6 [1/A^(2)]57 double sld_rimB;58 /// SLD_rimC [1/A^(2)]59 // [DEFAULT]=sld_rimC=2e-6 [1/A^(2)]60 double sld_rimC;61 /// SLD_pcore [1/A^(2)]62 // [DEFAULT]=sld_pcore=1e-6 [1/A^(2)]63 double sld_pcore;64 /// sld_solv [1/A^(2)]65 // [DEFAULT]=sld_solv=6e-6 [1/A^(2)]66 double sld_solv;67 /// Incoherent Background [1/cm]68 // [DEFAULT]=background=0.06 [1/cm]69 double background;70 /// Orientation of the parallelepiped axis w/respect incoming beam [deg]71 // [DEFAULT]=parallel_theta=0.0 [deg]72 double parallel_theta;73 /// Orientation of the longitudinal axis of the parallelepiped in the plane of the detector [deg]74 // [DEFAULT]=parallel_phi=0.0 [deg]75 double parallel_phi;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]78 double parallel_psi;79 31 32 class CSParallelepipedModel{ 33 public: 34 // Model parameters 35 /// Scale factor 36 // [DEFAULT]=scale=1.0 37 Parameter scale; 38 /// Length of short edge of the parallelepiped [A] 39 // [DEFAULT]=shortA=35 [A] 40 Parameter shortA; 41 /// Length of mid edge of the parallelepiped [A] 42 // [DEFAULT]=midB=75 [A] 43 Parameter midB; 44 /// Length of long edge of the parallelepiped [A] 45 // [DEFAULT]=longC=400 [A] 46 Parameter longC; 47 /// Thickness of rimA [A] 48 // [DEFAULT]=rimA=10 [A] 49 Parameter rimA; 50 /// Thickness of rimB [A] [A] 51 // [DEFAULT]=rimB=10 [A] 52 Parameter rimB; 53 /// Thickness of rimC [A] [A] 54 // [DEFAULT]=rimC=10 [A] 55 Parameter rimC; 56 /// SLD_rimA [1/A^(2)] 57 // [DEFAULT]=sld_rimA=2e-6 [1/A^(2)] 58 Parameter sld_rimA; 59 /// SLD_rimB [1/A^(2)] 60 // [DEFAULT]=sld_rimB=4e-6 [1/A^(2)] 61 Parameter sld_rimB; 62 /// SLD_rimC [1/A^(2)] 63 // [DEFAULT]=sld_rimC=2e-6 [1/A^(2)] 64 Parameter sld_rimC; 65 /// SLD_pcore [1/A^(2)] 66 // [DEFAULT]=sld_pcore=1e-6 [1/A^(2)] 67 Parameter sld_pcore; 68 /// sld_solv [1/A^(2)] 69 // [DEFAULT]=sld_solv=6e-6 [1/A^(2)] 70 Parameter sld_solv; 71 /// Incoherent Background [1/cm] 72 // [DEFAULT]=background=0.06 [1/cm] 73 Parameter background; 74 /// Orientation of the parallelepiped axis w/respect incoming beam [deg] 75 // [DEFAULT]=parallel_theta=0.0 [deg] 76 Parameter parallel_theta; 77 /// Orientation of the longitudinal axis of the parallelepiped in the plane of the detector [deg] 78 // [DEFAULT]=parallel_phi=0.0 [deg] 79 Parameter parallel_phi; 80 /// Orientation of the cross-sectional minor axis of the parallelepiped in the plane of the detector [deg] 81 // [DEFAULT]=parallel_psi=0.0 [deg] 82 Parameter parallel_psi; 80 83 81 } CSParallelepipedParameters; 84 // Constructor 85 CSParallelepipedModel(); 82 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 evaluate_rphi(double q, double phi); 92 }; 83 93 84 85 /// 1D scattering function86 double csparallelepiped_analytical_1D(CSParallelepipedParameters *pars, double q);87 88 /// 2D scattering function89 double csparallelepiped_analytical_2D(CSParallelepipedParameters *pars, double q, double phi);90 double csparallelepiped_analytical_2DXY(CSParallelepipedParameters *pars, double qx, double qy);91 double csparallelepiped_analytical_2D_scaled(CSParallelepipedParameters *pars, double q, double q_x, double q_y);92 94 #endif
Note: See TracChangeset
for help on using the changeset viewer.