[General Information]
Function Name = PearsonIV
Brief Description = Pearson Type IV Function
Function Source=fgroup.PearsonIV
Function Type = Built-in
Function Form = Expression
Number Of Parameters=6
Number Of Independent Variables = 1
Number Of Dependent Variables = 1


[Fitting Parameters]
Names = y0,A,m,v,alpha,lam
Initial Values = --(V)
Meanings = offset,amplitude,m,v,x width,x center
Lower Bounds = --(X, OFF),--(X, OFF),0.5(X, ON),--(X, OFF),--(X, OFF),--(X, OFF)
Upper Bounds = --(X, OFF),--(X, OFF),--(X, OFF),--(X, OFF),--(X, OFF),--(X, OFF)
Naming Method = User-Defined
Number Of Significant Digits = 
Unit = 


[INDEPENDENT VARIABLES]
x=


[DEPENDENT VARIABLES]
y=


[Formula]
y = y0 + A*f;
where
f = k * pow((1+((x-lam)/alpha)^2), -m) * exp(-v*atan((x-lam)/alpha));
and
k = gamma(m) * Norm(gamma(m+0.5*v*i)/gamma(m))^2 / (sqrt(PI)*gamma(m-0.5));


[Initializations]

[After Fitting]


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


[Compile Function]
Compile = 1
Compile Parameters Initialization = 1
OnParamChangeScriptsEnabled = 0.


[Parameters Initialization]
//Code to be executed to initialize parameters
lam = peak_pos(x_y_curve, &alpha, &y0, &A);
m = v = alpha;


[Origin C Function Header]
#pragma warning(error : 15618)
#include <origin.h>
#include <oc_nag8.h>
// Add your special include files here.
// For example, if you want to fit with functions from the NAG library, 
// add the header file for the NAG functions here.

// Add code here for other Origin C functions that you want to define in this file,
// and access in your fitting function.

// You can access C functions defined in other files, if those files are loaded and compiled 
// in your workspace, and the functions have been prototyped in a header file that you have
// included above. 

// You can access NLSF object methods and properties directly in your function code.

// You should follow C-language syntax in defining your function. 
// For instance, if your parameter name is P1, you cannot use p1 in your function code. 
// When using fractions, remember that integer division such as 1/2 is equal to 0, and not 0.5
// Use 0.5 or 1/2.0 to get the correct value.

// For more information and examples, please refer to the "User-Defined Fitting Function" 
// section of the Origin Help file.


[Origin C Parameter Initialization Header]


[Derived Parameter Settings]
Unit = 


[References]


[Constants]


[Constraints]

