| scoords | onedspec | scoords |
scoords -- set spectrum coordinates from a pixel array (1D only)
scoords images coords
Scoords sets spectral coordinates in one dimensional spectral images as a list of coordinates in the image header. The coordinate file(s) consists of coordinate values given one per line. Each coordinate value is assigned to an image pixel in the order given and so the number of coordinate values must match the number of pixels in the spectrum. Also the coordinates must be monotonically increasing or decreasing.
When multiple spectra are to be set a matching list of coordinates can be specified or a single coordinate file for all images may be used.
The coordinate system set in the header is an example of the "multispec" world coordinate system. This is understood by all the standard IRAF tasks. It is described under the help topic "onedspec.specwcs". Once the coordinates are set one may resample the spectrum to a more compact linear description using the task dispcor .
Since the coordinate values are stored in the header (double precision numbers) the header can become quite large if the spectrum is long. Be sure the environment variable "min_lenuserarea" which defines the maximum size of the image header in number of characters is large enough to hold all the coordinates.
1. Set the coordinates for a spectrum.
cl> type coords.dat
4000.
4010.123
4020.246
4031.7
<etc>
cl> scoords spec coords.dat label=Wavelength units=Angstroms
cl> listpix spec wcs=world
4000. 124.
4010.123 543
<etc>
rtextimage, dispcor, specwcs, onedspec.package