| linefind | stsdas.hst_calib.fos.y_calib | linefind |
linefind -- Find spectral lines for wavelength calibration.
linefind input linlib table
This routine finds spectral line positions in the input data; it produces a table of found locations that can then be used by the dispfity task. Wavelengths and approximate line positions are stored in an input line library table. The location of each line in the library is searched in an area of swidth pixels, centered on the approximate location (defined by SAPPROX). The spectral line position is computed using cross correlation with a template of width twidth. A quadratic equation is fit to the minimum of the correlation matrix and its two neighbors. The line position is then given as the location of the minimum of the quadratic. If the line is found on the edge of the search width it is reported as not found.
Note that the approximate line position values in the input line library table must be in units of DIODES, regardless of the oversampling factor (if any) of the input spectral data. The found line positions in the output table are also in units of DIODES. The diode values are zero-indexed, i.e. the first diode has a position value of zero. The input line positions must therefore range between 0 and 511.
An average offset of the approximate and observed line positions is also computed. Line positions further than maxdev from the approximate positions and lines with a peak counts below minval, are not included in the output average offset.
'WAVELENGTH' - Wavelength, copied from the line library.
'SAPPROX' - Approximate sample location from the line
library with the input offset added.
'SFOUND' - Found line location.
'PEAK_COUNT' - Peak value of the line in 'infile'.
'WEIGHT - Weights to be used by 'dispfity'.
1. Compute locations of lines in the spectrum wcspec using the line library linlib. Place the found positions in an output table named found.
fo> linefind wcspec linlib found
2. Repeat the process using a smaller search area and adding an offset to the approximate positions. Use the average offset from the previous example.
fo> linefind.offset = (linefind.aveds) fo> linefind wcspec linlib found swidth=7
Howard Bushouse, STSDAS
For assistance using this or any other tasks, please contact help@stsci.edu or call the help desk at 410-338-1082.
dispfity, waveoffsety, fitoffsety