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 d555416 was
6319646,
checked in by Jae Cho <jhjcho@…>, 13 years ago
|
new includes for scale fix for P*S
|
-
Property mode set to
100644
|
File size:
1.7 KB
|
Rev | Line | |
---|
[503a972] | 1 | #if !defined(fractal_h) |
---|
| 2 | #define fractal_h |
---|
| 3 | #include "parameters.hh" |
---|
| 4 | |
---|
| 5 | /** |
---|
| 6 | * Structure definition for sphere parameters |
---|
| 7 | */ |
---|
| 8 | //[PYTHONCLASS] = FractalModel |
---|
| 9 | //[DISP_PARAMS] = radius |
---|
| 10 | //[DESCRIPTION] =<text> The scattering intensity I(x) = P(|x|)*S(|x|) + background, where |
---|
| 11 | // p(x)= scale * V * delta^(2)* F(x*radius)^(2) |
---|
| 12 | // F(x) = 3*[sin(x)-x cos(x)]/x**3 |
---|
| 13 | // where delta = sldBlock -sldSolv. |
---|
| 14 | // scale = scale factor * Volume fraction |
---|
| 15 | // radius = Block radius |
---|
| 16 | // fractal_dim = Fractal dimension |
---|
| 17 | // cor_length = Correlation Length |
---|
| 18 | // sldBlock = SDL block |
---|
| 19 | // sldSolv = SDL solvent |
---|
| 20 | // background = background |
---|
| 21 | // </text> |
---|
| 22 | //[FIXED]= <text> radius.width </text> |
---|
| 23 | //[ORIENTATION_PARAMS]= <text> </text> |
---|
| 24 | |
---|
| 25 | class FractalModel{ |
---|
| 26 | public: |
---|
| 27 | // Model parameters |
---|
| 28 | /// Radius of gyration [A] |
---|
| 29 | // [DEFAULT]=radius=5.0 [A] |
---|
| 30 | Parameter radius; |
---|
| 31 | |
---|
| 32 | /// Scale factor |
---|
| 33 | // [DEFAULT]=scale= 0.05 |
---|
| 34 | Parameter scale; |
---|
| 35 | |
---|
| 36 | /// Fractal dimension |
---|
| 37 | // [DEFAULT]=fractal_dim=2.0 |
---|
| 38 | Parameter fractal_dim; |
---|
| 39 | |
---|
| 40 | /// Correlation Length [A] |
---|
| 41 | // [DEFAULT]=cor_length=100.0 [A] |
---|
| 42 | Parameter cor_length; |
---|
| 43 | |
---|
| 44 | /// SDL block [1/A^(2)] |
---|
| 45 | // [DEFAULT]=sldBlock=2.0e-6 [1/A^(2)] |
---|
| 46 | Parameter sldBlock; |
---|
| 47 | |
---|
| 48 | /// SDL solvent [1/A^(2)] |
---|
| 49 | // [DEFAULT]=sldSolv= 6.35e-6 [1/A^(2)] |
---|
| 50 | Parameter sldSolv; |
---|
| 51 | |
---|
| 52 | /// Incoherent Background [1/cm] |
---|
| 53 | // [DEFAULT]=background=0.0 [1/cm] |
---|
| 54 | Parameter background; |
---|
| 55 | |
---|
| 56 | // Constructor |
---|
| 57 | FractalModel(); |
---|
| 58 | |
---|
| 59 | // Operators to get I(Q) |
---|
| 60 | double operator()(double q); |
---|
| 61 | double operator()(double qx, double qy); |
---|
| 62 | double calculate_ER(); |
---|
[6319646] | 63 | double calculate_VR(); |
---|
[503a972] | 64 | double evaluate_rphi(double q, double phi); |
---|
| 65 | }; |
---|
| 66 | |
---|
| 67 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.