Convert spectrum to velocity
malte wrote on Dec 17, 2007
I want to transform a spectrum's wavelength axis to velocity relative to a specified spectral line.
Splot does this with its command v, but I'm looking for something a bit more like scopy. Scopy looks like it might do the trick, but I'm not clear on that.
It looked to me like the sequence disptrans -> dispcor would work, but after that I find that splot won't plot anything.
Splot does this with its command v, but I'm looking for something a bit more like scopy. Scopy looks like it might do the trick, but I'm not clear on that.
It looked to me like the sequence disptrans -> dispcor would work, but after that I find that splot won't plot anything.
--> epar disptrans
Task disptrans is running...
delv: Dispersion transformed to km/s.
--> epar dispcor
Task dispcor is running...
delv: Resampling using current coordinate system
delv0: ap = 1, w1 = -2000., w2 = 2000., dw = 30.07519, nw = 134
--> splot delv0
Killing IRAF task `splot'
Traceback (innermost last):
File "<CL script CL1>", line 1, in ?
IrafError: Error running IRAF task splot
IRAF task terminated abnormally
ERROR (1, "Error in velocity reference wavelength")
Mike Fitzpatrick wrote on Dec 17, 2007
DISPTRANS is the correct task to use, e.g. something like
will reset the WCS to be in velocity units relative to the 6707.76 line. An SPLOT or
WSPECTEXT, etc should show the new units. You can also use SLIST to print out the dispersion information.
-Mike
cl> disptrans inspec outspec units="km/s 6707.76 angstroms'will reset the WCS to be in velocity units relative to the 6707.76 line. An SPLOT or
WSPECTEXT, etc should show the new units. You can also use SLIST to print out the dispersion information.
-Mike
malte wrote on Dec 17, 2007
Thanks. That does seem to do the trick, or at least for WSPECTEXT.
But SPLOT still shows wavelengths in à rather than km/s, which makes it harder for me to check that I'm doing the right thing. If I SPLOT the DISPCORred spectra they just look like resampled versions of the original one.
But SPLOT still shows wavelengths in à rather than km/s, which makes it harder for me to check that I'm doing the right thing. If I SPLOT the DISPCORred spectra they just look like resampled versions of the original one.
Francisco Valdes wrote on Dec 17, 2007
Hi,
The distinction between how the pixels are stored, what the associated WCS is, and how things are display can be confusing. SPLOT will normally display things in a standard way which can be different than the pixel sampling and dispersion solution are given in the image. For example, SPLOT will generally display in linear Ang even if the data are dispersion corrected to uniform log intervals (for some RV analysis).
To check things you would need to look at the WCS in the header with IMHEAD. As a hint, you can use a non-spectral task like IMPLOT setting things to be shown in "world" coordinates. THis should show things in the actual dispersion system.
I hope these comments are helpful.
Yours,
Frank Valdes
The distinction between how the pixels are stored, what the associated WCS is, and how things are display can be confusing. SPLOT will normally display things in a standard way which can be different than the pixel sampling and dispersion solution are given in the image. For example, SPLOT will generally display in linear Ang even if the data are dispersion corrected to uniform log intervals (for some RV analysis).
To check things you would need to look at the WCS in the header with IMHEAD. As a hint, you can use a non-spectral task like IMPLOT setting things to be shown in "world" coordinates. THis should show things in the actual dispersion system.
I hope these comments are helpful.
Yours,
Frank Valdes
Last post on Dec 17, 2007