[General Information]

Function Name=ExpDecay2	; name show up in the select function dialog
Brief Description=Exponential Decay 2 with offset
Function Type=Built-in		; source type, built-in, user-defined, external dll
Function Form=Expression	; function form;
Function Source=fgroup.ExpDecay2
Number Of Parameters=6
Number Of Independent Variables=1
Number Of Dependent Variables=1


[Fitting Parameters]

Naming Method=user-defined
Names=y0,x0,A1,t1,A2,t2
Lower bounds=--,--,0.0(X,OFF),0.0(X,OFF),0.0(X,OFF),0.0(X,OFF)
Upper bounds=--,--,--,--,--,--
Meanings=offset,center,amplitude,decay constant,amplitude,decay constant


[Independent Variables]

x = 


[Dependent Variables]

y = 


[Constants]


[Formula]
y = y0 + A1*exp(-(x-x0)/t1) + A2*exp(-(x-x0)/t2)

[Constraints]

[Parameters Initialization]
sort( x_y_curve );
smooth( x_y_curve );
y0 = min( y_data );     
x0 = min(x_data);
Dataset dsX;
x_y_curve.AttachX(dsX);
dsX -= x0;
A1 = max( y_data ) - min( y_data ); 
t1 = -0.5 * xaty50( x_y_curve ) / ln( 0.5 );
A2 = A1;
t2 = 3.0 * t1;

[Initializations]


[After fitting]


[Controls]
General Linear Constraints=Off
Initialization scripts=Off
Scripts After fitting=Off

