[GENERAL INFORMATION]
Function Name=LogNormal
Brief Description=Log-Normal function
Function Source=fgroup.LogNormal
Function Type=Built-in
Function Form=Expression
Number Of Parameters=4
Number Of Independent Variables=1
Number Of Dependent Variables=1


[FITTING PARAMETERS]
Naming Method=User-Defined
Names=y0,xc,w,A
Meanings=Offset,Mean,Standard Deviation,Area
Lower Bounds=--,0.0(X,ON),0.0(X,ON),--
Upper Bounds=--,--,--,--
Number Of Significant Digits=


[FORMULA]

y = y0 + A/(sqrt(2*PI)*w*x)*exp(-(ln(x/xc))^2/(2*w^2))


[CONSTRAINTS]


[Parameters Initialization]
sort(x_y_curve);
//smooth(x_y_curve, 2);
y0 = yatxmax( x_y_curve );
A = area( x_y_curve, y0 );
if ( A > 0 )
{ 
   xc = xatymax( x_y_curve );
   A = max( y_data ) - y0;
}
else
{ 
   xc = xatymin( x_y_curve );
   A = min( y_data ) - y0;
}
Dataset xx;
x_y_curve.AttachX( xx );
xx = ln( xx );
w = fwhm( x_y_curve, y0 );
A = A * sqrt( 2 * pi ) * w * xc * exp( -w^2 / 2 );
[CONSTANTS]


[INITIALIZATIONS]



[AFTER FITTING]



[INDEPENDENT VARIABLES]
x=


[DEPENDENT VARIABLES]
y=


[CONTROLS]
General Linear Constraints=Off
Initialization Scripts=Off
Scripts After Fitting=Off
Number Of Duplicates=0
Duplicate Offset=2
Duplicate Unit=3
Peak Center=2
Peak Width=3
Peak Amplitude=4

[Moments]
mz0 = A
mz1 = exp(w*w/2)*xc
mc2 = (exp(2*w*w)-exp(w*w))*xc*xc
mc3 = (2*exp(3*w*w/2)-3*exp(5*w*w/2)+exp(9*w*w/2))*xc*xc*xc
mc4 = (6*exp(3*w*w)-3*exp(2*w*w)-4*exp(5*w*w)+exp(8*w*w))*xc^4
