Welcome to iraf.net Thursday, April 25 2024 @ 12:05 AM GMT
shruthi |
06/19/2015 06:18AM (Read 3591 times)
|
|
|
Status: offline
Registered: 06/19/2015
Posts: 4
|
Hello everyone,
I am having trouble converting my spectra which is in fits to txt file.
I used wspectext but what I want is instead of wavelength, I want velocity.
So description of what I am doing:
1. splot the spectra.fits
2. used keystroke v to convert the wavelength to velocity scale
3. save the new spectra in velocity scale as new_spectra.fits
4. changing from fits to txt as
wspectext new_spectra.fits new_spectra.txt
Finally I find that the .txt file still has wavelength instead of velocity!
Please anyone, I need some help..
Thank you in advance.
|
|
|
|
fitz |
06/19/2015 06:36AM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
I haven't tried it myself yet, but I think you need to first run the DISPTRANS task to convert the dispersion units in the header before printing it out with WSPECTEXT. The 'v' key in SPLOT essentially just changes the plot axes.
|
|
|
|
shruthi |
06/19/2015 06:44AM
|
|
|
Status: offline
Registered: 06/19/2015
Posts: 4
|
Ok so can I do just the below command to convert to velocity scale?
disptrans spectra.fits new_spectra.fits km/s
Thank you for the reply
|
|
|
|
fitz |
06/19/2015 06:48AM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
See the help pages for both DISPTRANS and SPLOT for their discussion of velocity units. For velocity you need to also specify the velocity zero point, e.g.
cl\$this->_split2($m[0]) disptrans old.fits new.fits "km/s 1 micron"
would define 1 micron as the zero point. Note the quotes around the entire unit string so it isn't taken as separate arguments.
|
|
|
|
shruthi |
06/19/2015 06:54AM
|
|
|
Status: offline
Registered: 06/19/2015
Posts: 4
|
Ok so if I want to keep my H-alpha line as the zero-point then i give
disptrans spectra.fits new_spectra.fits "km/s 6563 angstroms"
Hope I have understood it right.
|
|
|
|
shruthi |
06/19/2015 07:01AM
|
|
|
Status: offline
Registered: 06/19/2015
Posts: 4
|
Thanks a ton. I tried and it worked.
So finally I am able to get text file with velocity terms.
Thank you
|
|
|
|
| |
|
Content generated in: 0.25 seconds |
|