View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

helplog.14: binary tables, spectra, splot, rspectext

Frank Valdes wrote on Jan 21, 2005

NUMBER:	14
KEYWORDS:	binary tables, spectra, splot, rspectext
DATE:	Fri Jan 21 12:19:28 MST 2005
FROM:	valdes

Q:	I have at my disposal spectra in FITS format, but with a binary
	table extension.  The extension contains the following:

	    WAVELENGTH       R          %10.3f ANGSTROMS       
	    FUNNORM          R          %10.4e ""              
	    FNORM            R          %10.4e ""              
	    SNR              R          %10.1f ""              
	    ORDER            I             %3d ""              

	I am wondering how I can use IRAF NOAO tasks such as SPLOT (to
	examine, e.g.  'fnorm' vs 'wavelength') or CONTINUUM (to continuum
	normalize 'funnorm') on these data.

A:	We would like to eventually have SPLOT, and other ONEDSPEC tasks,
	operate directly on this table format.  A table format for spectra
	is a reasonable thing but in the IRAF NOAO packages we use an image
	format with a WCS in the header to handle the coordinates.

	The current solution is to extract the data you want into a two
	column text file.  The tasks in the TABLES package provide the
	ability to convert a FITS table into text.  The TABLES package must
	be installed separately from the STSDAS distribution which is also
	available at

	    http://iraf.noao.edu/contrib.html

	You could also use TABLES tools for plotting and GRAPH for the text
	files.  But all of the analysis features in SPLOT require use of
	image format.

	The columns would be wavelength and one of the flux columns.  You
	would then use the task ONEDSPEC.RSPECTEXT to convert the text file
	into an image spectrum.  In this task there are choices about how
	to create the wavelength coordinate system.  If the coordinates
	vary smoothly a fit is a compact description.  But you can also use
	the non-linear mode to store each wavelength in a list in the
	header.  Note that this method has a limitation that the list,
	which is stored as text, has to fit in less than 999 68 character
	strings.  So a very long spectrum could not be handled in this
	way.

Last post on Jan 21, 2005