Table of Contents

Name

tabfits - convert tables into FITS images

Synopsis

tabfits [parameter=value]

Description

tabfits converts table-like files to FITS HDUs. Headers in the table are optional, but should be #-comment lines before the numeric data start. The data can be either taken from one specific column, or read continuesly from all columns, discarding any structure in the data. The image size is given as parameters nx=, ny= and nz=, on the command line, or else obtained from the header from the usual FITS-like NAXISn keywords.

For a proper astronomical WCS you will need to make sure that your FITS style header (see EXAMPLES below) has the correct CTYPE (see e.g. worldpos(3NEMO) ). The default is currently observer unfriendly.

It is currently not possible to interchange the axes, you have to use ccdflip(1NEMO) for this.

Parameters

The following parameters are recognized in any order if the keyword is also given:
in=
Input table file. No default.
out=
Output fits file. No default.
dcol=
Column for data. Use 0 if all data (columns) are to be read continuesly. [0]
nx=
X-Size of data, or else specify in the ascii header as NAXIS1
ny=
Y-Size of data, or else specify in the ascii header as NAXIS2
nz=
Z-Size of data, or else specify in the ascii header as NAXIS3.
nmax=
Allocation space for piped I/O.
scale=
Scale factor by which all incoming data are multiplied for output in the fits file. Default: 1
wcs=t|f
Enforce a proper FITS style WCS definition. For this the FITS header description (see ) will need to have a valid CTYPE1 and CTYPE2 to properly handle the sky coordinates. There is no mechanism to handle spectral axes. Default: f.

Bugs

All non-standard fits header keywords are copied verbosely, so be sure to follow the FITS rules in their formatting.

Examples


# NAXIS1  =   25
# NAXIS2  =   29
# NAXIS3  =    1 
# CDELT1  =    0.25000000000000
# CDELT2  =    0.25000000000000
# CRVAL1  =     1.0000000000000
# CRVAL2  =   -0.25000000000000
# CTYPE1  = ’Log n (/cm**3)’ 
# CTYPE2  = ’Log G_0’ 
# CRPIX1  =     1.0000000000000
# CRPIX2  =     1.0000000000000
#
#              / Model Parameters:
# VERSION =     1.00000
# DVDOP   =     1.50000      / Turbulent Doppler Velocity (km/s)
     1.52152E-06
     1.56927E-06
     1.57882E-06
     1.51197E-06
     1.34486E-06

See Also

tabfits(1NEMO) , tabmath(1NEMO) , fits(5NEMO) , wcs(1NEMO)

Files

src/image/fits/tabfits.c    source code

Author

Peter Teuben

Update History


4-dec-98    V1.0 created for Wolfire’s project    PJT
17-dec-98    V2.0 nxy= is now nx=,ny=; for Harris’ project too    PJT
5-jan-99    V2.0a fixed header formatting bug    PJT
9-jul-00    V3.1 allow dcol=0    PJT
21-sep-05    V4.0 add wcs= to deal with real astronomers (lost?)    PJT
7-nov-2013    V3.3 add scale=     PJT 


Table of Contents