source:
sasview/sansmodels/src/include/sphere.h
@
446c8d9
Last change on this file since 446c8d9 was 101065a, checked in by Mathieu Doucet <doucetm@…>, 13 years ago | |
---|---|
|
|
File size: 1.2 KB |
Rev | Line | |
---|---|---|
[ae3ce4e] | 1 | #if !defined(sphere_h) |
2 | #define sphere_h | |
[a8eab1c] | 3 | #include "parameters.hh" |
[ae3ce4e] | 4 | |
[0f5bc9f] | 5 | /** |
6 | * Structure definition for sphere parameters | |
[ae3ce4e] | 7 | */ |
8 | //[PYTHONCLASS] = SphereModel | |
[0f5bc9f] | 9 | //[DISP_PARAMS] = radius |
[f10063e] | 10 | //[DESCRIPTION] =<text>P(q)=(scale/V)*[3V(sldSph-sldSolv)*(sin(qR)-qRcos(qR)) |
[1ed3834] | 11 | // /(qR)^3]^(2)+bkg |
12 | // | |
13 | // bkg:background, R: radius of sphere | |
14 | // V:The volume of the scatter | |
[f10063e] | 15 | // sldSph: the SLD of the sphere |
16 | // sldSolv: the SLD of the solvent | |
[1ed3834] | 17 | // |
18 | // </text> | |
[da3dae3] | 19 | //[FIXED]= radius.width |
[25a608f5] | 20 | //[ORIENTATION_PARAMS]= <text> </text> |
[70faf5d] | 21 | |
[a8eab1c] | 22 | class SphereModel{ |
23 | public: | |
24 | // Model parameters | |
25 | /// Scale factor | |
26 | // [DEFAULT]=scale= 1.0 | |
27 | Parameter scale; | |
[0f5bc9f] | 28 | |
[a8eab1c] | 29 | /// Radius of sphere [A] |
30 | // [DEFAULT]=radius=60.0 [A] | |
31 | Parameter radius; | |
[0f5bc9f] | 32 | |
[a8eab1c] | 33 | /// sldSph [1/A^(2)] |
34 | // [DEFAULT]=sldSph= 2.0e-6 [1/A^(2)] | |
35 | Parameter sldSph; | |
[f10063e] | 36 | |
[a8eab1c] | 37 | /// sldSolv [1/A^(2)] |
38 | // [DEFAULT]=sldSolv= 1.0e-6 [1/A^(2)] | |
39 | Parameter sldSolv; | |
[0f5bc9f] | 40 | |
[a8eab1c] | 41 | /// Incoherent Background [1/cm] |
42 | // [DEFAULT]=background=0 [1/cm] | |
43 | Parameter background; | |
[ae3ce4e] | 44 | |
[a8eab1c] | 45 | // Constructor |
46 | SphereModel(); | |
[ae3ce4e] | 47 | |
[a8eab1c] | 48 | // Operators to get I(Q) |
49 | double operator()(double q); | |
50 | double operator()(double qx, double qy); | |
51 | double calculate_ER(); | |
52 | double evaluate_rphi(double q, double phi); | |
53 | }; | |
[ae3ce4e] | 54 | |
55 | ||
56 | #endif |
Note: See TracBrowser
for help on using the repository browser.