| wshift | stsdas.hst_calib.hrs.z_calib | wshift |
wshift -- Find the wavelength offset from a spectral line template.
wshift input wave intable outtable
This routine computes the wavelength offset between an input spectrum and a spectral line template using cross-correlation. This task uses the normalized mean and variance correlation described by the following equation:
TOTAL[(x(i) - xmean) * (y(i - k) - ymean)] corr(k) = ----------------------------------------------- SQRT(TOTAL[(x(i) - xmean)**2]) * SQRT(TOTAL[(y(i - k) - ymean)**2]) where: corr(k) - correlation measure at offset k, x(i) - value in the spectrum, xmean - mean value of X in the region being correlated, y(i) - value in the template, ymean - mean value of Y, and TOTAL[ ... ] - sum over i.
The peak of the correlation function is located and computed to a sub-pixel precision using quadratic refinement (i.e., the offset is the position of the maximum of the quadratic through the peak value and its two neighbors).
This routine will determine the absolute wavelength calibration of the GHRS from an external source. The input templates will be the Hobbs and York line profiles or selected interstellar lines.
'GRATING' - Grating mode (char*3).
'CARPOS' - Carrousel position of the observation (integer).
'ORDER' - Spectral order (this will be "1" for the
first order gratings) (integer).
'WAVELENGTH' - Wavelength at the center of the spectral
line template (double).
'DELTAS' - Offset in sample units (double).
'DELTAW' - Wavelength offset (double).
1. Compute wavelength offsets for two different input observations, g3obs and g4obs, using the same spectral line template, sltemplate. The results of the second run are appended to the table shifttab, which is created by the first run.
hr> wshift g3obs g3wave sltemplate shifttab hr> wshift g4obs g4wave sltemplate shifttab tabstat="append"
For assistance using this or any other tasks, please contact help@stsci.edu or call the help desk at 410-338-1082.