Re: FITS to ascii spectra [message #67636] |
Thu, 20 August 2009 08:56  |
rupai
Messages: 3 Registered: August 2009
|
Junior Member |
|
|
On Aug 20, 1:04 am, pp <pp.pente...@gmail.com> wrote:
> 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
thanks for useful information...
--rupai
|
|
|