source: sasview/sansmodels/src/sans/models/c_extensions/lorentzian.h @ 0f5bc9f

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 0f5bc9f was ae3ce4e, checked in by Mathieu Doucet <doucetm@…>, 17 years ago

Moving sansmodels to trunk

  • Property mode set to 100644
File size: 858 bytes
Line 
1#if !defined(lorentzian_h)
2#define lorentzian_h
3
4/** Structure definition for Lorentzian parameters.
5 * The Lorentzian is normalized to the 'scale' parameter.
6 * 
7 * f(x)=scale * 1/pi 0.5gamma / [ (x-x_0)^2 + (0.5gamma)^2 ]
8 *
9 * [PYTHONCLASS] = Lorentzian
10 */
11typedef struct {
12    /// Scale factor
13    //  [DEFAULT]=scale=1.0
14    double scale;
15    /// Width
16    //  [DEFAULT]=gamma=1.0
17    double gamma;
18    /// Center of the Lorentzian distribution
19    //  [DEFAULT]=center=0.0
20    double center;
21} LorentzianParameters;
22
23/// 1D lorentzian function
24double lorentzian_analytical_1D(LorentzianParameters *pars, double x);
25
26/// 2D lorentzian function
27double lorentzian_analytical_2D(LorentzianParameters *pars, double x, double phi);
28double lorentzian_analytical_2DXY(LorentzianParameters *pars, double x, double y);
29
30#endif
Note: See TracBrowser for help on using the repository browser.