View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

fits to txt

athlonea wrote on Nov 09, 2007

Good day Everyone,

I use IRAF for echelle spectra reduction and would like to be able to write the lambda-flux information for each spectrum aperture to a text file. I know there is a :.snap epsfl command which allows to write each aperture to *.eps when viewing the spectrum using splot. Is there a similar way to write the aperture info to *.txt?

Thanks for any help,

athlonea

Eugene A. Semenko wrote on Nov 09, 2007

I ususally used wspectext from onedspec:
wspectext input.fits output.txt head- wformat="%.4f"
Also you can convert multidimensional FITS files writing something like input[*,1], for example.

athlonea wrote on Nov 09, 2007

esemenko

I ususally used wspectext from onedspec:
wspectext input.fits output.txt head- wformat="%.4f"
Also you can convert multidimensional FITS files writing something like input[*,1], for example.


Thank you for reply.

I've tried wspectext, but what I got was:
Warning: oP_1.fits is not one dimensional
... obviously not a good way to deal with these files.

Anyway, I managed to divide my *.fits file with scopy into a number of *.fits, each containing only a single aperture of the echelle spectrum. After that wspectext worked perfectly with each of those single apertures.

Once again thanks for help,

athlonea

Last post on Nov 09, 2007