.help sumspec Mar2009 rvsao
sumspec -- Make a composite spectrum from several spectra
sumspec spectra compfile
.ls spectra = ""
List of file names of spectra to analyze.
@<filename> indicates list should come from file <filename>.
<filename>[<range>] indicates that a range of apertures in a multispec
file should be processed, where <range> is a comma- and/or
hyphen-separated list of numbers.
.ls specnum = 0
If this is nonzero and \fIspectra\fR contains a single file name, this is
a range of spectrum numbers in a multispec file which will be added.
Wavelength dispersion information is read from APNUMn or the WCS keywords.
Velocity information is read from APVELn and saved in APVELn and APVXCn.
In a non-multispec file, radial velocity is read from the VELOCITY header
.ls specband = 0
If this is nonzero, it is the band in the multispec file(s) specified by
spectra which will be summed. Wavelength dispersion information
is read from APNUMn, where n is the aperture specified by \fIspecnum\fR or the
WCS keywords. Velocity information is read from APVELn and saved in APVELn
and APVXCn. (New in version 2.0)
.ls specdir = "./"
Directory containing spectra to analyze. This part of the pathname is not
printed at the top of the page, and is assumed to be the same for all
spectra listed in the spectra parameter.
.ls compfile = ""
File name for output spectrum.
.ls compname = ""
Title for output spectrum.
.ls compdir = ""
Directory for output spectrum
.ls nspec = 1
Number of spectra in output file
.ls save_names = yes
Save names of input files in output file header (yes or no)
.ls copy_header = yes
Copy output header from first input spectrum (yes or no)
.ls normin = no
If yes, the data spectrum is divided by its mean value before being processed.
Use this on spectra which have unusual data values such as those produced
by flux calibration.
.ls fixbad = no
If "yes", remove wavelength-delimited regions listed in the file specfied
by \fIbadlines\fR. (added in version 2.0)
.ls badlines = badlines.dat
File containing list of starting and stopping wavelengths in Angstroms
for removal of portions of all object spectra if \fIfixbad\fR is yes.
All information after the second wavelength is a comment field. This file
is assumed to be in the directory \fIlinedir\fR unless a complete pathname
starting with "/" is specified. (added in version 2.0)
.ls linedir = "rvsao$lib/"
Directory containing line list file named by badlines. This parameter is
ignored if: that filename contains a "/" in the first column, as it is
assumed to be a full pathname, if there is a "/" anywhere else in the
filename, as it is assumed to be a path relative to the current working
directory, or if there is a "$" in the filename, as the part preceding
the "$" is assumed to be an IRAF environment parameter (ending in "/")
defining a directory.
.ls cont_remove = no
Remove continuum from input spectra if not "no". If "subtract", subtract
continuum. If "divide", divide by continuum. If "zerodiv", divide by
continuum and subtract 1. This last should be used instead of "divide"
if the file is to be cross-correlated. In version 2.0, "divide" subtracted
1; in version 2.1b15 and later, it doesn't, and the "zerodiv" option was added.
Parameters used in the fit are mostly set in the contsum pset.
.ls cont_split = 1
Number of regions into which to split the spectrum for separate continuum fits
.ls reject = "no"
Chop out emission lines from object spectra before adding them to the
composite spectrum if "yes". If "specfile", emission lines are removed
if the value of the CHOPEM keyword in the object spectrum image header is
T. If the keyword is not present or is F, emission lines are not removed.
If "no", emission lines are never removed. If EMCHOP in the input spectrum
file is 1, emission lines are not removed.
.ls abs_reject = 100.0
Input spectrum absorption line rejection in sigma of fit
.ls em_reject = 2.0
Input spectrum emission line rejection in sigma of fit
.ls contout = no
Remove continuum from output spectrum/spectra if not "no".
If "subtract", subtract continuum.
If "divide", divide by continuum.
If "zerodiv", divide by continuum and subtract 1. This last should be
used instead of "divide" if the file is to be cross-correlated. In
version 2.0, "divide" subtracted 1; in version 2.1b15 and later, it
doesn't, and the "zerodiv" option was added.
Parameters used in the fit are mostly set in the contsum pset.
.ls cont_plot = yes
If yes, plots of the continuum-subtracted input spectra are displayed.
This is most useful for determining the appropriateness of the continuum
.ls cont_add = 0
Continuum level added to output spectrum to keep all flux above zero, for
.ls spec_smooth = 0
If >0, the spectra are smoothed \fIsmooth\fR times before graphing them.
The spectrum is NEVER smoothedvefore adding
.ls st_lambda = INDEF
Starting wavelength in angstroms of output spectrum.
If INDEF, use beginning of wavelength overlap between input spectra.
.ls end_lambda = INDEF
Ending wavelength in angstroms of output spectrum.
If INDEF, use end of wavelength overlap between input spectra.
.ls pix_lambda = INDEF
Wavelength per pixel in angstroms of output spectrum.
If INDEF, compute from wavelength range and number of pixels in output spectra.
.ls ncol = 2048
Number of pixels into which to rebin data.
.ls complog = no
Rebin into log wavelength (yes or no)
.ls interp_mode = "spline3"
Interpolation mode to use when rebinning spectra, must be
"nearest" or "linear" or "spline3" or "poly3" or "poly5" or "sinc" or "lsinc"
or "drizzle" or "sums".
.ls normout = no
If true, the output spectrum is divided by its mean value before being
transformed. This is used on spectra which may have unusual values due
to their having already been flux-calibrated.
.ls spec_plot = yes
If yes, plots of the individual spectra are displayed. During this time the
normal IRAF cursor commands are active as well as several more that are
itemized below. If emission lines are chopped, before and after plots
are displayed, as well as the chopped line(s).
.ls spec_int = no
If yes, pause in cursor mode after each input spectrum has been plotted.
.ls comp_plot = yes
If yes, a plot of the output spectrum is displayed after each input spectrum is
added. Cursor commands are activated for zooming in on a portion of the
spectrum and hard copies may be made to stdplot using the \fI@\fR command.
.ls comp_int = no
If yes, pause in cursor mode after the composite spectrum has been plotted.
.ls ymin = INDEF
Minimum y value to plot. Autoscale if INDEF
.ls ymax = INDEF
Maximum y value to plot. Autoscale if INDEF
.ls velcomp = INDEF
Velocity in km/sec to which to shift individual spectra. If INDEF, do not shift
spectra at all.
.ls zcomp = INDEF
Velocity of output spectrum as delta lambda / lambda; overrides velcomp if not
.ls svel_corr = "barycentric"
Spectrum velocity correction to the solar system barycenter. Set to
"none" if spectrum has already been shifted or if this correction is
unnecessary. If "file", \fIBCV\fR is used if present in the file header,
or else \fIHCV\fR. If "hfile", the header parameter \fIHCV\fR is always
used. If neither is found, no correction is made. If svel_corr is not
set to "none", but velcomp and zcomp are INDEF, data is shifted to the
barycentric velocity correction of the first spectrum, if it has one.
If "heliocentric" or "barycentric" corrections are chosen, position and
time parameters are read from the spectrum data file header. \fIDATE-OBS\fR
(date in format 'dd-mm-yy') \fIUT\fR (U.T. at end of exposure as 'hh:mm:ss')
and \fIUTOPEN\fR (U.T. at start of exposure as 'hh:mm:ss') or
\fIEXPOSURE\fR (length of exposure in seconds) are used to compute
the midtime of the exposure. \fIRA\fR (right ascension as 'hh:mm:ss.ss'),
\fIDEC\fR (declination as 'dd:mm:ss.ss'), and \fIEPOCH\fR (epoch of
coordinates defaults to 1950.0) give the position of the object whose
spectrum this is. \fISITELONG\fR (observatory longitude as 'dd:mm:ss.ss'
or degrees), \fISITELAT\fR (observatory latitude as 'dd:mm:ss.ss' or
degrees), and \fISITEELEV\fR (observatory altitude in meters) give the
observatory position. Use bcvcorr task to set BCV in header and use "file"
here if header parameters are different.
.ls nsmooth = 0
Number of times to 1-2-1 smooth displayed spectrum
.ls device = "stdgraph"
Interactive device on which to graphicallly
.ls plotter = "stdplot"
Second, non-interactive device on which to plot the graphic summary of results.
.ls logfiles = "STDOUT,sumtemp.log"
All results from SUMTEMP are recorded in these files.
.ls nsum = 1
Number of pixels to sum across dispersion
.ls debug = no
If yes, values of the parameters fit to the selected peak
are recorded in the log files. This is most useful for debugging.
SUMSPEC combines spectra, shifting them to a common redshift, if either the
\fIvel_comp\fR or the \fIz_comp\fR parameter is not INDEF. The
VELOCITY header parameter of each of these spectra is assumed to be
a solar-system-barycenter-corrected velocity, and a barycentric
correction (computed by SUMSPEC or extracted from the BCV or HCV
header parameter) is subracted to get the redshift of the spectrum.
Each spectrum is shifted and rebinned to log or linear wavelength, then added
to the composite spectrum. Input may be multispec or twodspec format,
but output is always a one-dimensional file.
The following keystrokes are active for graphs of input and output spectra
in addition to the normal IRAF cursor facilities (a list of those is
available with the command ":.help"):
Make a hard copy on the device designated by \fIplotter\fR.
Prints cursor position in x and y. This is the default. All other
undefined keys perform this same function.
Replaces a region between the marked vertical cursors with interpolated
values from the edges of the marked region. This is typically used to
eliminate poorly subtracted night sky lines or emission lines.
Smooth spectrum n times before plotting. This only affects to current
spectrum display and the final spectrum graph, not the spectrum data.
Quit and exit.
Forces a replot of the current spectrum at the original scale.
Redisplay the entire plot after zooming.
Zoom in on the region marked by two successive <z>'s
To make a galaxy template by combining a list of galaxy spectra:
rvsao> sumspec @galaxies template=galtemp tempvel=1000.0
rvsao.contsum which sets the continuum fit parameters
On-line help is available over the World Wide Web at