comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: FITS to ascii spectra
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: FITS to ascii spectra [message #67646 is a reply to message #67636] Wed, 19 August 2009 13:04 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Aug 19, 4:42 pm, rupai <rupali...@gmail.com> wrote:
> is there any IDL procedure that can convert a 1D FITS spectra to an
> ascii text spectra (e.g. wspectext of IRAF ) ?

Download the idlastro library at

http://idlastro.gsfc.nasa.gov/

Then you can read the file using something like

fits_read,fits_file,data,header

How to interpret the array data that is returned by fits_read depends
on how the file was written. It may be necessary to read parameters
from the header (like initial wavelength and wavelength interval per
pixel).

Assuming you have the spectrum in an array called data2, then you can
make a text file with default formatting with just something like

openw,unit,txt_file,/get_lun
printf,unit,data2
free_lun,unit
[Message index]
 
Read Message
Read Message
Previous Topic: [IDL 6.2 with ENVI 4.2] is-it possible to extract multiple profiles on multiple images from shape files
Next Topic: Re: [IDL 6.2 with ENVI 4.2] is-it possible to extract multiple profiles on multiple images from shape files

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Nov 30 00:41:48 PST 2025

Total time taken to generate the page: 1.52285 seconds