HELP · SEE_ALSO
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.
- input [file name]
- Name of the first GHRS spectral image.
- wave [file name]
- Name of the wavelength image corresponding to the spectral image specified by input.
- intable [file name]
- Name of the table containing the spectral line template. This table must have columns WAVELENGTH and INTENSITY.
- outtable [file name]
- Name of the output table containing the results of the correlation.
One row is generated by each call to wshift. The row may be added to
an existing table by specifying tabstat = append. The output table
has the following columns:
'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).
- (tabstat = "write") [string, allowed values: write | append]
- Method used to store output results. If tabstat is set to "write", a new table will be created having the file name specified by the outtable parameter. If it is set to "append", then results are written to the end of an existing table.
- (maxdev = 11) [integer, min=1, max=50]
- Maximum deviation, in data points, when searching for a correlation peak.
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 email@example.com or call the help desk at 410-338-1082.