Creating a Spectrum with
linespec is an IRAF task for making a spectrum from a list of emission
and/or absorption lines.
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
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
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.
For each line in the table, the center is redshifted according to the
(delta lambda / lambda), if it is not zero, or
(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 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.
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.
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.