general/tools/fitting/
gaussian.pro
FUNCTION: GAUSSIAN PURPOSE: Evaluates a gaussian function with background. This function may be used with the "fitfunc" curve fitting function. KEYWORDS: PARAMETERS: structure with the format: ** Structure <275ac0>, 6 tags, length=48, refs=1: H DOUBLE 1.0000000 ; hieght W DOUBLE 1.0000000 ; width X0 DOUBLE 0.0000000 ; center A0 DOUBLE 0.0000000 A1 DOUBLE 0.0000000 A2 DOUBLE 0.0000000 If this parameter is not a structure then it will be created. P_NAMES: string array (see "fitfunc" for details) PDER_VALUES: named variable in which partial derivatives are returned. USAGE: p={h:2.,w:1.5,x0:5.0,a0:0.,a1:0.,a2:0.} x = findgen(100)/10. y = gaussian(x,par=p) plot,x,y RETURNS: p.a2*x^2 + p.a1*x + p.a0 + p.h * exp( - ((x-p.x0)/p.w)^2 )
Routines
top source gaussian
result = gaussian(x, parameters=parameters, p_names=p_names, pder_values=pder_values)
Parameters
- x
Keywords
- parameters
- p_names
- pder_values
File attributes
Modification date: | Thu Feb 13 16:43:13 2014 |
Lines: | 25 |