[GENERAL INFORMATION]
Function Name=Gauss2D
Brief Description=The gaussian surface
Function Source=fgroup.gauss2d
Function Type=Built-in
Function Form=Equations
Number Of Parameters=6
Number Of Independent Variables=2
Number Of Dependent Variables=1
Analytical Derivatives for User-Defined=Off


[FITTING PARAMETERS]
Naming Method=User-Defined
Names=z0,A,xc,w1,yc,w2
Meanings=z offset,height,x center,x width,y center,y width
Lower Bounds=--(X, Off),--(X, Off),--(X, Off),0(X, On),--(X, Off),0(X, On)
Upper Bounds=--(X, Off),--(X, Off),--(X, Off),--(X, Off),--(X, Off),--(X, Off)
Number Of Significant Digits=


[FORMULA]
z=z0+A*exp(-0.5*((x-xc)/w1)^2-0.5*((y-yc)/w2)^2);


[CONSTRAINTS]



[CONSTANTS]


[Parameters Initialization]
Curve x_curve, y_curve;
bool bRes = get_interpolated_xz_yz_curves_from_3D_data(x_curve, y_curve, x_data, y_data, z_data, true);
if(!bRes) return;

xc = peak_pos(x_curve, &w1, &z0, NULL, &A);
yc = peak_pos(y_curve, &w2);
w1 *= 0.85;
w2 *= 0.85;

[INITIALIZATIONS]



[AFTER FITTING]



[ON PARAM CHANGE]



[INDEPENDENT VARIABLES]
x=
y=


[DEPENDENT VARIABLES]
z=


[CONTROLS]
General Linear Constraints=Off
Initialization Scripts=Off
Scripts After Fitting=Off
Number Of Duplicates=0
Duplicate Offset=2
Duplicate Unit=5
Peak Center=3
Peak Width=4
Peak Center 2=5
Peak Width 2=6
Peak Amplitude=2
Generate Curves After Fitting=Yes
Curve Point Spacing=Uniform on X-Axis Scale
Generate Peaks After Fitting=Yes
Generate Peaks During Fitting=Yes
Generate Peaks with Baseline=Yes
Paste Parameters to Plot After Fitting=Yes
Paste Parameters to Notes Window After Fitting=Yes
Generate Residuals After Fitting=No
Keep Parameters=No
Enable Parameters Initialization=0
Compile On Param Change Script=1


[COMPILE FUNCTION]
Compile=1
Compile Parameters Initialization=1
On Param Change Scripts Enabled=N/A


[ORIGIN C FUNCTION HEADER]



[ORIGIN C PARAMETER INITIALIZATION HEADER]
#include <origin.h>
#include <Nag_utils.h>




