- HEIGHT = 0
- CENTER
- WIDTH
The width of the Gaussian (for the constructors or the setWidth
function) is always specified in terms of the full width at half
maximum (FWHM). It is always positive and attempts to set a non-positive
width will throw an assertion when in debug mode.
The peak height of the Gaussian can be specified at construction time or
by using the setHeight function. Alternatively the
setFlux function can be used to implicitly set the peak height by
specifying the integrated area under the Gaussian. The height (or flux)
can be positive, negative or zero, as this class makes no assumptions on
what quantity the height represents.
The parameter interface (see
FunctionParam class),
is used to provide an interface to the
Fitting classes.
There are 3 parameters that are used to describe the Gaussian:
An enumeration for the HEIGHT, WIDTH and
CENTER parameter index is provided, enabling the setting
and reading of parameters with the [] operator. The
mask() methods can be used to check and set the parameter masks.
This class is in general used implicitly by the Gaussian1D
class only.
Copy constructor (deep copy)
Copy assignment (deep copy)
Destructor
Give name of function
Get or set the analytical integrated area underneath the Gaussian.
Use these functions as an alternative to the height functions.
Get or set the center ordinate of the Gaussian
Get or set the FWHM of the Gaussian.
Prerequisite
Etymology
A 1-dimensional Gaussian's parameters.
Synopsis
A Gaussian1D is described by a height, center, and width.
The parameters (height, center and width) may be changed at run time.
Changing the width of the Gaussian will not affect
its peak height but will change its flux. So you should always set the
width before setting the flux.
Example
Gaussian1D<Double> gf(5.0, 25.0, 7);
gf(25); // = 5.0
gf.setHeight(1.0);
gf[WIDTH](2.0);
gf[CENTER](0.0);
gf(1); // = 0.5*height = 0.5
Template Type Argument Requirements (T)
Thrown Exceptions
To Do
Member Description
enum
Gaussian1DParam()
Constructs the one dimensional Gaussians. Defaults:
height=1, center=0, width(FWHM)=1.
explicit Gaussian1DParam(const T &height)
Gaussian1DParam(const T &height, const T ¢er)
Gaussian1DParam(const T &height, const T ¢er, const T &width)
Could not use default arguments
that worked both with gcc and IRIX and all templates
Gaussian1DParam(const Gaussian1DParam<T> &other)
template <class W> Gaussian1DParam(const Gaussian1DParam<W> &other) : Function1D<T>(other), fwhm2int(T(1.0)/sqrt(log(T(16.0))))
Gaussian1DParam<T> &operator=(const Gaussian1DParam<T> &other)
virtual ~Gaussian1DParam()
virtual const String &name() const
T height() const
Get or set the peak height of the Gaussian
void setHeight(const T &height)
T flux() const
void setFlux(const T &flux)
T center() const
void setCenter(const T &cnter)
T width() const
void setWidth(const T &width)