Submit a Story  :  IRAF Links  :  Past Polls  :  Calendar  :  Advanced Search  
     iraf.net
FAQ
 Forum FAQForum FAQ   Forum SearchForum Search   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

txt-file to fits-format

 
Post new topic   Reply to topic    iraf.net Forum Index -> General IRAF
View previous topic :: View next topic  
Author Message
SvetlaTsvetkova



Joined: 20 Apr 2011
Posts: 2

PostPosted: Wed Apr 20, 2011 9:48 am    Post subject: txt-file to fits-format Reply with quote

Hello,
I have a problem with making my files in a good format for IRAF. My files are txt or ascii - 2 columns - one for wavelenght and one for flux. I want to convert them into fits-format and proces them after that. I tried to use procedures like rspectext and rtextimage. It did not work. Maybe the problem is in creating the header, but I don't know what to do now.
Can anybody tell me somitnig more?
Thank you !
Back to top
View user's profile Send private message
robsteele49



Joined: 03 May 2010
Posts: 10
Location: Frazier Park

PostPosted: Wed Apr 20, 2011 2:56 pm    Post subject: Reply with quote

No promises, but if you send me one of your files I'll play with it tonight. My e-mail address is robsteele49@yahoo.com and you can attach the file to the e-mail.
Back to top
View user's profile Send private message
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 3256
Location: Tucson

PostPosted: Wed Apr 20, 2011 5:10 pm    Post subject: Reply with quote

You can also post a sample of the data file (e.g. 10 lines or so) and the RSPECTEXT parameters you used here along with other information such as any error messages seen. If your wavelengths aren't in Angstroms or are highly nonlinear then it may just be a matter of setting parameters properly but there isn't enough information in your post to say for sure.
Back to top
View user's profile Send private message
SvetlaTsvetkova



Joined: 20 Apr 2011
Posts: 2

PostPosted: Thu Apr 21, 2011 1:53 pm    Post subject: Reply with quote

Here are the first few rows from the file (173602 rows is all the file) :

369,379 0,91884
369,381 0,93333
369,384 0,88033
369,386 0,91339
369,388 0,98418
369,391 0,81088
369,393 0,82434
369,395 0,87771
369,398 0,89447
369,4 0,88058
369,402 0,81178
369,405 0,74266
369,407 0,72899
369,409 0,62999
369,412 0,52785
369,414 0,62754
369,416 0,58424
369,419 0,53562
369,421 0,56922
369,423 0,68329

This is the parameters I used for rspectext :

PACKAGE = onedspec
TASK = rspectext

input = star.dat Input list of text spectra
output = output Output list of image spectra
(title = betcet) Spectrum title
(flux = no) Flux calibrated?
(dtype = linear) Dispersion type
(crval1 = 369.379) Coordinate of first pixel
(cdelt1 = 0.0039113882488479) Coordinate interval per pixel
(fd1 = )
(fd2 = )
(mode = ql)

I had no error messages. It created a fits-format file with something like header :

SIMPLE = T / Fits standard
BITPIX = -32 / Bits per pixel
NAXIS = 1 / Number of axes NAXIS1 = 197 / Axis length
EXTEND = F / File may contain extensions OBJECT = 'betcet ' / Name of the object observed ORIGIN = 'NOAO-IRAF FITS Image Kernel July 2003' / FITS file originator DATE = '2011-04-21T13:36:50' / Date FITS file was generated IRAF-TLM= '2011-04-21T13:37:10' / Time of last modification
DC-FLAG = 0
CRPIX1 = 1.
CRVAL1 = 369.379
CDELT1= 0.003911388 END


and below these rows, there are about 10 rows with "?" But this fits-file i could not use fot further processing.
That's all.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    iraf.net Forum Index -> General IRAF All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2009 phpBB Group
 Copyright © 2005-2011 iraf.net
 All trademarks and copyrights on this page are owned by their respective owners.
Powered By Geeklog 
Created this page in 0.12 seconds