Changeset 011e0e4 in sasview for sansmodels/src/c_extensions/corefourshell.h
- Timestamp:
- Jan 5, 2012 2:23:15 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:
- 98fdccd
- Parents:
- 0ba3b08
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/c_extensions/corefourshell.h
r67424cd r011e0e4 1 1 #if !defined(corefourshell_h) 2 2 #define corefourshell_h 3 #include "parameters.hh" 3 4 4 5 /** 5 6 * Structure definition for sphere parameters 6 7 */ 7 8 9 10 11 12 13 14 15 16 17 18 19 8 //[PYTHONCLASS] = CoreFourShellModel 9 //[DISP_PARAMS] = rad_core0, thick_shell1,thick_shell2,thick_shell3,thick_shell4 10 //[DESCRIPTION] =<text> Calculates the scattering intensity from a core-4 shell structure. 11 // scale = scale factor * volume fraction 12 // rad_core0: the radius of the core 13 // sld_core0: the SLD of the core 14 // thick_shelli: the thickness of the i'th shell from the core 15 // sld_shelli: the SLD of the i'th shell from the core 16 // sld_solv: the SLD of the solvent 17 // background: incoherent background 18 // </text> 19 //[FIXED]=<text> thick_shell4.width; thick_shell1.width;thick_shell2.width;thick_shell3.width;rad_core0.width </text> 20 //[ORIENTATION_PARAMS]= <text> </text> 20 21 21 typedef struct { 22 /// Scale factor 23 // [DEFAULT]=scale= 1.0 24 double scale; 22 class CoreFourShellModel{ 23 public: 24 // Model parameters 25 /// Scale factor 26 // [DEFAULT]=scale= 1.0 27 Parameter scale; 25 28 26 ///Radius of the core0 [A]27 28 doublerad_core0;29 /// Radius of the core0 [A] 30 // [DEFAULT]=rad_core0=60. [A] 31 Parameter rad_core0; 29 32 30 ///sld of core0 [1/A^(2)]31 32 doublesld_core0;33 /// sld of core0 [1/A^(2)] 34 // [DEFAULT]=sld_core0= 6.4e-6 [1/A^(2)] 35 Parameter sld_core0; 33 36 34 ///thickness of the shell1 [A]35 36 doublethick_shell1;37 /// thickness of the shell1 [A] 38 // [DEFAULT]=thick_shell1=10.0 [A] 39 Parameter thick_shell1; 37 40 38 ///sld of shell1 [1/A^(2)]39 40 doublesld_shell1;41 /// sld of shell1 [1/A^(2)] 42 // [DEFAULT]=sld_shell1= 1.0e-6 [1/A^(2)] 43 Parameter sld_shell1; 41 44 42 ///thickness of the shell2 [A]43 44 doublethick_shell2;45 /// thickness of the shell2 [A] 46 // [DEFAULT]=thick_shell2=10.0 [A] 47 Parameter thick_shell2; 45 48 46 ///sld of shell2 [1/A^(2)]47 48 doublesld_shell2;49 /// sld of shell2 [1/A^(2)] 50 // [DEFAULT]=sld_shell2= 2.0e-6 [1/A^(2)] 51 Parameter sld_shell2; 49 52 50 ///thickness of the shell3 [A]51 52 doublethick_shell3;53 /// thickness of the shell3 [A] 54 // [DEFAULT]=thick_shell3=10.0 [A] 55 Parameter thick_shell3; 53 56 54 ///sld of shell3 [1/A^(2)]55 56 doublesld_shell3;57 /// sld of shell3 [1/A^(2)] 58 // [DEFAULT]=sld_shell3= 3.0e-6 [1/A^(2)] 59 Parameter sld_shell3; 57 60 58 ///thickness of the shell4 [A]59 60 doublethick_shell4;61 /// thickness of the shell4 [A] 62 // [DEFAULT]=thick_shell4=10.0 [A] 63 Parameter thick_shell4; 61 64 62 ///sld of shell4 [1/A^(2)]63 64 doublesld_shell4;65 /// sld of shell4 [1/A^(2)] 66 // [DEFAULT]=sld_shell4= 4.0e-6 [1/A^(2)] 67 Parameter sld_shell4; 65 68 66 ///sld_solv[1/A^(2)]67 68 doublesld_solv;69 /// sld_solv[1/A^(2)] 70 // [DEFAULT]=sld_solv= 6.4e-6 [1/A^(2)] 71 Parameter sld_solv; 69 72 70 /// Incoherent Background [1/cm] 71 // [DEFAULT]=background=0.001 [1/cm] 72 double background; 73 } CoreFourShellParameters; 73 /// Incoherent Background [1/cm] 74 // [DEFAULT]=background=0.001 [1/cm] 75 Parameter background; 74 76 77 // Constructor 78 CoreFourShellModel(); 75 79 76 77 /// 1D scattering function 78 //double corefourshell_analytical_1D(CoreFourShellParameters *pars, double q); 79 80 /// 2D scattering function 81 //double corefourshell_analytical_2D(CoreFourShellParameters *pars, double q, double phi); 82 //double corefourshell_analytical_2DXY(CoreFourShellParameters *pars, double qx, double qy); 80 // Operators to get I(Q) 81 double operator()(double q); 82 double operator()(double qx, double qy); 83 double calculate_ER(); 84 double evaluate_rphi(double q, double phi); 85 }; 83 86 84 87 #endif
Note: See TracChangeset
for help on using the changeset viewer.