View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

DISPTRANS: Converting spectra to velocity units

Frank Valdes wrote on Feb 16, 1998


Q:  I frequently have problems in the following situation, can you give
me an indication of how to solve it, please?:

############################
QUESTION: how to generate an ASCII file in the form [km/s, intensity]
from an unidimensional IRAF spectrum in coordinates IntensityXAngstrom.
#############################

-   I use SPLOT to plot the unidimensional IRAF spectrum Intensity X
    Angstrom. Then, by typing "V" and the wavelength, I transform the
    spectrum to Intensity X km/s.  I save the spectrum by typing "I" and  I
    get  an image, for which the header is printed bellow. When ploting the
    saved image it allawys shows intensity X km/s, as expected.

-   Them I  save the spectrum into an ASCII file, by using LISTPIX "name1"
    wcs=world  >  "name2" and I  get the file in units of [Angstrom, intensity]
    BUT WHAT I NEED  IS  [km/s, intensity]!


A:  What you are doing with SPLOT is changing the display units.  This is
something only used by the spectroscopy display tasks such as SPLOT and
SPECPLOT.  To get what you want you need to actually resample the data into
velocity units.  The tasks to do this is onedspec.disptrans.  So the
following will do what you want:

	on> disptrans inspec outspec "km/s 10938.13 angstroms"
	on> listpix outspec wcs=world > ascii.dat

Last post on Feb 16, 1998