source: sasview/sansmodels/src/c_extensions/schulz.h @ 20d91bd

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 20d91bd was 20d91bd, checked in by Mathieu Doucet <doucetm@…>, 12 years ago

Refactor Schulz

  • Property mode set to 100644
File size: 1.0 KB
Line 
1#if !defined(schulz_h)
2#define schulz_h
3#include "parameters.hh"
4
5/** Structure definition for Schulz parameters.
6 * The Schulz is normalized to the 'scale' parameter.
7 * 
8 * f(x)=scale * math.pow(z+1, z+1)*math.pow((R), z)*
9 *                                      math.exp(-R*(z+1))/(center*gamma(z+1)
10 *              z= math.pow[(1/(sigma/center),2]-1
11 *              R= x/center
12 *
13 * [PYTHONCLASS] = Schulz
14 * [DESCRIPTION] = <text> f(x)=scale * math.pow(z+1, z+1)*math.pow((R), z)*
15                                        math.exp(-R*(z+1))/(center*gamma(z+1)
16                            z= math.pow[(1/(sigma/center),2]-1
17                                        R= x/center</text>
18 */
19
20class Schulz{
21public:
22  /// Scale factor
23  //  [DEFAULT]=scale=1.0
24  Parameter scale;
25  /// Standard deviation
26  //  [DEFAULT]=sigma=1
27  Parameter sigma;
28  /// Center of the Schulz distribution
29  //  [DEFAULT]=center=0.0
30  Parameter center;
31
32  // Constructor
33  Schulz();
34
35  // Operators to get I(Q)
36  double operator()(double q);
37  double operator()(double qx, double qy);
38  double calculate_ER();
39  double evaluate_rphi(double q, double phi);
40};
41
42#endif
Note: See TracBrowser for help on using the repository browser.