source: sasview/sansmodels/include/linearpearls.h @ 1de85f4

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 1de85f4 was 6319646, checked in by Jae Cho <jhjcho@…>, 13 years ago

new includes for scale fix for P*S

  • Property mode set to 100644
File size: 2.2 KB
Line 
1#if !defined(o_h)
2#define linearpearls_h
3#include "parameters.hh"
4
5/**
6 * Structure definition for the parameters
7 */
8//[PYTHONCLASS] = LinearPearlsModel
9//[DISP_PARAMS] = radius, edge_separation
10//[DESCRIPTION] =<text>Calculate form factor for Pearl Necklace Model
11//                              [Macromol. 1996, 29, 2974-2979]
12//                              Parameters:
13//                              background:background
14//                              scale: scale factor
15//                              sld_pearl: the SLD of the pearl spheres
16//                              sld_solv: the SLD of the solvent
17//                              num_pearls: number of the pearls
18//                              radius: the radius of a pearl
19//                              edge_separation: the length of string segment; surface to surface
20//              </text>
21//[FIXED]=  <text>radius.width; edge_separation.width</text>
22//[NON_FITTABLE_PARAMS]= <text></text>
23//[ORIENTATION_PARAMS]= <text> </text>
24
25typedef struct {
26  /// Scale factor
27  //  [DEFAULT]=scale= 1.0
28  double scale;
29  ///   radius [A]
30  //  [DEFAULT]=radius=80.0 [A]
31  double radius;
32  ///   edge_separation
33  //  [DEFAULT]=edge_separation= 350 [A]
34  double edge_separation;
35  ///   num_pearls
36  //  [DEFAULT]=num_pearls= 3
37  double num_pearls;
38  ///   sld_pearl
39  //  [DEFAULT]=sld_pearl= 1.0e-06 [1/A^(2)]
40  double sld_pearl;
41  ///   sld_solv
42  //  [DEFAULT]=sld_solv= 6.3e-06 [1/A^(2)]
43  double sld_solv;
44  /// Background
45  //  [DEFAULT]=background=0
46  double background;
47
48}LinearPearlsParameters;
49
50
51
52class LinearPearlsModel{
53public:
54  // Model parameters
55  /// Scale factor
56  //  [DEFAULT]=scale= 1.0
57  Parameter scale;
58  /// radius [A]
59  //  [DEFAULT]=radius=80.0 [A]
60  Parameter radius;
61  /// edge_separation
62  //  [DEFAULT]=edge_separation= 350 [A]
63  Parameter edge_separation;
64  /// num_pearls
65  //  [DEFAULT]=num_pearls= 3
66  Parameter num_pearls;
67  /// sld_pearl
68  //  [DEFAULT]=sld_pearl= 1.0e-06 [1/A^(2)]
69  Parameter sld_pearl;
70  /// sld_solv
71  //  [DEFAULT]=sld_solv= 6.3e-06 [1/A^(2)]
72  Parameter sld_solv;
73  /// Background
74  //  [DEFAULT]=background=0
75  Parameter background;
76
77  // Constructor
78  LinearPearlsModel();
79
80  // Operators to get I(Q)
81  double operator()(double q);
82  double operator()(double qx, double qy);
83  double calculate_ER();
84  double calculate_VR();
85  double evaluate_rphi(double q, double phi);
86};
87
88#endif
Note: See TracBrowser for help on using the repository browser.