XCOR N1 N2 N3 N4 N5 SLO SHI TAPER FILE OPTION [F1] [F2] SET NAME --
Cross-correlates spectra. See below for more details.
Parameters:
N1 -- First object spectrum
N2 -- Last object spectrum
N3 -- First template spectrum
N4 -- Last template spectrum
N5 -- First slot for cross-correlations. They are stored
as spectra with 5000 A corresponding to 0 km/s.
SLO -- First shift in pixels to compute.
SHI -- Last shift in pixels to compute. A search will be
made for a REAL header parameter called 'XCOR_SHIFT'
and if found SLO and SHI will be assumed relative to
this. If an arc is available, it is assumed that
'XCOR_SHIFT' has units of 'km/s', otherwise pixels.
This should help pick out the right peak in cases of
low signal-to-noise especially when binary motion is
significant. The value of XCOR_SHIFT is converted to
the nearest equivalent integer pixel shift and then
cross-correlation is carried out from SHIFT+SLO to
SHIFT+SHI. The range SLO to SHI can then be reduced
to an amount consistent with the need to bracket the
maximum.
TAPER - Fraction to taper at ends of spectra. This reduces
end effects.
FILE - ASCII file to store results (blank to ignore)
OPTION - 1 -- Bayesian computation
2 -- Normal (but with weights)
If OPTION=1
F1 -- Lower limit of veiling factor from prior information.
Normally this will be set equal to 0.
F2 -- Upper limit of veiling factor from prior information.
If the spectra have been correctly normalised, F2 should
in theory be no more than 1, however, it does correlate
with Vsin i and the spectral type. Thus if you use a very
broadened template, it may want to reach F > 1, and so
there may well be reason to set F2 > 1. It is unlikely
that F2 should ever be < 1.
SET - Yes to set mask of pixels in object (not template)
NAME - Name of header item to store radial velocity in.
(uncertainty will go to 'NAME_err')
Carries out standard computation of cross-correlation, interpolating
over regions masked out of analysis. Maximum cross-correlation located
by parabolic approx to three points at maximum. Purely statistical
uncertainty computed. Option (1) Cross-correlation if stored is actually
equal to (sum W S T)**2/(2 sum W T**2) where S is spectrum and T template
plus a correction for the known range of the fraction of the spectrum
between 0 and 1. (2) The same without the correction (3) Stores
sum W S T in one block and then sum W T**2 in the next. If the spectra were
normalised to have unity continuum which was then subtracted then these
cross-correlations can be back-projected to form a `skew map'. The routine
does not account for uncertainties in the template spectra. The Bayesian
correction factor reduces probability for negative cross-correlation using
prior knowledge that the template can only make up a factor f between 0 and
1 of the spectrum. Spectra and templates must be correctly scaled.
Scaling is probably best done by first fitting a constant to a region
of the spectra of both templates and targets and then dividing this
through. Note that a spline or higher order poly is not desireable
because it might change the relative line strengths at different
wavelengths. Following normalisation then one should subtract a fit
to the continuum. Another possible method is to apply a band-pass
filter with 'bfilt', especially to filter out longer term variations.
The velocities that xcor produces are only accurate if prior to
using it you have rebinned both targets and templates onto an identical
velocity scale with 'vbin'.
Related commands:
vbin
, bfilt
, back
This command belongs to the class: measurement