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 f866fb5 was
a269378,
checked in by Kieran Campbell <kieranrcampbell@…>, 12 years ago
|
Ported Teubner-Strey model python → C++
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | #ifndef TEUBNER_STREY_H |
---|
2 | #define TEUBNER_STREY_H |
---|
3 | |
---|
4 | #include "parameters.hh" |
---|
5 | |
---|
6 | /** |
---|
7 | This software was developed by Institut Laue-Langevin as part of |
---|
8 | Distributed Data Analysis of Neutron Scattering Experiments (DANSE). |
---|
9 | |
---|
10 | Copyright 2012 Institut Laue-Langevin |
---|
11 | |
---|
12 | **/ |
---|
13 | |
---|
14 | /** |
---|
15 | Scattering model class for the Teubner-Strey model given by |
---|
16 | Provide F(x) = 1/( scale + c1*(x)^(2)+ c2*(x)^(4)) + bkd |
---|
17 | **/ |
---|
18 | |
---|
19 | |
---|
20 | // definition for model parameters |
---|
21 | |
---|
22 | // [PYTHONCLASS] = TeubnerStreyModel |
---|
23 | // [DISP_PARAMS] = scale, c1, c2, background |
---|
24 | // [DESCRIPTION] = <text>F(x) = 1/( scale + c1*(x)^(2)+ c2*(x)^(4)) + bkd </text> |
---|
25 | // </text> |
---|
26 | // [FIXED] = |
---|
27 | // [ORIENTATION_PARAMS] = |
---|
28 | |
---|
29 | class TeubnerStreyModel { |
---|
30 | |
---|
31 | public: |
---|
32 | // Model parameters |
---|
33 | |
---|
34 | /// Scale factor |
---|
35 | // [DEFAULT]=scale=0.1 |
---|
36 | Parameter scale; |
---|
37 | |
---|
38 | /// c1 |
---|
39 | // [DEFAULT]=c1=-30.0 |
---|
40 | Parameter c1; |
---|
41 | |
---|
42 | /// c2 |
---|
43 | // [DEFAULT]=c2=5000.0 |
---|
44 | Parameter c2; |
---|
45 | |
---|
46 | /// Background |
---|
47 | // [DEFAULT]=background=0.0 |
---|
48 | Parameter background; |
---|
49 | |
---|
50 | TeubnerStreyModel(); |
---|
51 | |
---|
52 | // Operators to get I(Q) |
---|
53 | double operator()(double q); |
---|
54 | double operator()(double qx, double qy); |
---|
55 | double calculate_ER(); |
---|
56 | double calculate_VR(); |
---|
57 | double evaluate_rphi(double q, double phi); |
---|
58 | }; |
---|
59 | |
---|
60 | |
---|
61 | #endif |
---|
62 | |
---|
63 | |
---|
64 | |
---|
Note: See
TracBrowser
for help on using the repository browser.