source: sasview/sansmodels/src/c_extensions/lorentzian.h @ 82c11d3

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

refactored bunch of models

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