### 6 Determining a profile model – PISAFIT

PISAFIT fits the radially symmetric mixed Gaussian - Exponential - Lorentzian function (appendix B) as used by PISAFIND in its profile fitting mode. It fits objects whose accurate positions are given in a formatted list. The objects should be stars which are well separated on the frame and which are not saturated. The list of positions may contain the usual PISA format of identifier (an integer) followed by the X and Y positions, or may just contain the X and Y positions as returned by the KAPPA [6] CENTROID routine.

The PISA profile fitting function is described by three separate parameters; the gaussian sigma (GSIGM); the cross over point (CROSS), as a fraction of the peak intensity, from the gaussian core to an exponential wing; and the fractional mix (COMIX) of a Lorentzian to these two functions at each point. The parameters resultant from the functional fit are stored as the global values, PISA_GSIGM, PISA_CROSS and PISA_COMIX (global values are stored in the global parameter file ($HOME/adam/GLOBAL.sdf or$ADAM_USER/GLOBAL.sdf, if you’ve set the \$ADAM_USER environment variable). These will be accessed automatically by PISAFIND, PISAGEN and PISAPEAK.

The fit produced by this routine is displayed on a graphics device, together with the residuals (derived from the variance of data contributing to each point), so that the quality of fit can be assessed. Extra data, displayed with a different point type, is shown beyond the fitting radius. After the plot and fitting statistics are shown, you are prompted about your satisfaction with the fit, if you are not happy then it is possible to re-do the fit using a different radius. This cycle can be repeated until you are satisfied. Experience shows that the first fit is rarely the best.

Different constraints can be placed on the ranges of values that the three fit parameters can take. Type APM sets up the range bounds so that a minimisation as performed by the original APM version of this routine is done. Type USER allows you to specify the ranges within which the fit parameters can vary. Type NONE frees the minimisation routine to fit the function as it can, the only restriction being that the parameters must have values greater than zero. The fit can be done using a weighted scheme (this uses the residuals displayed in the plot).

PISAFIT uses the graphics database AGI [7], so plots can be made within predefined pictures on the chosen graphics device and values can read directly using a suitable cursor program. AGI pictures can be defined by the program PICDEF in KAPPA [6].