Examples
Because only visible data are fitted it is assumed in the following examples
that the calling environment has already displayed some data.
Fit of Legendre polynomials to an angular distribution
FLEG 2 / DEG EVEN
FIT
FLEG 4 / DEG EVEN
FIT
FRES / CORR
FLIST
A Legendre polynomial of second order is defined, with only even terms
and the x-values interpreted as angles in degrees. The fit is executed.
A fourth order term is added and again fitted. Then the results,
including parameter correlations, and finally the experimental and fit data
are listed
Fit of a single gaussian
FWIN mark a fit window
FPE * / G define a Gaussian peak as fit function referring to the fit window
F execute fit
FR list results
FSUM / T compute sum and moments of raw data for comparison
Fit of Gaussian peaks plus background
FERR / S define experimental errors to be statistical
FXCAL 0 0.01 decrease x-values in order to avoid overflow
FWIN / LOOP define a set of windows for background fit by cursor loop
FPOL 8 define background function: polynomial of eighth order
F execute fit
FPAR / F fix all background parameters
FLAST / K keep last defined function as background
FWIN / ALL the whole data region is considered by the fit
FPE 10 search for the ten most significant peaks
F execute fit
FR 2 list results of peaks only
FDISP / F(1) draw background singly
FDISP / P draw peaks singly
Fit of two correlated peaks with relatively fixed parameters
FPE 2 / P enter two peak regions by cursor prompting loop
FPOS 1/ D(2)G(-14.6) R fix the difference of both peak positions;
assign a guess value to peak position 1 less
than that of peak 2 by 14.6
FWIDTH 1 / Q(2) G(1) R equate both peak widths and fix the ratio
F / LI execute fit giving a comprehensive output of
all iterations, results and correlations
FDI / P display peaks singly
Fit with a user defined function
FMY poly define the user's fit function poly
FPAR 1 / F G(0) set parameter 1 to zero and fix it
FLAST / K keep user's function as background
FPE / L add a Lorentzian function
F execute fit
FR list results
FDISP / F(1) draw the user defined function singly