Home
Where to Start
About DR6
News and Updates
Tutorials
Data Products
Data Access
Sky Coverage
Instruments
Data Flow
Algorithms
Glossary
Known Problems
Help and Feedback
Search

Algorithms - Emission and absorption line fitting

Overview of line fits, result tables, and line "category"

Spectro1D fits spectral features at three separate stages during the pipeline. The first two fits are fits to emission lines only. They are done in the process of determining an emission line redshift and these are referred to as foundLines. The final fitting of the complete line list, i.e. both emission and absorption lines, occurs after the object's classification has been made and a redshift has been measured. These fits are known as measuredLines. In all cases a single Gaussian is fitted to a given feature, therefore the quality of the fit is only good where this model holds up.

The first line fit is done when attempting to measure the object's emission line redshift. Wavelet filters are used to locate emission lines in the spectrum. The goal of these filters is to find strong emission features, which will be used as the basis for a more careful search. The lines identified by the wavelet filter are stored in the specLine table as foundLines, i.e., with the parameter category set to 1. They are stored without any identifications, i.e., they have restWave = 0.

Every one of these features is then tentatively matched to each of a list of candidate emission lines as given in the line table below, and a system of lines is searched for at the position indicated by the tentative matching. The best system of emission lines (if any) found in this process is used to calculate the object's emission-line redshift. The lines from this system and their parameters are stored in the specLine table as foundLines, i.e., with the parameter category set to 1. These lines are identified by their restWave as given in the line table below.

The final line fitting is done for all features (both emission and absorption) in the line list below, and occurs after the object has been classified and a redshift has been determined. This allows for a better continuum estimation and thus better line fits. This latter fit is stored in HDU 2 of the spSpec*.html files in the DAS, and in the specLine view in the CAS (those rows from the specLineAll table with the parameter category set to 2).

Types of line fits stored in spSpec files
Type of fit category restWave
"Found" emission lines from wavelet filter 1 0
"Found" emission lines from best-fit system to wavelet detections 1 restWave from line list
"Measured" emission and absorption lines according to the object's classification and best redshift 2 restWave from line list

For almost all purposes we recommend the use of the measuredLines (category=2 stored in HDU 2 of spSpec files or the specLine view) since these result from the most careful continuum measurement and precise line fits.

Spectral line indices (Lick indices)

Separate continuum and flux windows are used to determine spectral line indices analogous to the Lick indices. These are stored in Line index HDU (HDU 5) of the spSpec*.fits files (this link also shows the continuum and line windows used for these indices) and in the specLineIndex table in the CAS.

Details of continuum fitting and line measurements

Parameter Notes

All of the line parameters are measured in the observed frame, and no correction has been made for the instrumental resolution. Line indices are invariant under transforming from observed to rest frame.

Continuum Fitting

The continuum is fit using a median/mean filter. A sliding window is created of length 300 pixels for galaxies and stars or 1000 pixels for quasars. Pixels closer than 8 pixels(560km/s) for galaxies and stars or 30 pixels (2100 km/s) for QSOs to any reference line are masked and not used in the continuum measurement. The remaining pixels in the filter are ordered and the values between the 40th and 60th percentile are averaged to give the continuum. The category=1 lines are fit with a cruder continuum which is given by a fifth order polynomial fit which iteratively rejects outlying points.

Reference Line List

The list of lines which are fit are given as ASCII line list and as HTML line table below. Note that many times that a single line in the table actually represents multiple features. Since the line fits are allowed to drift in wavelength somewhat, the exact precision of the lines are not important. The wavelength precision does become important for the emission line determination.

Line Fitting

Every line in the reference list is fit as a single Gaussian on top of the continuum subtracted spectrum. Lines that are deemed close enough are fitted simultaneously as a blend. The basic line fitting is performed by the SLATEC common mathematical library routine SNLS1E which is based on the Levenberg-Marquardt method. Parameters are constrained to fall within certain values by multiplying the returned chi-squared values by a steep function. Any lines with parameters falling close to these constraints should be treated with caution. The constraints are: sigma > 0.5 Angstrom, sigma < 100 Angstrom, and the center wavelength is allowed to drift by no more than 450 km/sec for stars and galaxies or 1500 km/sec for QSOs, except for the CIV line which is allowed to be shifted by as much as 3000 km/sec.

Testing the results

There are a number of ways that the line fitting can fail. If the continuum is bad the line fits will be compromised. The median/mean filtering routine will always fail for white dwarfs, some A stars as well as late-type stars. In addition is has trouble for galaxies with a strong 4000 Angstrom break. Likewise the line fitting will have trouble when the lines are not really Gaussian. The Levenberg-Marquardt routine can fall into local minima, which can happen when there is self-absorption in a QSO line or both a narrow and broad component for example. One should always check the chi-squared values to evaluate the quality of the fit. Examples of the quality of the line fits for over 100 spectra can be found in ps file with sample line fits (.ps.gz, 16 MB). In these plots, the red line is the continuum and the blue line is the continuum plus the sum of the Gaussian fits.

Reference line list

You can download the line list as ASCII table.

restWaveLine
1033.82OVI
1215.67Ly
1240.81NV
1305.53OI
1335.31CII
1399.8 SiIV+OIV
1549.48CIV
1640.4 HeII
1665.85OIII
1857.4AlIII
1908.73CIII
2326.0CII
2439.5 NeIV
2799.11MgII
3346.79NeV
3426.85NeV
3727.092OII
3729.875OII
3798.976H_theta
3836.47H_eta
3889.0 HeI
3934.777K
3969.588H
4072.3 SII
4102.89H_delta
4305.61G
4341.68H_gamma
4364.436OIII
4862.68H_beta
4960.295OIII
5008.240OIII
5176.7 Mg
5895.6 Na
6302.046OI
6365.536OI
6549.86NII
6564.61H_alpha
6585.27NII
6707.89Li
6718.29SII
6732.67SII
8500.36CaII
8544.44CaII
8664.52CaII

Last modified: Mon Sep 27 13:29:36 CDT 2004