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 b3644f3 was
c724ccd,
checked in by Jae Cho <jhjcho@…>, 15 years ago
|
More models added and correction of Wrappergenerator on model parameter value precision
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | /** |
---|
2 | * Scattering model for a corefourshell sphere |
---|
3 | */ |
---|
4 | |
---|
5 | #include "corefourshell.h" |
---|
6 | #include "libSphere.h" |
---|
7 | #include <math.h> |
---|
8 | |
---|
9 | |
---|
10 | /** |
---|
11 | * Function to evaluate 1D scattering function |
---|
12 | * @param pars: parameters of the corefourshell |
---|
13 | * @param q: q-value |
---|
14 | * @return: function value |
---|
15 | */ |
---|
16 | double corefourshell_analytical_1D(CoreFourShellParameters *pars, double q) { |
---|
17 | double dp[13]; |
---|
18 | |
---|
19 | dp[0] = pars->scale; |
---|
20 | dp[1] = pars->rad_core; |
---|
21 | dp[2] = pars->sld_core; |
---|
22 | dp[3] = pars->thick_shell1; |
---|
23 | dp[4] = pars->sld_shell1; |
---|
24 | dp[5] = pars->thick_shell2; |
---|
25 | dp[6] = pars->sld_shell2; |
---|
26 | dp[7] = pars->thick_shell3; |
---|
27 | dp[8] = pars->sld_shell3; |
---|
28 | dp[9] = pars->thick_shell4; |
---|
29 | dp[10] = pars->sld_shell4; |
---|
30 | dp[11] = pars->sld_solv; |
---|
31 | dp[12] = pars->background; |
---|
32 | |
---|
33 | return FourShell(dp, q); |
---|
34 | } |
---|
35 | |
---|
36 | /** |
---|
37 | * Function to evaluate 2D scattering function |
---|
38 | * @param pars: parameters of the corefourshell |
---|
39 | * @param q: q-value |
---|
40 | * @return: function value |
---|
41 | */ |
---|
42 | double corefourshell_analytical_2D(CoreFourShellParameters *pars, double q, double phi) { |
---|
43 | return corefourshell_analytical_1D(pars,q); |
---|
44 | } |
---|
45 | |
---|
46 | double corefourshell_analytical_2DXY(CoreFourShellParameters *pars, double qx, double qy){ |
---|
47 | return corefourshell_analytical_1D(pars,sqrt(qx*qx+qy*qy)); |
---|
48 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.