How to convert text file to fits file [message #70600] |
Thu, 22 April 2010 04:21  |
sid
Messages: 50 Registered: January 1995
|
Member |
|
|
Hi,
I am having text file with two columns one is wavelength and
intensity, I need to convert this to fits file, please help me out in
this regard
regards
sid
|
|
|
Re: How to convert text file to fits file [message #70638 is a reply to message #70600] |
Mon, 26 April 2010 23:09  |
Aram Panasenco
Messages: 41 Registered: April 2010
|
Member |
|
|
sid wrote:
> Hi,
> I am having text file with two columns one is wavelength and
> intensity, I need to convert this to fits file, please help me out in
> this regard
> regards
> sid
Hello sid,
David Fanning has a great tutorial on his site explaining how to read
ASCII data files: http://www.dfanning.com/tips/ascii_column_data.html
(Make sure to check out the rest of his site, it's a great IDL source)
After you have your data as an array or structure, you can use a
procedure like MWRFITS or WRITEFITS to save your data as a FITS file.
Information on reading and writing FITS files using the IDL Astronomy
Library is available here: http://idlastro.gsfc.nasa.gov/fitsio.html
Hope this helps,
~ Aram Panasenco
|
|
|