source: sasview/sansmodels/include/sphere.h @ 83d9120

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 83d9120 was fa6db8b, checked in by Kieran Campbell <kieranrcampbell@…>, 12 years ago

Added mechanism for model categorization and DAB Model python → c++

  • Property mode set to 100644
File size: 1.3 KB
Line 
1#if !defined(sphere_h)
2#define sphere_h
3#include "parameters.hh"
4
5/**
6 * Structure definition for sphere parameters
7 */
8 //[PYTHONCLASS] = SphereModel
9 //[DISP_PARAMS] = radius
10 //[DESCRIPTION] =<text>P(q)=(scale/V)*[3V(sldSph-sldSolv)*(sin(qR)-qRcos(qR))
11 //                                             /(qR)^3]^(2)+bkg
12 //
13 //                             bkg:background, R: radius of sphere
14 //                             V:The volume of the scatter
15 //                             sldSph: the SLD of the sphere
16 //                             sldSolv: the SLD of the solvent
17 //
18 //             </text>
19 //[FIXED]=  radius.width
20 //[ORIENTATION_PARAMS]= <text> </text>
21 //[CATEGORY] = Shapes & Spheres
22
23class SphereModel{
24public:
25  // Model parameters
26  /// Scale factor
27  //  [DEFAULT]=scale= 1.0
28  Parameter scale;
29
30  /// Radius of sphere [A]
31  //  [DEFAULT]=radius=60.0 [A]
32  Parameter radius;
33
34  /// sldSph [1/A^(2)]
35  //  [DEFAULT]=sldSph= 2.0e-6 [1/A^(2)]
36  Parameter sldSph;
37
38  /// sldSolv [1/A^(2)]
39  //  [DEFAULT]=sldSolv= 1.0e-6 [1/A^(2)]
40  Parameter sldSolv;
41
42/// Incoherent Background [1/cm]
43//  [DEFAULT]=background=0 [1/cm]
44Parameter background;
45
46  // Constructor
47  SphereModel();
48
49  // Operators to get I(Q)
50  double operator()(double q);
51  double operator()(double qx, double qy);
52  double calculate_ER();
53  double calculate_VR();
54  double evaluate_rphi(double q, double phi);
55};
56
57
58#endif
Note: See TracBrowser for help on using the repository browser.