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 be0c318 was
79492222,
checked in by krzywon, 10 years ago
|
Changed the file and folder names to remove all SANS references.
|
-
Property mode set to
100644
|
File size:
1.6 KB
|
Rev | Line | |
---|
[a8d3b4f] | 1 | #ifndef STAR_POLYMER_H |
---|
| 2 | #define STAR_POLYMER_H |
---|
| 3 | |
---|
| 4 | /** |
---|
| 5 | This software was developed by Institut Laue-Langevin as part of |
---|
| 6 | Distributed Data Analysis of Neutron Scattering Experiments (DANSE). |
---|
| 7 | |
---|
| 8 | Copyright 2012 Institut Laue-Langevin |
---|
| 9 | |
---|
| 10 | **/ |
---|
| 11 | |
---|
| 12 | /** |
---|
| 13 | Scattering model class for 'Star polymer with Gaussian statistics' |
---|
| 14 | with |
---|
| 15 | P(q) = 2/{fv^2} * (v - (1-exp(-v)) + {f-1}/2 * (1-exp(-v))^2) |
---|
| 16 | where |
---|
| 17 | - v = u^2f/(3f-2) |
---|
| 18 | - u = <R_g^2>q^2, where <R_g^2> is the ensemble average radius of |
---|
| 19 | gyration squared of an arm |
---|
| 20 | - f is the number of arms on the star |
---|
| 21 | |
---|
| 22 | **/ |
---|
| 23 | |
---|
| 24 | // [PYTHONCLASS] = StarPolymer |
---|
| 25 | // [DISP_PARAMS] = arms, R2, scale, background |
---|
| 26 | // [DESCRIPTION] = <text> Scattering model class for 'Star polymer with Gaussian statistics' |
---|
| 27 | // with |
---|
| 28 | // P(q) = 2/{fv^2} * (v - (1-exp(-v)) + {f-1}/2 * (1-exp(-v))^2) |
---|
| 29 | // where |
---|
| 30 | // - v = u^2f/(3f-2) |
---|
| 31 | // - u = <R_g^2>q^2, where <R_g^2> is the ensemble average radius of |
---|
| 32 | // giration squared of an arm |
---|
| 33 | // - f is the number of arms on the star |
---|
| 34 | // </text> |
---|
| 35 | // [FIXED] = |
---|
| 36 | // [ORIENTATION_PARAMS] = |
---|
| 37 | |
---|
| 38 | #include "parameters.hh" |
---|
| 39 | |
---|
| 40 | class StarPolymer { |
---|
| 41 | |
---|
| 42 | public: |
---|
| 43 | |
---|
| 44 | // Model parameters |
---|
| 45 | |
---|
| 46 | /// Number of arms in the model |
---|
| 47 | // [DEFAULT]=arms=3 |
---|
| 48 | Parameter arms; |
---|
| 49 | |
---|
| 50 | /// Ensemble radius of gyration squared of an arm [A] |
---|
| 51 | // [DEFAULT]=R2=100.0 [A] |
---|
| 52 | Parameter R2; |
---|
| 53 | |
---|
| 54 | /// Scale factor |
---|
| 55 | // [DEFAULT]=scale=1.0 |
---|
| 56 | Parameter scale; |
---|
| 57 | |
---|
| 58 | /// Background [1/cm] |
---|
| 59 | // [DEFAULT]=background=0 [1/cm] |
---|
| 60 | Parameter background; |
---|
| 61 | |
---|
| 62 | StarPolymer(); |
---|
| 63 | |
---|
| 64 | // Operators to get I(q) |
---|
| 65 | double operator()(double q); |
---|
| 66 | double operator()(double qx, double qy); |
---|
| 67 | double calculate_ER(); |
---|
| 68 | double calculate_VR(); |
---|
| 69 | double evaluate_rphi(double q, double phi); |
---|
| 70 | |
---|
| 71 | }; |
---|
| 72 | |
---|
| 73 | |
---|
| 74 | |
---|
| 75 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.