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 0b12abb5 was
2c4b289,
checked in by Gervaise Alina <gervyh@…>, 15 years ago
|
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Rev | Line | |
---|
[2c4b289] | 1 | /** |
---|
| 2 | * Scattering model for a sphere |
---|
| 3 | * @author: Gervaise B alina / UTK |
---|
| 4 | */ |
---|
| 5 | |
---|
| 6 | #include "binaryHS_PSF11.h" |
---|
| 7 | #include "libSphere.h" |
---|
| 8 | #include <math.h> |
---|
| 9 | |
---|
| 10 | |
---|
| 11 | /** |
---|
| 12 | * Function to evaluate 1D scattering function |
---|
| 13 | * @param pars: parameters of the binary hard sphere |
---|
| 14 | * @param q: q-value |
---|
| 15 | * @return: function value |
---|
| 16 | */ |
---|
| 17 | double binaryHS_PSF11_analytical_1D(BinaryHSPSF11Parameters *pars, double q) { |
---|
| 18 | double dp[8]; |
---|
| 19 | |
---|
| 20 | dp[0] = pars->l_radius; |
---|
| 21 | dp[1] = pars->s_radius; |
---|
| 22 | dp[2] = pars->vol_frac_ls; |
---|
| 23 | dp[3] = pars->vol_frac_ss; |
---|
| 24 | dp[4] = pars->ls_sld; |
---|
| 25 | dp[5] = pars->ss_sld; |
---|
| 26 | dp[6] = pars->solvent_sld; |
---|
| 27 | dp[7] = pars->background; |
---|
| 28 | |
---|
| 29 | return BinaryHS_PSF11(dp, q); |
---|
| 30 | } |
---|
| 31 | |
---|
| 32 | /** |
---|
| 33 | * Function to evaluate 2D scattering function |
---|
| 34 | * @param pars: parameters of the binary hard sphere |
---|
| 35 | * @param q: q-value |
---|
| 36 | * @return: function value |
---|
| 37 | */ |
---|
| 38 | double binaryHS_PSF11_analytical_2D(BinaryHSPSF11Parameters *pars, double q, double phi) { |
---|
| 39 | return binaryHS_PSF11_analytical_1D(pars,q); |
---|
| 40 | } |
---|
| 41 | |
---|
| 42 | double binaryHS_PSF11_analytical_2DXY(BinaryHSPSF11Parameters *pars, double qx, double qy){ |
---|
| 43 | return binaryHS_PSF11_analytical_1D(pars,sqrt(qx*qx+qy*qy)); |
---|
| 44 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.