source: sasview/sansmodels/src/include/sphere.h @ 446c8d9

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 446c8d9 was 101065a, checked in by Mathieu Doucet <doucetm@…>, 13 years ago

keep only header files in c_extensions and rename it 'include'

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