ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2release_4.0.1ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change
on this file since 74f419d was
79492222,
checked in by krzywon, 10 years ago
|
Changed the file and folder names to remove all SANS references.
|
-
Property mode set to
100644
|
File size:
2.2 KB
|
Rev | Line | |
---|
[503a972] | 1 | #if !defined(sphere_h) |
---|
| 2 | #define sphere_h |
---|
| 3 | #include "parameters.hh" |
---|
| 4 | |
---|
| 5 | /** |
---|
| 6 | * Structure definition for sphere parameters |
---|
| 7 | */ |
---|
| 8 | //[PYTHONCLASS] = SphereModel |
---|
| 9 | //[DISP_PARAMS] = radius |
---|
| 10 | //[DESCRIPTION] =<text>P(q)=(scale/V)*[3V(sldSph-sldSolv)*(sin(qR)-qRcos(qR)) |
---|
| 11 | // /(qR)^3]^(2)+bkg |
---|
| 12 | // |
---|
| 13 | // bkg:background, R: radius of sphere |
---|
| 14 | // V:The volume of the scatter |
---|
| 15 | // sldSph: the SLD of the sphere |
---|
| 16 | // sldSolv: the SLD of the solvent |
---|
| 17 | // |
---|
| 18 | // </text> |
---|
| 19 | //[FIXED]= radius.width |
---|
[318b5bbb] | 20 | //[ORIENTATION_PARAMS]= <text> M0_sld_sph; M_theta_sph; M_phi_sph;M0_sld_solv; M_theta_solv; M_phi_solv; Up_frac_i; Up_frac_f; Up_theta; </text> |
---|
| 21 | //[MAGNETIC_PARAMS]= <text> M0_sld_sph; M_theta_sph; M_phi_sph; M0_sld_solv; M_theta_solv; M_phi_solv; Up_frac_i; Up_frac_f; Up_theta; </text> |
---|
[fa6db8b] | 22 | //[CATEGORY] = Shapes & Spheres |
---|
[318b5bbb] | 23 | |
---|
[503a972] | 24 | class SphereModel{ |
---|
| 25 | public: |
---|
[318b5bbb] | 26 | // Model parameters |
---|
| 27 | /// Scale factor |
---|
| 28 | // [DEFAULT]=scale= 1.0 |
---|
| 29 | Parameter scale; |
---|
| 30 | |
---|
| 31 | /// Radius of sphere [A] |
---|
| 32 | // [DEFAULT]=radius=60.0 [A] |
---|
| 33 | Parameter radius; |
---|
| 34 | |
---|
| 35 | /// sldSph [1/A^(2)] |
---|
| 36 | // [DEFAULT]=sldSph= 2.0e-6 [1/A^(2)] |
---|
| 37 | Parameter sldSph; |
---|
| 38 | |
---|
| 39 | /// sldSolv [1/A^(2)] |
---|
| 40 | // [DEFAULT]=sldSolv= 1.0e-6 [1/A^(2)] |
---|
| 41 | Parameter sldSolv; |
---|
| 42 | |
---|
| 43 | /// Incoherent Background [1/cm] |
---|
| 44 | // [DEFAULT]=background=0 [1/cm] |
---|
| 45 | Parameter background; |
---|
| 46 | |
---|
| 47 | /// M0_sld_sph |
---|
| 48 | // [DEFAULT]=M0_sld_sph=0.0e-6 [1/A^(2)] |
---|
| 49 | Parameter M0_sld_sph; |
---|
| 50 | |
---|
| 51 | /// M_theta_sph |
---|
| 52 | // [DEFAULT]=M_theta_sph=0.0 [deg] |
---|
| 53 | Parameter M_theta_sph; |
---|
| 54 | |
---|
| 55 | /// M_phi_sph |
---|
| 56 | // [DEFAULT]=M_phi_sph=0.0 [deg] |
---|
| 57 | Parameter M_phi_sph; |
---|
| 58 | |
---|
| 59 | /// M0_sld_solv |
---|
| 60 | // [DEFAULT]=M0_sld_solv=0.0e-6 [1/A^(2)] |
---|
| 61 | Parameter M0_sld_solv; |
---|
| 62 | |
---|
| 63 | /// M_theta_solv |
---|
| 64 | // [DEFAULT]=M_theta_solv=0.0 [deg] |
---|
| 65 | Parameter M_theta_solv; |
---|
| 66 | |
---|
| 67 | /// M_phi_solv |
---|
| 68 | // [DEFAULT]=M_phi_solv=0.0 [deg] |
---|
| 69 | Parameter M_phi_solv; |
---|
| 70 | |
---|
| 71 | /// Up_frac_i |
---|
| 72 | // [DEFAULT]=Up_frac_i=0.5 [u/(u+d)] |
---|
| 73 | Parameter Up_frac_i; |
---|
| 74 | |
---|
| 75 | /// Up_frac_f |
---|
| 76 | // [DEFAULT]=Up_frac_f=0.5 [u/(u+d)] |
---|
| 77 | Parameter Up_frac_f; |
---|
| 78 | |
---|
| 79 | /// Up_theta |
---|
| 80 | // [DEFAULT]=Up_theta=0.0 [deg] |
---|
| 81 | Parameter Up_theta; |
---|
| 82 | |
---|
| 83 | |
---|
| 84 | // Constructor |
---|
| 85 | SphereModel(); |
---|
| 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 calculate_VR(); |
---|
| 92 | double evaluate_rphi(double q, double phi); |
---|
[503a972] | 93 | }; |
---|
| 94 | |
---|
| 95 | |
---|
| 96 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.