scoords: Set spectral coordinates as a pixel array (1D spectra only)

Package: onedspec

Usage

scoords images coords

Parameters

images
List of one dimensional spectrum image names.
coords
List of file names containing the coordinate values. There may be one file which applies to all input images or a matching list of one coordinate file for each input image. The coordinate files are a list of coordinate values with one coordinate per line. The coordinates must be ordered in increasing or decreasing value. The number of coordinates must match the number of pixels in the image.
label = ""
Optional coordinate axis label. A typical value is "Wavelength" for wavelength coordinates.
units = ""
Optional coordinate axis units. A typical value is "Angstroms". In order to allow coordinate conversions by other IRAF spectra tasks the value should be specified as one of the known units (see units description in onedspec.package).
verbose = yes
Print a line as each spectrum is processed?

Description

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.

Examples

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>

Revisions

SCOORDS V2.11
This is a new task with this version.

See also

rtextimage, dispcor, specwcs, onedspec.package