Creating a Composite Spectrum with sumspec

sumspec is an IRAF task for making a composite spectrum which is adjusted for velocity.

Input Spectra (T_SUMSPEC main)

The spectra to be added are specified by the list of files spectra and/or the list of spectrum numbers in specnum. Unless a pathname is specified as part of the filename in spectra, each spectrum is expected to be found in the directory specdir. Files specified by logfiles are opened to receive logging information. If debug is yes, additional information about the input files and the progress of the program is written to STDERR.

Find Wavelength Coverage (WLRANGE Subroutine)

If either st_lambda or end_lambda is set to INDEF, all of the spectrum headers are read to find the limits of the overlap of their wavelength coverage, and the missing limit(s) of the output spectrum are set accordingly.

Composite Preparation (ADDSPEC subroutine)

Before the first sectrum in the list is added, a blank (all zero) spectrum, with the object name compobj and file name compfile in the directory compdir is created. It is linear in log wavelength, with npts data points from the log of st_lambda to the log of end_lambda. World coordinate system information is then written to the header.

Read and Plot Input Spectra (ADDPEC subroutine)

Spectra are read from the input list one at a time and renormalized if renormalize is set to yes. This should be done if the spectra are fluxed or whenever pixel values are much bigger or smaller than their variation. If spec_plot is yes, each spectrum is plotted to device. If spec_int is yes, the user can interact with that graph using single character cursor commands. If the @ command is given in this mode, the graph is sent to the device specified by plotter.

Remove Continuum (ICSUBCON subroutine)

If s_contin is set to subtract or divide instead of no, the IRAF curve fitting subroutines, are used to fit a continuum to each input spectrum. The contsum task sets all of the appropriate parameters. Fits may be done interactively by setting c_interactive to yes. A function specified by c_function of order order is used to fit the portion of the spectra specified by sample, averaged in groups of naverage pixels. Points outside of limits s_low_reject and s_high_reject, specified in standard deviations of the fit, are eliminated through niterate iterations, with grow pixels rejected on each side of the rejected point.

Replace Lines with Continuum (ICSUBCON subroutine)

Emission and/or absorption lines may be removed from each input spectrum if reject is yes If the spectrum header parameter SUBCONT is present, its value overrides that of reject. absrej and emrej set the lower and upper acceptable limits for input spectrum pixels in standard deviations of the continuum fit to the spectrum.

A graph of the continuum-removed, apodized data is displayed if the cont_plot parameter is yes.

Rebin Spectrum (Subroutine ADDSPEC)

If complog is yes, each spectrum is rebinned using an interpolation mode specified by interp_mode. into a npts-pixel log-wavelength spectrum covering the range computed above.

If complog is no, each spectrum is rebinned using an interpolation mode specified by interp_mode. into a npts-pixel wavelength-linear spectrum covering the range computed above.

Spectrum Velocity Correction (Subroutine ADDSPEC)

As it is rebinned, each input spectrum is redshifted according to the parameters ztemp (Z = delta lambda / lambda), if it is not zero, or veltemp (CZ = apparent doppler shifting velocity). A velocity correction to the solar system barycenter is removed according to the svel_corr parameter. Set it to none if the input spectra have not been shifted. If "file", BCV is used if present in the file header, or else HCV. If "hfile", the header parameter HCV is always used. If neither is found, no correction is made. If "heliocentric" or "barycentric" corrections are chosen, position and time parameters are read from the spectrum data file header. DATE-OBS (date in format 'dd-mm-yy') UT (U.T. at end of exposure as 'hh:mm:ss') and UTOPEN (U.T. at start of exposure as 'hh:mm:ss') or EXPOSURE (length of exposure in seconds) are used to compute the midtime of the exposure. RA (right ascension as 'hh:mm:ss.ss'), DEC (declination as 'dd:mm:ss.ss'), and EPOCH (epoch of coordinates defaults to 1950.0) give the position of the object whose spectrum this is. SITELONG (observatory longitude as 'dd:mm:ss.ss' or degrees), SITELAT (observatory latitude as 'dd:mm:ss.ss' or degrees), and SITEELEV (observatory altitude in meters) give the observatory position.

Spectrum Display (Subroutine ADDSPEC)

The composite spectrum is plotted to device if comp_plot is yes. If comp_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.

Image Output (ADDSPEC subroutine)

After each spectrum is added, the sumspec version and the date the program is being run are written, with the name of the added file, its velocity and velocity correction to the spectrum image header and the spectrum is written. After the last spectrum is added file is closed.

Last updated May 16, 1997 by Doug Mink dmink@cfa.harvard.edu

Telescope Data Center [rvsao] [sumspec] [sumspec parameters]