rvsao.xcsao Parameters

Spectrum spectra specnum specband specdir correlate
Template templates tempnum tempband tempdir echelle
Wavelength Limits st_lambda end_lambda
Useful Intermediate Displays obj_plot xcor_plot xcor_file
Specific Line Removal fixbad badlines
Sigma Line Removal s_emchop t_emchop s_emreject t_emreject s_absreject t_absreject
Spectrum Processing bell_window renormalize ncols interp
Fourier Transform Processing zeropad low_bintop_lowtop_nrunnrun
Velocity Modification vel_init czguess nzpass tshift svcorr tvcorr
Velocity Peak Fitting pkmode pkfrac pksrch minvel maxvel
Reporting Results report_mode save_vel archive logfiles cursor
Display Information nsmooth cvel dvel ablines emlines linedir
Displaying Results dispmode displot device curmode hardcopy plotter
Debugging debug temp_plot contsub_plot apodize_plot fft_plot tfft_plot uxcor_plot

Spectrum [contents] [index] [procedure]

spectra ""
List of file names of spectra to analyze. @filename indicates list should come from file filename. As of version 1.3, apertures of multispec spectrum files can be entered as numbers, lists, or ranges enclosed in brackets after each file name in the list or file.
specnum 0
If this is nonzero and spectra contains a single file name, this is a range of apertures in a multispec file which will be cross-correlated. This number is ignored if a spectrum number is specified using brackets. Wavelength dispersion information is read from APNUMn or the WCS keywords. Velocity information is read from APVELn and saved in APVELn and APVXCn.
specband 0
If this is nonzero, it is the band in the multispec file(s) specified by spectra which will be cross-correlated. Wavelength dispersion information is read from APNUMn, where n is the aperture specified by specnum or the WCS keywords. Velocity information is read from APVELn and saved in APVELn and APVXCn. (New in version 2.0)
specdir "./"
Directory containing spectrum to be analyzed. 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.
correlate yes
If yes, cross-correlate object spectrum against specified template spectrum, displaying spectrum, correlation peak (if display mode 1), and detailed results for the best 12 templates. If no, display spectrum with previous results read from the spectrum image header with no correlation peak plot.

Template [contents] [index] [procedure]

templates ""
Template file or comma-separated list of file names of images to use as templates or name of file containing template file names, one per line. As of version 1.3, apertures of multispec template files can be entered as numbers, lists, or ranges enclosed in brackets after each file name in the list or file. As of version 2.2, wavelength (or pixel) ranges of templates to be correlated can be specifies as :w1-w2 (:p1-p2) appended to the template name. Multiple pieces of a single template spectrum can thus be correlated agains multiple pieces of an object spectrum.
tempnum 0
If nonzero and templates contains a single file name, this is a range of spectrum numbers in a multispec file to be used as templates. Wavelength dispersion information is read from APNUMn, and velocity information is read from APVELn. This number is ignored if a spectrum number is specified using brackets.
tempband 0
If this is nonzero, it is the band in the multispec file(s) specified by templates which will be cross-correlated. Wavelength dispersion information is read from APNUMn, where n is the aperture specified by tempnum or the WCS keywords. Velocity information is read from APVELn. (New in version 2.0)
tempdir ""
Directory for template spectra
echelle no
If yes, the spectrum is assumed to be a multispec file containing multiple orders. The range of spectrum numbers (which may not have the same numbers as the echelle orders) defined by specnum, or within brackets following the spectrum file name, is used for the template rather than the range defined in tempnum, or withing brackets following template file names.

Wavelength Limits for Correlation [contents] [index]

st_lambda INDEF
Starting wavelength in angstroms of portion of spectrum to correlate. If INDEF, use beginning of wavelength overlap between template and spectrum.
end_lambda INDEF
Ending wavelength in angstroms of portion of spectrum to correlate. If INDEF, use end of wavelength overlap between template and spectrum.

Useful Intermediate Displays [contents] [index]

obj_plot no
If yes, a plot of the object spectrum is displayed. During this time the normal IRAF cursor commands are active as well as several more that are itemized below.A If emission lines are chopped, before and after plots are displayed, as well as the chopped line(s).
xcor_plot yes
If yes, a plot of the filtered cross-correlation function is displayed. Cursor commands are activated, and a peak other than the maximum can be chosen to be the center with the keystroke p. Hard copies to stdplot may also be made using the @ command.
xcor_file no
If yes, write the filtered correlation function for each template to a file named spectrum_name.template_name.

Emission and Absorption Line Removal [contents] [index] [procedure]

fixbad no
If "yes", remove wavelength-delimited regions listed in the file specfied by badlines. (added in version 2.0)
badlines badlines.dat
File containing list of starting and stopping wavelengths in Angstroms for removal of portions of all object spectra if fixbad is yes. All information after the second wavelength is a comment field. This file is assumed to be in the directory linedir unless a complete pathname starting with "/" is specified. (added in version 2.0)
s_emchop no
If "yes", emission lines are removed from the object spectrum before cross-correlating. If "no", they aren't. If "specfile", the flag CHOPEM in the object spectrum header causes emission lines in the object spectrum to chopped if true. If "tempfile", the flag CHOPEM in the template header causes emission lines in the spectrum to be removed before the correlation is done. If the EMCHOP header parameter in the spectrum image header is set to T, the emission lines are assumed to have been removed already, and no additional removal is done.
t_emchop no
If "yes", emission lines are removed from the template spectrum before cross-correlating. If "no", they aren't. If "specfile", the flag CHOPEM in the object spectrum header causes emission lines in the template spectrum to chopped if true. If "tempfile", the flag CHOPEM in the template header causes emission lines in the template spectrum to be removed before the correlation is done. If the EMCHOP header parameter in the template image header is set to T, the emission lines are assumed to have been removed already, and no additional removal is done.
If yes, emission lines are removed from the spectrum before cross-correlating.
s_abs_reject 100
Spectrum absorption line rejection in sigma of fit, 0=no rejection.
s_em_reject 2.
Spectrum emission line rejection in sigma of fit, 0=no rejection.
t_abs_reject 0.
Template absorption line rejection in sigma of fit, 0=no rejection.
t_em_reject 0.
Template emission line rejection in sigma of fit, 0=no rejection.

Spectrum Processing [contents] [index]

bell_window 0.05
A fraction bell_window of the ends of the object and template spectrum are multiplied by a cosine bell. This is to reduce high wave number Fourier components that would be produced by abrupt cutoffs at the ends of the spectra.
renormalize no
If true, the data spectrum is divided by its mean value before being transformed. The minimum value (divided by the mean first) is then subtracted, and the whole thing is multiplied by an arbitrary factor of 1000.0 to put it within normal count levels. This is used on spectra which may have unusual values if they have already been flux-calibrated.
ncols 2048
Number of columns into which to rebin data before transforming, must be a power of two between 256 and 8192.
interp_mode "spline3"
Interpolation mode to use when rebinning spectra, must be "linear" or "spline3" or "poly3" or "poly5" or "sums".
[contents] [index]

Fourier Transform Processing [procedure]

zeropad no
Pad transforms with zeroes to lower noise (yes, no, tempfile). If tempfile, read T or F from ZEROPAD template header parameter to zero-pad or not zero-pad, respectively.
low_bin 5
top_low 10
top_nrun 80
nrun 140
The Fourier amplitudes are multiplied by a cosine-bell filter function, starting at low_bin and running to nrun. Values chosen for low_bin and nrun are not critical. Generally low_bin should be about 5 to 10 for a 1024 point spectrum of 2-4 pixel resolution. Set nrun based upon the number of points in your spectrum and the resolution. For a spectrum of NPTS pixels and resolution FWHM, nrun ~ NTPS / (2*PI * FWHM/2.355). Tonry and Davis 1979, A.J., 84, 1511).

Velocity Modification [contents] [index]

vel_init zero
Make an inital velocity guess. It is used to shift the template in wavelength to give a better overlap region. The options are: zero to use no initial velocity, guess to use czguess in cz (km/sec), zguess to use czguess in z (delta lambda / lambda), correlation to use the correlation velocity in the spectrum header parameter CZXC, emission to use the emission line velocity in the spectrum header parameter CZEM, and combination to use the velocity in the spectrum header parameter VELOCITY.
czguess 0
Initial guess at the radial velocity in km/sec (cz) if vel_init is "guess" and in z (delta lambda / lambda) if vel_init is "zguess".
nzpass 0
Number of iterations shifting the template to match features with the spectrum. Zero and one both give one pass through.
tshift 0.
Night to night velocity zero point shift. If this is zero, each template spectrum header is checked for a TSHIFT parameter, and that is used if present.
svel_corr "file"
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", 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 FITS format 'yyyy-mm-dd' or 'dd/mm/yy' before 2000), UTEND (U.T. at end of exposure as 'hh:mm:ss') and UTOPEN or UT (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.
tvel_corr "file"
Template velocity correction. Set to "none" if template is already corrected to "heliocentric", else "heliocentric", "barycentric", or "file". If "file", BCV is used if present in header, else HCV. VELOCITY in the template file header is assumed to be the barycentric corrected velocity. If the spectrum is unshifted, this correction must be made; if the spectrum has been shifted, this should be "none" and the BCV parameter in the template header should be 0. If "barycentric" or "heliocentric", the same parameters as above must be present in the template file header.

Velocity Peak Fitting [contents] [index] [procedure]

pkmode 1
Flag for peak fitting: 1=parabola, 2=quartic, 3=cos/(1+x^2) These are usually equivalent, but the quartic works better for broad, flatter-topped peaks. The cos/(1+x^2) function works best on very high signal-to-noise correlations which can be fit down to the base of the correlation peak.
pkfrac 0.5
Fraction of peak or number of points for peak fitting. If negated, the points used in the fit will be marked in the final display. (option added in 1.8)
pksrch 25
When a correlation peak is manually selected, the position used as the peak is the maximum correlation value within this many bins of the cursor-selected bin.
minvel -1000.
Minimum allowable correlation peak velocity shift in km/sec, ignored if INDEF. INDEF option added in 2.0b15
maxvel 100000.
Maximum allowable correlation peak velocity shift in km/sec, ignored if INDEF. INDEF option added in 2.0b15

Reporting Results [contents] [index] [procedure]

report_mode 1
Code for the format in which results of fit are reported. Click on the number of a mode to get a description and example of that format. Click here for explanations of all of the output numbers in each mode.
=1 commented text
=2 one line per spectrum-template combination.
Includes filenames, R, velocity and error in km/sec, and height and width of correlation peak.
=3 one line per spectrum giving best fit and previous results
Previous results are read from the image header and written alternately with new results: file, old R, new R, old velocity, new velocity, old error, new error, Julian date of observation, and name of best template.
=4 one line per spectrum-template combination.
Includes filenames, R value, velocity, and error.
=5 one long line per spectrum-template combination.
Includes 4 filter parameters, template file name, tshift from template header, spectrum filename, velocity, R value, peak height and width, and heliocentric velocity correction.
=6 one long line per spectrum-template combination.
Includes spectrum and template names, Julian date, velocity, error, R-value, correlation peak height and width, and velocity correction to solar system barycenter
=7 one long line per spectrum-template combination.
prints per template results from current correlation and from previous correlation as saved in the spectrum header. Includes filename, old and new R-value, old and new velocity, old and new error, old and new peak height, old and new ARMS, Julian date of observation, and old and new template names.
=8 one long line per spectrum combination.
Includes spectrum filename, instrument code, object name, Julian date of observation, emission line velocity and error, correlation velocity, error, and R-value, number of emission lines found and fit, and the name of the template giving the highest R-value.
=9 one long line per spectrum-template combination.
Includes observatory code, spectrum filename, template filename, Julian date of observation, velocity, error, and R-value, correlation peak height and width, barycentric velocity correction. The sigma of the spectrum transform, sigma of the template transform, and name of the file containing the correlation vector for this spectrum-template combination are added to the end of the line if such a file is written.
=10 one long line per spectrum.
Includes spectrum filename, Julian date of observation, number of best template in list, name of best template, velocity, error, and R-value for best, and each template.
=11 one long line per spectrum.
Includes spectrum filename, Julian date of observation, number of best template in list, filename, velocity, error, and R-value for best template, filename, velocity, error, and R-value for each template.
=12 one long line per spectrum.
Includes spectrum filename, Julian date of observation, number of best template in list, and filename, velocity, error, and R-value for each template.
=13 one long line per spectrum-template combination.
Includes observatory code, spectrum filename, template filename, Julian date of observation, velocity (from the searched, not fit, peak), peak height and width, barycentric velocity correction. The sigma of the spectrum transform, sigma of the template transform, and name of the file containing the correlation vector for this spectrum-template combination are added to the end of the line if such a file is written.
=14 one long line per spectrum.
Includes spectrum filename, Julian date of observation, emission line velocity, error, number of lines found, and number of lines fit, number and name of best template in list, and filename, velocity, error, and R-value for each template. (mode added in version 2.0)
=15 one long line per spectrum-template combination.
Includes spectrum and template names, Julian date, velocity, error, R-value, correlation peak height and width, and velocity correction to solar system barycenter. It is like mode 6, but with 2 more template name characters and velocities to m/sec. (mode added in version 2.0.1)
=16 one long line per spectrum-template combination.
Includes spectrum and template names (24 and 16 characters, respectively), R-value, radial velocity and error in km/sec, height of correlation peak, template wavelength limits, and center wavelength of correlated template spectrum. This is used with wide synthetic templates of which only portions are used.
=17 one long line per spectrum-template combination for Hectochelle.
Includes aperture, fiber, beam, 24-character spectrum name, last 24 characters of template name, heliocentric Julian Day, radial velocity, velocity error, R-value, correlation peak height and width, and barycentric velocity correction.
logfiles "STDOUT,xcsao.log"
All results from XCOR are recorded in these files.
save_vel no
If yes, save results in the IRAF image header, in a compact form if specnum is greater than zero; otherwise in a more expanded form.
archive no
If yes, save emission line results in SAO TDC archive records in the current directory.

Display Information [contents] [index]

nsmooth 0
If >0, the data spectrum is smoothed smooth times for the final one-page display. The spectrum is NEVER smoothed for the correlation.
cvel INDEF
Center velocity of the summary velocity correlation graph in km/sec. This defaults to the velocity from the cross-correlation with the highest R value.
dvel INDEF
Velocity half-width of the summary velocity correlation graph in km/sec. This defaults to 20 times the width of the peak of the cross-correlation with the highest R value.
ablines "ablines.dat"
Name of file containing an absorption line list. It is used if the "l" cursor option is selected to label absorption lines.
emlines "emlines.dat"
Name of file containing an absorption line list. It is used if the "l" cursor option is selected and either the "e" or "b" cursor command is used to identify an emission line in the spectrum, or if display modes 2 or 3 are used to display the data and an emission line fit has been done or an emission line template gets an R value over 3.0. If the filename is preceded by a "+", emission lines are always labelled.
linedir "rvsao$lib/"
Directory containing line list files named by ablines, emlines, and badlines. Filenames containing a "/" in the first column are assumed to be full pathnames; if there is a "/" anywhere else in the filename, the path is assumed to be relative to the current working directory. If there is a "$" in the filename, the part preceding the "$" is assumed to be an IRAF environment parameter defining a directory. In any of these cases, the linedir parameter is ignored.

Displaying Results [contents] [index] [procedure]

dispmode 1
Format in which to display summary page on an interactive display device and on the hard-copy device plotter. If the format code is negated, the spectrum is plotted with the intensity scaled from zero rather than the spectrum minimum.
=-1 Display all of spectrum, with portion used marked, scaled from an intensity of zero, and cross-correlation with template information.
=0 Display only part of spectrum used in correlation and cross-correlation with template information. (2.0)
=1 Display all of spectrum, with portion used marked, and cross-correlation with template information.
=2 Display spectrum with absorption and known emission lines labelled and both template and emission line information.
=3 Display spectrum with absorption and known emission lines labelled using the entire display without the table of results
=4 Display continuum-subtracted spectrum with absorption and known emission lines labelled and tables of template and emission line information.
=5 Display continuum-subtracted spectrum with absorption and known emission lines labelled using the entire display without the table of results.
(3,4,5 added in version 2.1)
displot yes
If yes, display graphic summary of results on an interactive display device.
device "stdgraph"
Interactive device on which to display a graphic summary of XCSAO's results.
curmode no
If yes, wait in cursor mode displaying correlation results after each spectrum is processed. Many commands are available, including changing which template is used for the correlation peak and velocity displayed, switching display modes between correlation peak and labelled lines, and rerunning the correlation with manual peak selection or an edited spectrum. Cursor mode commands may be listed by typing "?".
hardcopy no
If yes, display graphic summary of results on plotter.
plotter "stdplot"
Second, non-interactive device on which to plot the graphic summary of results.

Debugging [contents] [index]

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.
temp_plot no
If yes, plot each template spectrum.
contsub_plot no
If yes, plots of the continuum-subtracted object and template spectra are displayed. This is most useful for determining the appropriateness of the order of the polynomial chosen to fit the continuum.
apodize_plot no
If yes, plots of the windowed object and template spectra are displayed. This is most useful for determining the size of the cosine bell window applied to either end of the spectrum.
fft_plot no
If yes, the power spectrum of the transformed object data and template is displayed. This is useful for setting the low order cutoff for the filter and for seeing if any periodic noise is present in the data.
tfft_plot no
If yes, the power spectrum of the transformed object and template data, after filtering, is displayed. This lets the user see the data which is actually being correlated.
uxcor_plot no
If yes, the unfiltered cross-correlation data is plotted.
cursor ""
Graphics cursor input. When null the standard cursor is used; otherwise the specified file is used.

XCSAO Parameters, Alphabetically [by subject]

ablines apodize_plot archive badlines bell_window contsub_plot correlate curmode
cursor cvel czguess debug device displot dispmode dvel
echelle emlines end_lambda fft_plot fixbad hardcopy interp_mode linedir
logfiles low_bin maxvel minvel ncols nrun nsmooth nzpass
obj_plot pkfrac pkmode pksrch plotter renormalize report_mode s_abs_reject
save_vel s_emchop s_em_reject specband specdir specnum spectra st_lambda
svel_corr t_abs_reject t_emchop tempband tempdir templates tempnum temp_plot
t_em_reject tfft_plot top_low top_nrun tshift tvel_corr uxcor_plot vel_init
xcor_file xcor_plot zeropad

Return to XCSAO


Last updated May 24, 2010 by Doug Mink

Telescope Data Center [Back to XCSAO]