Creating a Spectrum with rvsao. linespec

linespec is an IRAF task for making a spectrum from a list of emission and/or absorption lines.

Line List

The list of lines to be put into a spectrum is read from the file linefile in the directory linedir. If lindir is null, the file is assumed to be in the current working directory. If it doesn't start with a /, it is relative to the current working directory. A trailing / is added if it is not present in the parameter value. The file contains centers, widths, and heights for each line which may appear in the spectrum.

Spectrum Setup

A blank (all zero) spectrum, with the object name specobj and file name specfile in the directory specdiris created. It is linear in wavelength, with a resolution of pix_lambda Angstroms from st_lambda to end_lambda. World coordinate system information is then written to the header.

If verbose is yes, files specified by logfiles are opened and a header is written.

Spectrum Computation

For each line in the table, the center is redshifted according to the parameters zspec (delta lambda / lambda), if it is not zero, or velspec (apparent doppler shifting velocity). The linewidth, if it is tabulated in kilometers per second, is converted to Angstroms at the shifted line center. The line width is also broadened appropriately if the line is redshifted. If maxwidth is yes, linewidth is used as the width of the line if it is greater than the tabulated width. For each line, a Gaussian at the shifted center wavelength, half-width, and tabulated height is added to the spectrum. After all of the lines are computed, a continuum level specified by continuum is added to the spectrum.

Spectrum Display

The spectrum is plotted to device if spec_plot is yes. If spec_int is yes, the graph of the spectrum is displayed to allow the user to interact with it using single character cursor commands. If the @ command is given in this mode, the graph is sent to the device specified by plotter.

Spectrum Resolution

If maxwidth is no, the resolution of the spectrograph is simulated by convolving the entire spectrum with a Gaussian of height 1.0 and sigma (half width at half of maximum) of linewidth. If spec_plot is yes, the spectrum is displayed again.

Image Output

The linespec version and the date the program is being run are written to the spectrum image header, the spectrum is written, and the file is closed.

Last updated April 30, 1997 by Doug Mink

Telescope Data Center [rvsao] [linespec]