Skip to main content

MPFXEMGPeak

MPFXEMGPeak (cw, yw, xw)

The MPFXEMGPeak function implements a single exponentially modified Gaussian peak with no Y offset in the format of an all-at-once fitting function. The exponentially modified Gaussian peak shape is a convolution of an exponential and a Gaussian peak.

Parameters

cwCoefficient wave, which must be a double-precision wave.
The Gaussian peak shape is defined by the coefficients as follows:
cw[0]:Peak location. This is actually the location of the underlying Gaussian peak. There is no analytic expression for the actual peak location.
cw[1]:Standard deviation of the Gaussian portion.
cw[2]:Amplitude-related parameter.
cw[3]:Decay constant of the exponential portion.
cw must be a double precision wave.
ywY wave into which values are stored.
yw may be either double precision or single precision.
xwX wave containing the X values at which the peak function is to be evaluated.
xw may be either double precision or single precision.

Details

There is no analytic expression for peak parameters of common interest like the amplitude, location and width. The Multipeak Fitting package uses numerical techniques to get approximations.

This function is primarily intended to support the Multipeak Fitting package.

To use MPFXEMGPeak as a fitting function, wrap it in an all-at-once user-defined fitting function:

Function FitVoigtPeak(Wave cw, Wave yw, Wave xw) : FitFunc
Variable dummy = MPFXEMGPeak(cw, yw, xw)
End

The assignment to "dummy" is required because you must explicitly do something with the return value of a built-in function.

The implementation of this function involves the erfcx function.

If the waves do not satisfy the number type requirements, the function returns NaN. A successful invocation returns zero.

See Also

All-At-Once Fitting Functions