Welcome to iraf.net Thursday, April 25 2024 @ 12:05 AM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 Conversion of fits to txt
   
shruthi
 06/19/2015 06:18AM (Read 3591 times)  
+----
Newbie

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.

 
Profile Email
 Quote
fitz
 06/19/2015 06:36AM  
AAAAA
Admin

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.


 
Profile Email
 Quote
shruthi
 06/19/2015 06:44AM  
+----
Newbie

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 Smile


 
Profile Email
 Quote
fitz
 06/19/2015 06:48AM  
AAAAA
Admin

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.

 
Profile Email
 Quote
shruthi
 06/19/2015 06:54AM  
+----
Newbie

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.


 
Profile Email
 Quote
shruthi
 06/19/2015 07:01AM  
+----
Newbie

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 Smile

 
Profile Email
 Quote
   
Content generated in: 0.25 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login