gdsupports fitting of functions to 1-dimensional data. Data to be fitted are marked by an extraFin theH:-lines of the input files:H: x y,f d ... ... ... x-data y-data y-errorsNotethat by default the data are fitted as presented, that is, for log plots the log10()-values of the data are fitted. For example a polynomial fit in a plot with logarithmic x axis is:y = p1 + p2 * log10(x) + p3 * (log10(x))**2 ...This behaviour can be changed with the GMODE command:GMODE/FIT(DATA)fit the original dataGMODE/FIT(REPR)fit the data as presented (default) The y-error bars of the input data are taken into account as weights for chi-square evaluation. Unsymmetrical vertical error bars are averaged and symmetrized. Wherever possible you should provide error values with the y-data. The input errors will affect the errors of fit parameters. If no error values are given they are estimated from the chi-square value so that a chi-square of 1 would result. Fitting can be accomplished in two different ways:1. Automatic polynomial fitsThis is a fast way of fitting because it is a straightforward procedure which can be performed analytically. No extra user intervention is required. You specify the order of the polynomial with the display parameter POLYNOMIAL(). On display, the data together with the fitted curve and, with the optional display parameter CONFIDENCE(), two additional curves outlining the specified confidence interval are drawn. After display, the polynomial coefficients and their errors as well as additional statistical information (chi-square etc.) are listed in the shell window which runsgd. More than one data block and more than one column per data block can be processed. A typical command sequence would look like:GREAD file.gdread the dataGDISP / POLY(3) CONF(0.683)display data, fit a 3rd order polynomial, draw confidence limitGCOPY p65gpscopy the picture to a printer of your choice2. Separate fit packageNonlinear and user-specified functions, function stacking and sophisticated fit parameter handling require a dedicated fit package, derived from GSIs MVS-based listmode processing environment SATAN. In contrast to the automatic fitting described above you will need to control the different steps of function fitting by a few dedicated commands (starting with the letterF). The fitting procedure is restricted to a single y-column in the input file.Notethat you need to switch from automatic polynomial fitting to "controlled" fitting by specifying a polynomial degree < 0. A typical command sequence looks like:GREAD file.gdread the dataGDISP / POLY(-1)display data, suppress automatic fittingFPEAKS 2choose a fit function (2 gaussian peaks)FITfit the dataFRES/GRAPHIClist results (on the plot)FDISP/CONF(0.683)display final fit curve, with confidence limitsGCOPY p65gpscopy the picture to a printer of your choice For convenience, a shell scriptgdfitfctis provided to prepare external user functions written in C, for examplegdfitfct myfctcompiles and links the filemyfct.cso it can be loaded dynamically with the commandFMY myfctSee the description of the fit package for more details.