Lines in the spectra are identified by fitting a polynomial to the
spectrum, and then searching for deviations from the fit. First, a
polynomial of order fit_order1 (default 1) is fit to the whole
spectrum. Subsequently, all points from the original spectrum which
deviate by more than DET_THRESH from the fit are
removed from the fit region, where sigma is the rms of the
deviations of the spectrum from the fitted polynomial. For each
deviant point removed from the fit region, the 2 neighboring points
are also removed. A new polynomial is then fitted to the reduced
fitting region, and the whole process is iterated until the fitting
region is constant or the maximum number of n_iteration
iterations has been reached. After n_iterlow iterations, the
order of the polynomial is increased to fit_order2.
After this iteration, contiguous regions are identified among the rejected points, i.e. neighboring points which all fit the rejection criterion. Contiguous regions which contain at least MIN_NPOINTS points are considered to be spectral.
After subtracting the polynomial from the spectrum, a Gaussian is
fitted to each of the line regions separately. The fit is weighted by
the error estimate of the spectrum. The parameters , peak
flux Pi and wavelengths
are recorded, where i labels
the lines.
Subsequently, a search for overlapping lines is carried out. If any two lines are overlapping in the sense
![]() |
(28) |
The five lines with the highest signal/noise ratio are finally recorded both in the catalogue and in the spectrum header.
In figure 3.17, an example of an output spectrum is shown. Lines are numbered in order of significance (Line 0 being the most significant and Line 4 being the least). Note that the broken horizontal line along the bottom of the graph shows the continuum through which the polynomial was fit. The solid darker lines are the Gaussian fits through the line.