Any non-linear fitting procedure requires an initial set of guessed parameters, which are then refined to find the best estimate. The initial guess often has to be supplied by the operator. We have found, however, that in the case of five-minute p-mode spectra a high degree of automation can be applied. Although the frequency, width and amplitude of each peak vary from spectrum to spectrum, with a random variation overlying the systematic solar-cycle effects, the overall pattern is consistent. The frequencies change by no more than one or two micro Hertz from spectrum to spectrum, and their average values for the stronger modes are well established: average mode widths (from less than one to several micro Hertz) vary across the spectrum in a known manner. The approximate ratio of sidelobe to peak height for each spectrum can be estimated from the window function spectrum. The only quantity for which adequate first guesses cannot be predicted from experience is the mode amplitude, which exhibits large random variations due to the stochastic nature of the excitation process as well as a 30 per cent systematic variation (Elsworth et al. 1993) over the solar cycle. We therefore proceed as follows.
For each peak pair, the frequency range to be included in the fit, and the guessed frequencies and widths, are read from a standard control file. The first-guess frequencies are suitably modified to take into account the part of the solar cycle over which the data comprising the time series to be analysed were collected. The peak heights are then estimated by analysing the power distribution in a region of a few micro Hertz around the first-guess frequencies. The program then refines these initial guesses, and the final parameters are written out to file. In this way, the spectrum can be fitted without intervention, in a few minutes of microcomputer processing time. The high degree of automation built in to the basic analysis of our data consequently makes the up-to-date maintenance of records of mode parameters very straightforward.